jenkinsci / jenkinsci/durable-task-plugin
[JENKINS-41339] Environment variables referencing other variables broken
- Dominant language
- Java
- Stars
- 30
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
This seems to have broken fairly recently. I have a global PATH environment variable defined in Jenkins as follows:
PATH: /path/to/toolchain/bin:$PATH
Freestyle jobs work with this. An older version of the durable task plugin also worked. After updating to the latest, this pipeline job:
```
node('master', {
echo 'env.PATH=' + env.PATH
sh('env')
})
```
results in this output:
```
[Pipeline] node
Running on master in /var/lib/jenkins/workspace/pipeline bug
[Pipeline] {
[Pipeline] echo
env.PATH=/path/to/toolchain/bin:$PATH
[Pipeline] sh
[pipeline bug] Running shell script
nohup: failed to run command ‘sh’: No such file or directory
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE
```
---
Originally reported by jtatum, imported from: Environment variables referencing other variables broken
Raw content of original issue
This seems to have broken fairly recently. I have a global PATH environment variable defined in Jenkins as follows:
PATH: /path/to/toolchain/bin:$PATH
Freestyle jobs work with this. An older version of the durable task plugin also worked. After updating to the latest, this pipeline job:
node('master', {
echo 'env.PATH=' + env.PATH
sh('env')
})results in this output:
[Pipeline] node
Running on master in /var/lib/jenkins/workspace/pipeline bug
[Pipeline] {
[Pipeline] echo
env.PATH=/path/to/toolchain/bin:$PATH
[Pipeline] sh
[pipeline bug] Running shell script
nohup: failed to run command ‘sh’: No such file or directory
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE
environment
```
Jenkins 2.41
Durable task plugin 1.13
Centos 6.5
```
Contributor guide
Assessment
This issue has not been assessed yet.