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

Multibranch Pipeline jobs lack executor's environment variables

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • core, pipeline
    • None
    • Jenkins 2.303.3
      Pipeline 2.7
      Pipeline: Multibranch 716.vc692a_e52371b_

      As seen in Freestyle jobs, a run has access to all environment variables of the executor (also optionally configured in the node configuration). This is not the case for multibranch pipelines. They merely get the environment variables that are dynamically set by Jenkins. 

       

      How to reproduce this bug:

      • Setup a Jenkins instance with Pipeline plugin.
      • Create a freestyle job and a pipeline job.
      • Set a break point here: jenkins/Run.java at master · jenkinsci/jenkins (github.com).
      • Run Jenkins in Debug mode and compare the populated environment variables. Freestlye jobs will have access to the node's env vars, pipeline not. 

            meiswjn Jan
            meiswjn Jan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: