Details
-
Bug
-
Status: Resolved (View Workflow)
-
Major
-
Resolution: Not A Defect
-
None
-
Jenkins 2.303.3
Pipeline 2.7
Pipeline: Multibranch 716.vc692a_e52371b_
Description
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.
Fix: [JENKINS-68704] Give Multibranch pipelines access to environment variables by meiswjn · Pull Request #6626 · jenkinsci/jenkins (github.com)