package org.jenkinsci.plugins.p4.unshelve; import java.io.IOException; import org.jenkinsci.plugins.p4.tagging.TagAction; import org.jenkinsci.plugins.p4.workspace.Workspace; import hudson.FilePath; import hudson.Launcher; import hudson.model.Run; import hudson.model.TaskListener; import jenkins.tasks.SimpleBuildStep; public class UnshelveBuilderStep extends UnshelveBuilder implements SimpleBuildStep { public UnshelveBuilderStep(String shelf, String resolve) { super(shelf, resolve); } @Override public void perform(Run<?, ?> run, FilePath buildWorkspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException { TagAction tagAction = (TagAction) run.getAction(TagAction.class); String credential = tagAction.getCredential(); Workspace workspace = tagAction.getWorkspace(); unshelve(run, credential, workspace, buildWorkspace, listener); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 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. |
||
#3 | 22821 | Paul Allen |
Merge pull request #53 from jenkinsci/TagAction-order Get Last TagAction. JENKINS-37618 JENKINS-45613 |
||
#2 | 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 |
||
#1 | 16529 | Paul Allen |
DSL for Unshelve task. DSL example: p4unshelve resolve: 'at', shelf: '10831' |