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

Regression, Promoted builds plugin not expanding job parameters on immediate promote after build.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • promoted-builds-plugin
    • None
    • Linux

      Up until upgrading to 2.17 I could reference my build parameters (from "This build is parameterized" section). Now these parameters are silently replace with empty strings when the promotion is run automatically after the build.
      If I run the promotion again, it works.

      From the promotion job:
      ${RELEASES}/${PROMOTED_NUMBER}/${CONFIG}/develop-${CONFIG}-${PROMOTED_NUMBER}.ipa

      I logged the env for a promotion run immediately after and one run later manually.
      For the immediate case, all my parameters above, CONFIG, RELEASES are null whereas they are correct for the later manual invocation.

      Note that promoted builds specific parameters are OK, it's just all the rest that are not.

      What makes this worse is that the jenkins updater doesn't offer a downgrade option for this plugin.

          [JENKINS-22679] Regression, Promoted builds plugin not expanding job parameters on immediate promote after build.

          Bruce Edge created issue -

          Bruce Edge added a comment -

          Confirmed that reverting to 2.15 fixes the problem.

          For anyone else hitting this, download the source from here:
          https://github.com/jenkinsci/promoted-builds-plugin/archive/promoted-builds-2.15.tar.gz
          unpack, mvn clean package, then copy promoted-builds-plugin-promoted-builds-2.15/target/promoted-builds.hpi to JENKINS_ROOT/plugins.promoted-builds.jpi
          note the extension change.

          Bruce Edge added a comment - Confirmed that reverting to 2.15 fixes the problem. For anyone else hitting this, download the source from here: https://github.com/jenkinsci/promoted-builds-plugin/archive/promoted-builds-2.15.tar.gz unpack, mvn clean package, then copy promoted-builds-plugin-promoted-builds-2.15/target/promoted-builds.hpi to JENKINS_ROOT/plugins.promoted-builds.jpi note the extension change.

          Jamey Graham added a comment - or, instead of building... http://updates.jenkins-ci.org/download/plugins/promoted-builds/2.15/promoted-builds.hpi https://wiki.jenkins-ci.org/display/JENKINS/Plugins#Plugins-Byhand

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/matrix/FilterScript.java
          http://jenkins-ci.org/commit/matrix-project-plugin/a40e83f731884c05fc15af13786d4306aec127a0
          Log:
          Merge pull request #1 from mc1arke/JENKINS-22679

          [FIXED JENKINS-22879] Fix Groovy classloading issue.

          Compare: https://github.com/jenkinsci/matrix-project-plugin/compare/51ac5ab4ef3a...a40e83f73188

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/matrix/FilterScript.java http://jenkins-ci.org/commit/matrix-project-plugin/a40e83f731884c05fc15af13786d4306aec127a0 Log: Merge pull request #1 from mc1arke/ JENKINS-22679 [FIXED JENKINS-22879] Fix Groovy classloading issue. Compare: https://github.com/jenkinsci/matrix-project-plugin/compare/51ac5ab4ef3a...a40e83f73188

          Bruce Edge added a comment -

          Problem still exists in jenkins update site.

          What's needed to get the above merge pull into the global plugin update site?

          Bruce Edge added a comment - Problem still exists in jenkins update site. What's needed to get the above merge pull into the global plugin update site?

          Wilco Greven added a comment - - edited

          This seems to be caused by the fix for JENKINS-22005. Reverting to 2.16 fixes the problem. I can reproduce the issue using the following steps:

          1) Create a job job1 with a string parameter named param1.
          2) Create a job job2 with a string parameter named param1.
          3) Create a job job3 with a string parameter named param1.
          4) Add a promotion process promotion1 to job3 with criteria 'Only when manually approved'. Add an action 'Trigger parameterized build on other projects' to the promotion which triggers job1 with predefined parameters 'param1=${param1}'.
          5) Add a promotion process promotion2 to job3 with criteria 'When the following downstream projects build successfully' on downstream project job1. Add an action 'Trigger parameterized build on other projects' to the promotion which triggers job2 with predefined parameters 'param1=${param1}'.
          6) Run job3 with param1=someString.
          7) Manually approve promotion1. You will see that job1 is correctly run with param1=someString.
          8) Promotion process promotion2 will now automatically start job2. But job2 will be run with param1=${param1} which is not correct.

          Wilco Greven added a comment - - edited This seems to be caused by the fix for JENKINS-22005 . Reverting to 2.16 fixes the problem. I can reproduce the issue using the following steps: 1) Create a job job1 with a string parameter named param1. 2) Create a job job2 with a string parameter named param1. 3) Create a job job3 with a string parameter named param1. 4) Add a promotion process promotion1 to job3 with criteria 'Only when manually approved'. Add an action 'Trigger parameterized build on other projects' to the promotion which triggers job1 with predefined parameters 'param1=${param1}'. 5) Add a promotion process promotion2 to job3 with criteria 'When the following downstream projects build successfully' on downstream project job1. Add an action 'Trigger parameterized build on other projects' to the promotion which triggers job2 with predefined parameters 'param1=${param1}'. 6) Run job3 with param1=someString. 7) Manually approve promotion1. You will see that job1 is correctly run with param1=someString. 8) Promotion process promotion2 will now automatically start job2. But job2 will be run with param1=${param1} which is not correct.

          Robert Liotta added a comment -

          Hello.

          I just updated to the 2.18 SNAPSHOT that was posted a few days back to fix the re-execute button. I have now run into this issue. Will this get fixed for 2.18?

          Robert Liotta added a comment - Hello. I just updated to the 2.18 SNAPSHOT that was posted a few days back to fix the re-execute button. I have now run into this issue. Will this get fixed for 2.18?

          Steve Jansen added a comment -

          Confirmed reverting to 2.16 fixes the problem for me.

          Steve Jansen added a comment - Confirmed reverting to 2.16 fixes the problem for me.
          Bruce Edge made changes -
          Link New: This issue is duplicated by JENKINS-22094 [ JENKINS-22094 ]

          Hi, I've prepared a pull request with a fix for the issue described. I would kindly appreciate any committer picking it up

          https://github.com/jenkinsci/promoted-builds-plugin/pull/50

          Bartosz Czerwinski added a comment - Hi, I've prepared a pull request with a fix for the issue described. I would kindly appreciate any committer picking it up https://github.com/jenkinsci/promoted-builds-plugin/pull/50

            Unassigned Unassigned
            bedge Bruce Edge
            Votes:
            19 Vote for this issue
            Watchers:
            27 Start watching this issue

              Created:
              Updated: