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

Upgrade to 1.651.2 or 2.6.x breaks 'Parameters from properties file' in 'Parameterized Trigger' plugin

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • Jenkins 1.651.2 or 2.6
      Parameterized Trigger Plugin 2.30

      Works in Jenkins 1.651.1

      Upgrade to 1.651.2 or 2.6.x breaks 'Parameters from properties file' in 'Parameterized Trigger' plugin. Steps to recreate:
      - Create two Jenkins projects: proj1 and proj2
      - In proj1: add a build step to 'Trigger/call builds on other projects', specify proj2, click 'Add Parameters' and select 'Parameters from properties', specify a valid properties file
      - Build proj1 which should trigger proj2
      - Check environment variables for proj2, the variables=values from the properties file is not present.

      Again, works fine in Jenkins 1.651.1

          [JENKINS-35113] Upgrade to 1.651.2 or 2.6.x breaks 'Parameters from properties file' in 'Parameterized Trigger' plugin

          Bryce Schober added a comment -

          I have this problem on Jenkins 1.651.2 as well. Unfortunately, I already discarded my old data, so I'm not sure I can downgrade.

          I tried setting keepUndefinedParameters to true as a test mentioned in for SECURITY-170, but that didn't change things.

          And when I try println(hudson.model.ParametersAction.keepUndefinedParameters), I get a groovy.lang.MissingPropertyException

          Bryce Schober added a comment - I have this problem on Jenkins 1.651.2 as well. Unfortunately, I already discarded my old data, so I'm not sure I can downgrade. I tried setting keepUndefinedParameters to true as a test mentioned in for SECURITY-170 , but that didn't change things. And when I try println(hudson.model.ParametersAction.keepUndefinedParameters) , I get a groovy.lang.MissingPropertyException

          The plugin did not appear to work for me on fresh installations of Jenkins versions 1.651.2 or 1.651.3 (courtesy of Docker). It worked fine with 1.651.1.

          Printing environment variables with env did not show the preset variables from the upstream job and the parameters link on the job page showed an empty Parameters window.

          However, the Jenkins logs showed:

          Oct 25, 2016 3:39:00 PM hudson.model.ParametersAction filter
          WARNING: Skipped parameter `foo` as it is undefined on `DOWNSTREAM_JOB`. 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
          

          Running Jenkins with:

          java -Dhudson.model.ParametersAction.keepUndefinedParameters=true -jar /usr/share/jenkins/jenkins.war
          

          solved the problem.

          I think the plugin page needs updating to mention this change in plugin behaviour or to make it more visible if it does already.

          Johnny Baloney added a comment - The plugin did not appear to work for me on fresh installations of Jenkins versions 1.651.2 or 1.651.3 (courtesy of Docker ). It worked fine with 1.651.1 . Printing environment variables with env did not show the preset variables from the upstream job and the parameters link on the job page showed an empty Parameters window. However , the Jenkins logs showed: Oct 25, 2016 3:39:00 PM hudson.model.ParametersAction filter WARNING: Skipped parameter `foo` as it is undefined on `DOWNSTREAM_JOB`. 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 Running Jenkins with: java -Dhudson.model.ParametersAction.keepUndefinedParameters=true -jar /usr/share/jenkins/jenkins.war solved the problem. I think the plugin page needs updating to mention this change in plugin behaviour or to make it more visible if it does already.

          Stephan Krull added a comment -

          @huybrechts, ci_jenkinsci_org: Any news on that one? I think it is important to add a note to the WIKI page, at least. It is more adviseable to fix any outstanding implementations for SECURITY-170 (see here).

          Stephan Krull added a comment - @ huybrechts , ci_jenkinsci_org : Any news on that one? I think it is important to add a note to the WIKI page, at least. It is more adviseable to fix any outstanding implementations for SECURITY-170 (see here ).

          Oleg Nenashev added a comment -

          Closing as a duplicate

          Oleg Nenashev added a comment - Closing as a duplicate

            huybrechts huybrechts
            tuttul Shah Chowdhury
            Votes:
            7 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: