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

Parameters are not passed to child jobs in multi-configuration projects

      Parameters passed to a multi-configuration job are, apparently, filtered out before being passed through to child builds. This problem does not exhibit on freestyle jobs.

      Steps to reproduce:

      1. Create a multi-configuration job
      2. Add a single parameter named SERIAL
      3. Add a single axis (of any name)
      4. Add an "Execute shell" task with "set -eux; echo $SERIAL"
      5. Run the job, setting a SERIAL
      6. Observe failure

      This appears to have been introduced in 1.651.2 (presumably as part of the parameter filtering changes).

          [JENKINS-34758] Parameters are not passed to child jobs in multi-configuration projects

          Daniel Watkins created issue -

          Indeed, this seems to be specific to matrix jobs. From the Jenkins log:

          May 12, 2016 12:13:23 PM hudson.model.ParametersAction filter
          WARNING: Skipped parameter `MY_PARAM` as it is undefined on `some-matrix-job/SOME_AXIS=foo`
          

          Christopher Orr added a comment - Indeed, this seems to be specific to matrix jobs. From the Jenkins log: May 12, 2016 12:13:23 PM hudson.model.ParametersAction filter WARNING: Skipped parameter `MY_PARAM` as it is undefined on `some-matrix-job/SOME_AXIS=foo`
          Christopher Orr made changes -
          Component/s New: matrix-project-plugin [ 18765 ]
          Component/s Original: core [ 15593 ]
          Daniel Watkins made changes -
          Labels New: lts

          Owen Mehegan added a comment -

          You sunk my battleship! Er, I mean, broke all my matrix jobs!

          Owen Mehegan added a comment - You sunk my battleship! Er, I mean, broke all my matrix jobs!
          Ian Norton made changes -
          Link New: This issue is duplicated by JENKINS-34787 [ JENKINS-34787 ]

          Ian Norton added a comment -

          I notice freestyle jobs still work

          Ian Norton added a comment - I notice freestyle jobs still work

          Ian Norton added a comment - - edited

          Yes, I confirm exactly the same log entries for me:

          May 13, 2016 8:30:12 AM WARNING hudson.model.ParametersAction filter
          Skipped parameter `TRIFFID_FILE` as it is undefined on `MatrixParamsTest/platforms=linux-libc6.11-amd64`. 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
          

          Adding -Dhudson.model.ParametersAction.keepUndefinedParameters=true to my JAVA_ARGS lets my matrix job see the parameters!

          Ian Norton added a comment - - edited Yes, I confirm exactly the same log entries for me: May 13, 2016 8:30:12 AM WARNING hudson.model.ParametersAction filter Skipped parameter `TRIFFID_FILE` as it is undefined on `MatrixParamsTest/platforms=linux-libc6.11-amd64`. 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 Adding -Dhudson.model.ParametersAction.keepUndefinedParameters=true to my JAVA_ARGS lets my matrix job see the parameters!

          Josh Moore added a comment -

          Just to add 2cents on the severity of this:

          rm -rf $OMERO_DATA_DIR/*

          reduced to:

          rm -rf /*

          And removed all files that the Jenkins users had access to.

          Josh Moore added a comment - Just to add 2cents on the severity of this: rm -rf $OMERO_DATA_DIR/* reduced to: rm -rf /* And removed all files that the Jenkins users had access to.

          Ian Norton added a comment -

          jamoore yikes! my condolences!

          Ian Norton added a comment - jamoore yikes! my condolences!

            amuniz Antonio Muñiz
            odd_bloke Daniel Watkins
            Votes:
            29 Vote for this issue
            Watchers:
            43 Start watching this issue

              Created:
              Updated:
              Resolved: