package org.jenkinsci.plugins.p4.workflow; import hudson.Extension; import hudson.FilePath; import hudson.Launcher; import hudson.model.TaskListener; import hudson.model.Run; import javax.inject.Inject; import org.jenkinsci.plugins.p4.tagging.TagNotifierStep; 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; public class P4TaggingStep extends AbstractStepImpl { private final String rawLabelName; private final String rawLabelDesc; @DataBoundConstructor public P4TaggingStep(String rawLabelName, String rawLabelDesc) { this.rawLabelName = rawLabelName; this.rawLabelDesc = rawLabelDesc; } public String getRawLabelName() { return rawLabelName; } public String getRawLabelDesc() { return rawLabelDesc; } @Extension(optional = true) public static final class DescriptorImpl extends AbstractStepDescriptorImpl { public DescriptorImpl() { super(P4TaggingStepExecution.class); } @Override public String getFunctionName() { return "p4tag"; } @Override public String getDisplayName() { return "P4 Tag"; } } public static class P4TaggingStepExecution extends AbstractSynchronousStepExecution<Void> { private static final long serialVersionUID = 1L; @Inject private transient P4TaggingStep 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 { TagNotifierStep notifier = new TagNotifierStep( step.getRawLabelName(), step.getRawLabelDesc(), false); notifier.perform(run, workspace, launcher, listener); return null; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 28463 | Paul Allen |
FindBugs error: SE_TRANSIENT_FIELD_NOT_RESTORED (transient but isn't set by deserialisation) |
||
#4 | 26673 | Paul Allen |
Code cleanup - remove calls to Deprecated methods - Deprecated classes like AbstractStepImpl, AbstractStepDescriptorImpl and AbstractSynchronousStepExecution for P4TaggingStep |
||
#3 | 22684 | Paul Allen | Added @Symbol to Extension classes for Pipeline Syntax. | ||
#2 | 15403 | Paul Allen |
Perforce triggered polling BETA. Perforce triggers on a change-submit and sends a POST to the endpoint http://${JENKINS}/p4/change with the data: {"change":"12345","p4port":"localhost:1666"} Note: ‘change’ is not used (yet), but ‘p4port’ MUST match the credential in the Jenkins Job. JENKINS-25249 |
||
#1 | 15394 | Paul Allen |
Workflow-DSL functionality. Tested workflow DSL against 1.596.1 older functionality tested against 1.580.1 @sven_erik_knop |
||
//guest/sven_erik_knop/p4jenkins/src/main/java/org/jenkinsci/plugins/p4/workflow/P4TaggingStep.java | |||||
#1 | 14133 | Sven Erik Knop | Added p4tag to the DSL part |