package org.jenkinsci.plugins.p4.workflow; import javax.inject.Inject; import org.jenkinsci.plugins.p4.unshelve.UnshelveBuilderStep; import org.jenkinsci.plugins.workflow.steps.AbstractStepDescriptorImpl; import org.jenkinsci.plugins.workflow.steps.AbstractStepImpl; import org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution; import org.jenkinsci.plugins.workflow.steps.StepContextParameter; import org.kohsuke.stapler.DataBoundConstructor; import hudson.Extension; import hudson.FilePath; import hudson.Launcher; import hudson.model.Run; import hudson.model.TaskListener; public class P4UnshelveStep extends AbstractStepImpl { private final String shelf; private final String resolve; @DataBoundConstructor public P4UnshelveStep(String shelf, String resolve) { this.shelf = shelf; this.resolve = resolve; } public String getShelf() { return shelf; } public String getResolve() { return resolve; } @Extension(optional = true) public static final class DescriptorImpl extends AbstractStepDescriptorImpl { public DescriptorImpl() { super(P4UnshelveStepExecution.class); } @Override public String getFunctionName() { return "p4unshelve"; } @Override public String getDisplayName() { return "P4 Unshelve"; } } public static class P4UnshelveStepExecution extends AbstractSynchronousStepExecution<Void> { private static final long serialVersionUID = 1L; @Inject private transient P4UnshelveStep step; @StepContextParameter private transient Run<?, ?> run; @StepContextParameter private transient FilePath workspace; @StepContextParameter private transient TaskListener listener; @StepContextParameter private transient Launcher launcher; @Override protected Void run() throws Exception { UnshelveBuilderStep unshelve = new UnshelveBuilderStep(step.getShelf(), step.getResolve()); unshelve.perform(run, workspace, launcher, listener); return null; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#8 | 28463 | Paul Allen |
FindBugs error: SE_TRANSIENT_FIELD_NOT_RESTORED (transient but isn't set by deserialisation) |
||
#7 | 26673 | Paul Allen |
Code cleanup - remove calls to Deprecated methods - Deprecated classes like AbstractStepImpl, AbstractStepDescriptorImpl and AbstractSynchronousStepExecution for P4TaggingStep |
||
#6 | 22858 | Paul Allen |
Merge pull request #54 from mihailogazda/master. P4Unshelve build step can now be skipped successfully if the changelist ID is not set. |
||
#5 | 22684 | Paul Allen | Added @Symbol to Extension classes for Pipeline Syntax. | ||
#4 | 22315 | Paul Allen |
Pending change cleanup for unshelve. Unshelve would leave files open for add/edit/delete, the 'tidy' option will 'revert -k' the files leaving the content in the workspace, but removing the 'have' list data. Unshelve can now specify a Credential and Workspace, important for situations where more than one sync occurs in a pipeline script. JENKINS-43430 |
||
#3 | 22305 | Paul Allen | Update Unshelve Step to use 'Step' and 'SynchronousNonBlockingStepExecution' | ||
#2 | 20593 | Paul Allen |
Unshelve options in Pipeline. Update merge options and support unshelve ListBoxModel Option in Pipeline. |
||
#1 | 16529 | Paul Allen |
DSL for Unshelve task. DSL example: p4unshelve resolve: 'at', shelf: '10831' |