Jenkins Global environment variables in Jenkinsfile

后端 未结 5 1125
深忆病人
深忆病人 2021-02-05 06:17

How do I invoke Global environment variables in Jenkinsfile?
For example, if I have a variable -

 name:credentialsId 
 value:xxxx-xxxx-xxxxx-xxxxxxxxx
         


        
5条回答
  •  醉话见心
    2021-02-05 06:34

    Another syntax is $ENV:xxxx

    node {
    echo "Running $ENV.BUILD_ID on $ENV.JENKINS_URL" }
    

    This worked for me

提交回复
热议问题