Hi,

I nbeed in a jenkins pipeline to have an access to a http_proxy.


In my environment variables in my Jenkinsfile I've etted my http proxy and 
an env var named TOTO, then in one of my steps I checked if env var exists:

environment {
    ...
        
        http_proxy = 'http://xxx:xxx'
        ...
        TOTO='titi'
    }
...
stages {
        stage('xxx') {
            when { anyOf { branch "${env.STABLE_BRANCH}"; branch 
"${http://env.DEV _BRANCH}" } }
    steps {
                            sh 'env'
                            sh 'env | grep TOTO'
                            sh 'env | grep http_proxy'
    }
}
    }

Résultats : 

[...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 eists but not http proxy ?!

I need this http proxy in my pipeline. is it something i missed?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/247ced4e-4874-48c8-8470-7d6fd33c0d24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to