package org.jenkinsci.plugins.p4.publish; import hudson.FilePath; import hudson.Launcher; import hudson.model.Result; import hudson.model.Run; import hudson.model.TaskListener; import hudson.tasks.BuildStepMonitor; import jenkins.tasks.SimpleBuildStep; import org.jenkinsci.plugins.p4.tasks.PublishTask; import org.jenkinsci.plugins.p4.workspace.Workspace; import org.kohsuke.stapler.DataBoundConstructor; import java.io.IOException; public class PublishNotifierStep extends PublishNotifier implements SimpleBuildStep { @DataBoundConstructor public PublishNotifierStep(String credential, Workspace workspace, Publish publish) { super(credential, workspace, publish); } @Override public BuildStepMonitor getRequiredMonitorService() { return BuildStepMonitor.NONE; } @Override public void perform(Run<?, ?> run, FilePath buildWorkspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException { // return early if publish not required if (getPublish().isOnlyOnSuccess() && run.getResult() != Result.SUCCESS) { return; } Workspace ws = (Workspace) getWorkspace().clone(); // Create task PublishTask task = new PublishTask(getPublish()); task.setListener(listener); task.setCredential(getCredential(), run.getParent()); ws = task.setEnvironment(run, ws, buildWorkspace); task.setWorkspace(ws); // Expand description String desc = getPublish().getDescription(); desc = ws.getExpand().format(desc, false); getPublish().setExpandedDesc(desc); buildWorkspace.act(task); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 23650 | abraka | "Forking branch Main of p4-jenkins to mautokar-p4jenkins." | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/publish/PublishNotifierStep.java | |||||
#5 | 22894 | Paul Allen |
(minor) remove Pipeline Library after test. Clean up after testGlobalLib and minor refactor on PublishNotifier and PublishNotifierStep. |
||
#4 | 22021 | Paul Allen |
Set environment to expand client name for Publish and Remove Client. JENKINS-43378 |
||
#3 | 21794 | Paul Allen |
Merge pull request #39 from Dohbedoh/JENKINS-34825 Jenkins 34825 |
||
#2 | 19762 | Paul Allen | Missing Override annotations. | ||
#1 | 16510 | Paul Allen | Move AssetNotifier* to Publish and rename. | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/asset/AssetNotifierStep.java | |||||
#1 | 15394 | Paul Allen |
Workflow-DSL functionality. Tested workflow DSL against 1.596.1 older functionality tested against 1.580.1 @sven_erik_knop |