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

Parameterized Trigger plugin not passing user created environment variables

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have an upstream Jenkins job which has a Powershell build step which passes a variable into the env.properties file using echo LATEST_BUILD_NUM_VAL=$LATEST_BUILD_NO_SLASH >> env.properties (NOTE: this is not the Jenkins build number but the one from our product under test). This is injected as an environment variable by an Inject Environment Variable build step. This user created environment variable appears to be being created successfully as it is shown in the builds environment variables list.

      I have then tried to pass this user created environment variable to a downstream job using the Parameterized Trigger plugin and this parameter: LATEST_BUILD_NUM = ${LATEST_BUILD_NUM_VAL} (NOTE: this is not the Jenkins build number but the one from our product under test).

      The issue is that although the user created environment variable value is present in the upstream build i.e. 165, all that gets passed to the downstream build as the matching environment variable is ${LATEST_BUILD_NUM_VAL}. To prove this is related to it a user created environment variable issue, if I pass a Jenkins created environment variable i.e.  LATEST_BUILD_NUM = ${JOB_BASE_NAME} the correct environment variable value Test-Job-Receiver gets passed to the downstream build.

      I am pretty confident that I am implementing this scenario correctly, so I can only come to the conclusion that this is a bug related to it being a user created environment variable.

        Attachments

          Activity

          Hide
          jimlin James Linehan added a comment -

          Hi,

          Please can someone investigate this issue, as it is causing us a major issue and preventing us from moving on with this part of the project.

          Regards,

          James

          Show
          jimlin James Linehan added a comment - Hi, Please can someone investigate this issue, as it is causing us a major issue and preventing us from moving on with this part of the project. Regards, James

            People

            • Assignee:
              Unassigned
              Reporter:
              jimlin James Linehan
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: