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.

          Bartosz Czerwinski added a comment - - edited

          Not sure... at that time I was told that there was another pull request fixing the issue with preferable solution, but it seems it hasn't been merged and it is still pending in open state (https://github.com/jenkinsci/promoted-builds-plugin/pull/49). Welcome to open-source world

          Bartosz Czerwinski added a comment - - edited Not sure... at that time I was told that there was another pull request fixing the issue with preferable solution, but it seems it hasn't been merged and it is still pending in open state ( https://github.com/jenkinsci/promoted-builds-plugin/pull/49 ). Welcome to open-source world

          Bruce Edge added a comment -

          Here's some more info form a promotion log:

          build BapSshPromotionPublisherPlugin[delegate=BapSshPublisherPlugin[consolePrefix=SSH: ,delegate=BPInstanceConfig[publishers=[BapSshPublisher[configName=boot-1.qa,verbose=false,transfers=[BapSshTransfer[sourceFiles=*,excludes=,removePrefix=,remoteDirectory=${PROJECT}/${BRANCH}/QA/${BUILD_NUMBER},remoteDirectorySDF=false,flatten=false,cleanRemote=false,noDefaultExcludes=false,makeEmptyDirs=false,patternSeparator=[, ]+,execCommand=,execTimeout=120000,pseudoTty=false]],useWorkspaceInPromotion=false,usePromotionTimestamp=false,retry=<null>,label=<null>,credentials=<null>]],continueOnError=false,failOnError=false,masterNodeName=<null>,alwaysPublishFromMaster=false,paramPublish=<null>]]] SUCCES

          note the "remoteDirectory=${PROJECT}/${BRANCH}/QA/${BUILD_NUMBER},"

          Bruce Edge added a comment - Here's some more info form a promotion log: build BapSshPromotionPublisherPlugin[delegate=BapSshPublisherPlugin[consolePrefix=SSH: ,delegate=BPInstanceConfig[publishers=[BapSshPublisher[configName=boot-1.qa,verbose=false,transfers=[BapSshTransfer[sourceFiles=*,excludes=,removePrefix=,remoteDirectory=${PROJECT}/${BRANCH}/QA/${BUILD_NUMBER},remoteDirectorySDF=false,flatten=false,cleanRemote=false,noDefaultExcludes=false,makeEmptyDirs=false,patternSeparator= [, ] +,execCommand=,execTimeout=120000,pseudoTty=false]],useWorkspaceInPromotion=false,usePromotionTimestamp=false,retry=<null>,label=<null>,credentials=<null>]],continueOnError=false,failOnError=false,masterNodeName=<null>,alwaysPublishFromMaster=false,paramPublish=<null>]]] SUCCES note the "remoteDirectory=${PROJECT}/${BRANCH}/QA/${BUILD_NUMBER},"

          Wilco Greven added a comment -

          Yep, it's waiting there for almost half a year now. It's pretty frustrating that it still hasn't been merged.

          Wilco Greven added a comment - Yep, it's waiting there for almost half a year now. It's pretty frustrating that it still hasn't been merged.

          Andy Smith added a comment - - edited

          Getting hit by this (I believe), cannot take EnvInject values in my promotion step

          Andy Smith added a comment - - edited Getting hit by this (I believe), cannot take EnvInject values in my promotion step

          Code changed in jenkins
          User: Wilco Greven
          Path:
          src/main/java/hudson/plugins/promoted_builds/Promotion.java
          src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
          src/test/java/hudson/plugins/promoted_builds/conditions/SelfPromotionTest.java
          http://jenkins-ci.org/commit/promoted-builds-plugin/80156830fe9a6da762bb6269b79c3f3b12dbede8
          Log:
          JENKINS-22679
          Don't skip passing the target build parameters to the promotion build when the promotion build doesn't have its own parameters.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wilco Greven Path: src/main/java/hudson/plugins/promoted_builds/Promotion.java src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java src/test/java/hudson/plugins/promoted_builds/conditions/SelfPromotionTest.java http://jenkins-ci.org/commit/promoted-builds-plugin/80156830fe9a6da762bb6269b79c3f3b12dbede8 Log: JENKINS-22679 Don't skip passing the target build parameters to the promotion build when the promotion build doesn't have its own parameters.

          Code changed in jenkins
          User: Steven Christou
          Path:
          src/main/java/hudson/plugins/promoted_builds/Promotion.java
          src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
          src/test/java/hudson/plugins/promoted_builds/conditions/SelfPromotionTest.java
          http://jenkins-ci.org/commit/promoted-builds-plugin/34157a212e757c4306fdd7be4db855f1b3351e3a
          Log:
          Merge pull request #49 from wgreven/JENKINS-22679

          JENKINS-22679 Pass the target build parameters to the promotion build when the promotion build doesn't have its own parameters.

          Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/726f7a0966f5...34157a212e75

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Steven Christou Path: src/main/java/hudson/plugins/promoted_builds/Promotion.java src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java src/test/java/hudson/plugins/promoted_builds/conditions/SelfPromotionTest.java http://jenkins-ci.org/commit/promoted-builds-plugin/34157a212e757c4306fdd7be4db855f1b3351e3a Log: Merge pull request #49 from wgreven/ JENKINS-22679 JENKINS-22679 Pass the target build parameters to the promotion build when the promotion build doesn't have its own parameters. Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/726f7a0966f5...34157a212e75

          Bruce Edge added a comment - - edited

          Still broken in 2.21 release.

          Was pull request #49 from wgreven/JENKINS-22679 not merged?

          Snippet from promotion log using 2.21 shows:
          + relpath=releases///QA/172

          reverting back to 2.15:
          + relpath=releases/Collections/develop/QA/172

          Note the lack of the "Collections" and "develop" strings in the 2.21 case.
          These are env-inject plugin variables.

          Bruce Edge added a comment - - edited Still broken in 2.21 release. Was pull request #49 from wgreven/ JENKINS-22679 not merged? Snippet from promotion log using 2.21 shows: + relpath=releases///QA/172 reverting back to 2.15: + relpath=releases/Collections/develop/QA/172 Note the lack of the "Collections" and "develop" strings in the 2.21 case. These are env-inject plugin variables.

          Raul Melo added a comment - - edited

          Still broken with env-inject vars and 2.22 version.

          PR #49
          vStone said: "This does not seem to fix variables that were inserted with envinject"
          wgreven-ibr respond: "No, it's a fix specific for the build parameters."

          Seems that the problem for this Issue is solved, Should we open a new BUG specific for env-inject?

          Raul Melo added a comment - - edited Still broken with env-inject vars and 2.22 version. PR #49 vStone said: "This does not seem to fix variables that were inserted with envinject" wgreven-ibr respond: "No, it's a fix specific for the build parameters." Seems that the problem for this Issue is solved, Should we open a new BUG specific for env-inject?

          Bruce Edge added a comment -

          Filed JENKINS-30772 for env-inject plugin. with reference to this bug.

          Bruce Edge added a comment - Filed JENKINS-30772 for env-inject plugin. with reference to this bug.

          Oleg Nenashev added a comment -

          Sorry, over last months I had no time to work on the plugin, because I had to focus on the Jenkins core and other projects. I also have not been using this plugin on my own since 2016. So I have decided to unassign the issues so that there is no expectation that I work on them anytime soon.

          Currently the plugin is being transfered to another maintainer. Hopefully he will have some time to finish triaging of the issues and maybe to deliver some fixes. But, as in any community-driven project, everybody is welcome to propose pull requests and to contribute to the plugin's state.

          Oleg Nenashev added a comment - Sorry, over last months I had no time to work on the plugin, because I had to focus on the Jenkins core and other projects. I also have not been using this plugin on my own since 2016. So I have decided to unassign the issues so that there is no expectation that I work on them anytime soon. Currently the plugin is being transfered to another maintainer. Hopefully he will have some time to finish triaging of the issues and maybe to deliver some fixes. But, as in any community-driven project, everybody is welcome to propose pull requests and to contribute to the plugin's state.

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

              Created:
              Updated: