Last active
March 16, 2017 13:53
-
-
Save lanwen/751f7dd6d925e9923fb6a0cfdf373913 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CreateTicketBuildStep extends Builder implements SimpleBuildStep { | |
public static class ConverterImpl extends XStream2.PassthruConverter<CreateTicketBuildStep> { | |
private static final Logger LOGGER = LoggerFactory.getLogger(ConverterImpl.class); | |
public ConverterImpl(XStream2 xstream) { | |
super(xstream); | |
} | |
@Override | |
protected void callback(CreateTicketBuildStep obj, UnmarshallingContext context) { | |
if (obj.getTicket().getPackages() != null) { | |
LOGGER.warn("[Plugin] Migration for create ticket build step needed..."); | |
List<PackageSource> sources = obj.getTicket().getPackageSources() == null | |
? new ArrayList<>() | |
: obj.getTicket().getPackageSources(); | |
obj.getTicket().getPackages().forEach(pkg -> sources.add(new OnePackageSource(pkg))); | |
obj.getTicket().setPackageSources(sources); | |
obj.getTicket().setPackages(null); | |
LOGGER.info("[Plugin] " + | |
"Migration for create ticket build step finished. Check old data monitor in global conf"); | |
OldDataMonitor.report(context, "1.8.0.plugin"); | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Для мигратора степа на новую версию--> | |
<dependency> | |
<groupId>org.jvnet.hudson</groupId> | |
<artifactId>xstream</artifactId> | |
<version>1.4.7-jenkins-1</version> | |
<scope>provided</scope> | |
</dependency> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment