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

Inject the upstream's job's JOB_NAME and BUILD_NUMBER into downstream env.

XMLWordPrintable

      The target job should pre-define variables containing the job name and build number of the Job that causes the build.

      Example:

      • Upstream #3 promotes Downstream
      • Then in Downstream I have JENKINS_PROMOTING_JOB_NAME="Upstream" and JENKINS_PROMOTING_BUILD_NUMBER="3" defined

      This is useful where the downstream promotion should copy artifacts from the upstream project. The upstream's job name can be manually configured for the downstream job, but this is not possible when multiple upstream jobs should be able to trigger one downstream job.

      Currently I workaround this using the Jenkins CLI within a shell excecuting promotion where I trigger parameterized builds. But this is times slower than a "execute shell" promotion.

            Unassigned Unassigned
            tholewebgods Thomas Lehmann
            Votes:
            9 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: