Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14475

Conditional build steps should be available as post-build actions

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have matrix builds which run on several nodes, and if a "deploy" checkbox param was selected when the build ran we call a deploy job to push the code out for testing. Unfortunately, using a conditional build step for this causes the deploy to happen for every build node. It should only be run once in our case, after all builds succeed.

      If I could use a conditional build step as a post-build action, this would work perfectly!

        Attachments

          Activity

          Hide
          owenmehegan Owen Mehegan added a comment -

          And I can't see anything in the current version of parameterized trigger that gets me what I want.

          To go back to the original bug request: I want to be able to use conditional build steps in a post-build action. Specifically, I want to be able to say:

          if $some_build_param = "true"
          trigger a downstream build with parameters
          end

          I need this as a post-build action, in matrix builds.

          Show
          owenmehegan Owen Mehegan added a comment - And I can't see anything in the current version of parameterized trigger that gets me what I want. To go back to the original bug request: I want to be able to use conditional build steps in a post-build action. Specifically, I want to be able to say: if $some_build_param = "true" trigger a downstream build with parameters end I need this as a post-build action, in matrix builds.
          Hide
          btb3 Martin Ba added a comment -

          As for

          if $some_build_param = "true"
          trigger a downstream build with parameters
          end
          

          – Shouldn't this be doable with the ParamTriggerPlugin? You can have the parameters for the downstream job loaded from a properties file, and you can use this file as "condition", with teh checkbox that doesn't trigger if the file's missing.

          Show
          btb3 Martin Ba added a comment - As for if $some_build_param = "true" trigger a downstream build with parameters end – Shouldn't this be doable with the ParamTriggerPlugin? You can have the parameters for the downstream job loaded from a properties file, and you can use this file as "condition", with teh checkbox that doesn't trigger if the file's missing.
          Hide
          owenmehegan Owen Mehegan added a comment - - edited

          Interesting, that might work for us. I'll experiment with it. I still would prefer to be able to do actual conditional logic, using the Conditional Build Step plugin, in post-build steps. On matrix builds.

          Show
          owenmehegan Owen Mehegan added a comment - - edited Interesting, that might work for us. I'll experiment with it. I still would prefer to be able to do actual conditional logic, using the Conditional Build Step plugin, in post-build steps. On matrix builds.
          Hide
          owenmehegan Owen Mehegan added a comment -

          The problem with triggering only if a properties file exists is, in a matrix job I have to copy the file from the slave to the master before I can trigger on it. Just an annoying extra post-build step in every job.

          Show
          owenmehegan Owen Mehegan added a comment - The problem with triggering only if a properties file exists is, in a matrix job I have to copy the file from the slave to the master before I can trigger on it. Just an annoying extra post-build step in every job.
          Hide
          ikedam ikedam added a comment -

          Now Flexible Publish plugin 0.11 supports build triggers and multi-configuration projects.
          Please try it!

          Show
          ikedam ikedam added a comment - Now Flexible Publish plugin 0.11 supports build triggers and multi-configuration projects. Please try it!

            People

            • Assignee:
              ikedam ikedam
              Reporter:
              owenmehegan Owen Mehegan
            • Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: