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

Parameterized build parameters no longer available during promotion

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • promoted-builds-plugin
    • None
    • Jenkins ver. 2.7
      Promoted Builds plugin ver 2.2.7

      Following a migration from Jenkins 1.x to 2.2.7, the 'promoted build' plugin stopped replacing most of the variables that we rely on. The PROMOTED_* built-in variables (like $PROMOTED_USER_NAME and $PROMOTED_SVN_REVISION) still work just fine. And promotion parameters work fine, too.

      But parameters of the build being promoted are no longer replaced – the parameter text remains unchanged in the tasks executed during the promotion. The build parameters are still available during the initial build, but don't seem to be available during the promotion run.

      In our particular case, we're using the variables in the extended e-mail publisher during promotion, but I've also verified the same problem when using a simple shell script in the promotion.

          [JENKINS-36120] Parameterized build parameters no longer available during promotion

          FWIW, adding the hudson.model.ParametersAction.keepUndefinedParameters parameter (as documented in the Jenkins Security Advisory 2016-05-11) proved to be a suitable workaround for our scenarios.

          Patrick Conant added a comment - FWIW, adding the hudson.model.ParametersAction.keepUndefinedParameters parameter (as documented in the Jenkins Security Advisory 2016-05-11 ) proved to be a suitable workaround for our scenarios.

          Phil Johnson added a comment -

          We are experiencing this (or something very similar).

          We have a job that runs, compiles and tests. Prior to upgrade the injected paramaters to that 'build' job (from gradle.properties, like "version=<version>") were available to the downstream job in the promotion when we enabled "current build parameters" in the promotion configuration. They are no longer available in 2.24. This is more then an annoyance ... it's a workflow issue. I'd rather have the default security policy deal with the security setting as an "opt-in" for those servers running outside of a firewall (which seems pretty low volume).

          Phil Johnson added a comment - We are experiencing this (or something very similar). We have a job that runs, compiles and tests. Prior to upgrade the injected paramaters to that 'build' job (from gradle.properties, like "version=<version>") were available to the downstream job in the promotion when we enabled "current build parameters" in the promotion configuration. They are no longer available in 2.24. This is more then an annoyance ... it's a workflow issue. I'd rather have the default security policy deal with the security setting as an "opt-in" for those servers running outside of a firewall (which seems pretty low volume).

            Unassigned Unassigned
            pdconant Patrick Conant
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: