Steps to reproduce:

      1. Create freestyle job and select the "Create Delivery Pipeline version" option (providing something like foo.${BUILD_NUMBER} in the Template field.
      2. Create a matrix build, with one user-defined axis and one input string parameter.
      3. Trigger the matrix build as a post-build step from the freestyle job, passing in the single parameter.

      Although everything runs okay, jenkins.err.log will show several errors about skipping parameters.

      {{Sep 08, 2016 9:03:26 AM hudson.model.ParametersAction filter
      WARNING: Skipped parameter `INPUT` as it is undefined on `Sandbox/Matrix/Downstream/AXIS=64`. Set `-Dhudson.model.ParametersAction.keepUndefinedParameters`=true to allow undefined parameters to be injected as environment variables or `-Dhudson.model.ParametersAction.safeParameters=[comma-separated list]` to whitelist specific parameter names, even though it represents a security breach
      Sep 08, 2016 9:03:26 AM hudson.model.ParametersAction filter
      WARNING: Skipped parameter `PIPELINE_VERSION` as it is undefined on `Sandbox/Matrix/Downstream/AXIS=64`. Set `-Dhudson.model.ParametersAction.keepUndefinedParameters`=true to allow undefined parameters to be injected as environment variables or `-Dhudson.model.ParametersAction.safeParameters=[comma-separated list]` to whitelist specific parameter names, even though it represents a security breach}}

          [JENKINS-38062] "Create Delivery Pipeline version" errors

          A Result of this error seems to be that the PIPELINE_VERSION environment variable is not available to following build steps in the build job that creates the variable. But it appears on the pipeline view if used in the pipeline task description field.

          I have a local Jenkins v1.639 instance where this works and the PIPELINE_VERSION environment variable can be used by following build steps.
          The same build job on my local Jenkins v2.7.4 instance with the same configuration fails when I try to access PIPELINE_VERSION in following buildstep, because it is null. I can easily reproduce this with a minimal build job.

          Henrik Meinardus added a comment - A Result of this error seems to be that the PIPELINE_VERSION environment variable is not available to following build steps in the build job that creates the variable. But it appears on the pipeline view if used in the pipeline task description field. I have a local Jenkins v1.639 instance where this works and the PIPELINE_VERSION environment variable can be used by following build steps. The same build job on my local Jenkins v2.7.4 instance with the same configuration fails when I try to access PIPELINE_VERSION in following buildstep, because it is null. I can easily reproduce this with a minimal build job.

          Additional note: The error appears from Jenkins 1.651.2 onward. 1.651.1 runs without problems. Maybe this is somehow connected to JENKINS-34540.

          Henrik Meinardus added a comment - Additional note: The error appears from Jenkins 1.651.2 onward. 1.651.1 runs without problems. Maybe this is somehow connected to JENKINS-34540 .

          Henrik Meinardus added a comment - - edited

          I dug a bit further in the commit history. This incompatibility was introduced by resolving SECURITY-170 (commit 57a82505f4dc5de97c57ad1f340561ad9f0159c5 and its follow-up) and can be worked around - as suggested in the warning - by starting the Jenkins Java process with the following additional parameter:

          -Dhudson.model.ParametersAction.safeParameters=PIPELINE_VERSION
          

          Maybe this should be documented on the plugin wiki page until it is fixed?

          Henrik Meinardus added a comment - - edited I dug a bit further in the commit history. This incompatibility was introduced by resolving SECURITY-170 (commit 57a82505f4dc5de97c57ad1f340561ad9f0159c5 and its follow-up) and can be worked around - as suggested in the warning - by starting the Jenkins Java process with the following additional parameter: -Dhudson.model.ParametersAction.safeParameters=PIPELINE_VERSION Maybe this should be documented on the plugin wiki page until it is fixed?

          FYI - yes you can work around the error message for PIPELINE_VERSION, but what is strange is that we see parameter errors for every parameter that we're sending downstream as well. You have to do the blanket override to get work around this right now.

          -Dhudson.model.ParametersAction.keepUndefinedParameters=true
          

          Christopher Shannon added a comment - FYI - yes you can work around the error message for PIPELINE_VERSION, but what is strange is that we see parameter errors for every parameter that we're sending downstream as well. You have to do the blanket override to get work around this right now. -Dhudson.model.ParametersAction.keepUndefinedParameters= true

          JENKINS-34805 didn't solve the problem

          Arnaud Héritier added a comment - JENKINS-34805  didn't solve the problem

          Tommy Tynjä added a comment -

          Backwards compatibility for delivery pipeline plugin 0.9.9 and older has been dropped as of 92d7fc6 by removing support for resolving version ParametersAction. Will be part of the next release of the delivery pipeline plugin.

          Tommy Tynjä added a comment - Backwards compatibility for delivery pipeline plugin 0.9.9 and older has been dropped as of 92d7fc6 by removing support for resolving version ParametersAction. Will be part of the next release of the delivery pipeline plugin.

          Tommy Tynjä added a comment -

          Delivery Pipeline plugin fix released in delivery pipeline plugin 1.4.0.

          Tommy Tynjä added a comment - Delivery Pipeline plugin fix released in delivery pipeline plugin 1.4.0.

            patbos Patrik Boström
            w60001 Christopher Shannon
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: