This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      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.

            Assignee:
            Unassigned
            Reporter:
            Aurélie Vache
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: