Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Pass through all the build actions #12

wants to merge 1 commit into from

3 participants

Jeff Beck Kohsuke Kawaguchi ashelley
Jeff Beck

Adjusted scheduleBuild to pass through all the build actions to the promotion build. This change is passing all the tests and allows the pass the git revision through to another build using the parameterized build plugin.

Kohsuke Kawaguchi

I hate to be difficult (especially so after so much delay!) but I feel this is also bit problematic.

The main issue here is that Actions are generally used to represent things that have happened during a build. So copying them all would make promotion process to run in a bit weird environment, and it makes the other code think that promotion process run stuff that actually didn't run.

I'll fix the Git plugin to refer to the root build as I originally suggested. I think it works in other contexts well, such as matrix project.

Jeff Beck beckje01 closed this June 25, 2012
Jeff Beck

The fix being on the Git plugin seems correct I am closing this pull request.



I am using

-Jenkins 1.480.3
-Jenkins GIT client plugin version 1.0.5
-Promoted Build Plugin version 2.8

I have a job "Build when another project is promoted".

It actually does not use the promoted revision but a later revision which may have had a failure. This feature doesn't seem to be working in the git plugin. Is there anything I need to configure to make this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Sep 01, 2011
Jeff Beck Adjusted scheduleBuild to pass through all the build actions to the p…
…romotion build.
This page is out of date. Refresh to see the latest.
8  src/main/java/hudson/plugins/promoted_builds/
@@ -302,13 +302,13 @@ public boolean scheduleBuild(AbstractBuild<?,?> build) {
302 302
     public boolean scheduleBuild(AbstractBuild<?,?> build, Cause cause) {
303 303
         assert build.getProject()==getOwner();
304 304
-        // Get the parameters, if any, used in the target build and make these
-        // available as part of the promotion steps
-        List<ParametersAction> parameters = build.getActions(ParametersAction.class);
+        //Get all of the builds actions
+        List<Action> buildsActions = build.getActions();
308 308
309 309
         // Create list of actions to pass to scheduled build
310 310
         List<Action> actions = new ArrayList<Action>();
-        actions.addAll(parameters);
+        actions.addAll(buildsActions); //Pass through the original actions
312 312
         actions.add(new PromotionTargetAction(build));
313 313
314 314
         // remember what build we are promoting

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.