-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: workflow-basic-steps-plugin
-
Environment:Jenkins 2.46.1
I setted-up in a jenkins pipeline some environment variables and tested to access them in a pipeline step:
environment {
...
http_proxy = 'http://xxx:xxx'
...
TOTO='titi'
}
...
stages {
stage('xxx') {
when { anyOf { branch "${env.STABLE_BRANCH}"; branch "${env.DEV_BRANCH}" } }
steps {
sh 'env'
sh 'env | grep TOTO'
sh 'env | grep http_proxy'
}
}
}
Â
[...S3MX7KBEQ] Running shell script
+ env
+ grep TOTO
TOTO=titi
[Pipeline] sh
[...S3MX7KBEQ] Running shell script
+ env
+ grep http_proxy
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
Â
TOTO var is well found but never http_proxy. I've tested to write http_proxy in uppercase too but same behavior.
Â
I've tested to setted http_proxy in withEnv but same behavior.
Â
Thanks.