-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
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.
I think the problem is even worst.
Having no_proxy in the jenkins user environment on the slave, it disappears within the pipeline !