Skip to content

Commit

Permalink
[FIXED JENKINS-13751] Allow reference to base SCM in promotion process
Browse files Browse the repository at this point in the history
Previously, plugins such as the Git Publisher would not work in promotion processes because the SCM reference would be
empty.

This just makes a change to get the base job's SCM when getSCM is called on the promotion process, allowing the use of
steps such as the Git Publisher in promotion processes.
  • Loading branch information
Nick Caley committed Nov 11, 2015
1 parent 89aa15d commit 4624722
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -30,6 +30,7 @@
import hudson.model.labels.LabelAtom;
import hudson.model.labels.LabelExpression;
import hudson.plugins.promoted_builds.conditions.ManualCondition.ManualApproval;
import hudson.scm.SCM;
import hudson.security.ACL;
import hudson.tasks.BuildStep;
import hudson.tasks.BuildStepDescriptor;
Expand Down Expand Up @@ -110,6 +111,11 @@ public static PromotionProcess fromJson(StaplerRequest req, JSONObject o) throws
return p;
}

@Override
public SCM getScm() {
return this.getOwner().getScm();
}

@Override
public void doSetName(String name) {
super.doSetName(name);
Expand Down

0 comments on commit 4624722

Please sign in to comment.