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

Environment variables are NOT passed further build steps when using "Block until the triggered projects finish their builds"

XMLWordPrintable

      In section Usage as a Build step in https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin its mentioned that, When using the Trigger/Call builds on another project item. If the trigger is configured with the Block until the triggered projects finish their builds enabled, the following Environment variables are made available for further build steps

      • LAST_TRIGGERED_JOB_NAME="Last project started"
      • TRIGGERED_BUILD_NUMBER_<project name>="Last build number triggered"

      version 2.17 onwards

      • TRIGGERED_JOB_NAMES="Comma separated list of all triggered projects"
      • TRIGGERED_BUILD_NUMBERS_<project name>="Comma separated list of build numbers triggered"
      • TRIGGERED_BUILD_RESULT_<project name>="Last triggered build result of project"
      • TRIGGERED_BUILD_RESULT_<project name>RUN<build number>="Result of triggered build for build number"
      • TRIGGERED_BUILD_RUN_COUNT_project name>="Number of builds triggered for the project"

      I tried configuring one upstream and downstream job. But I don’t see these ENV variables being passed to downstream jobs?

      PS: I am checking for these ENV variables in Build step of downstream job like 'env|grep TRIGGERED'

            huybrechts huybrechts
            dilipm79 Dilip Mahadevappa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: