Details
-
Bug
-
Status: Resolved (View Workflow)
-
Major
-
Resolution: Fixed
Description
Whenever envvar is available on slave (either inherited from system or configured on slave), its value can not be overridden during build by envvar contributing extension points:
- EnvironmentContributor
- BuildWrapper
- possibly others
This works correctly when envinject is not installed. The culprit seemsto be that EnvInjectPluginAction retains all envvars (not only those envinject contributed) early in the build and put this values back as it implements EnvironmentContributingAction. Any value that was overridden by a plugin is then reset to its original value.
Attachments
Issue Links
- blocks
-
JENKINS-27170 "Provide Node & npm bin/ folder to PATH" not working for "npm install"
-
- Closed
-
- is blocking
-
JENKINS-20177 XVnc plugin fails to set the DISPLAY variable properly if jenkins already
-
- Open
-
-
JENKINS-25839 $BEAKER_JOB_ID expanded to wrong value
-
- Resolved
-
-
JENKINS-23639 EnvInject squelches changes to $BUILD_DISPLAY_NAME made by build name setter plugin
-
- Closed
-
-
JENKINS-43593 NPM unable to locate node binary
-
- Closed
-
- is duplicated by
-
JENKINS-26302 REGRESSION: Node environment doesn't work
-
- Resolved
-
-
JENKINS-24406 'Inject variables as a build step' resets slave's system path
-
- Resolved
-
-
JENKINS-42323 NodeJS plugin 1.1.2 -- PATH not including node + npm
-
- Closed
-
-
JENKINS-42212 Incompatibility with EnvInject plugin
-
- Closed
-
- is related to
-
JENKINS-25946 Build environment contributed by extension points can override characteristic env-vars
-
- Open
-
- relates to
-
JENKINS-41762 NodeJS plugin not updating PATH as expected
-
- Closed
-
- links to
Code changed in jenkins
User: Oliver Gondža
Path:
src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java
src/test/java/org/jenkinsci/plugins/envinject/BuildCauseRetrieverTest.java
src/test/java/org/jenkinsci/plugins/envinject/EnvInjectActionTest.java
http://jenkins-ci.org/commit/envinject-plugin/2948c711b05b68c6a94c334c26fe4e6fdcecda9f
Log:
[FIXED JENKINS-26583] Do not capture slave variables