Given the creation of jenkins 2.1 build, Jenkins introduces an env variable in node{} . For example, BRANCH_NAME can be obtained using
node { echo ${env.BRANCH_NAME} ...
I want to highlight all the env properties as part of a jenkins project.
I am looking for code like
node { for(e in env){ echo e + " is " + ${e} } ...
which will resemble something like
BRANCH_NAME is myBranch2 CHANGE_ID is 44 ...
jenkins groovy jenkins-pipeline
JamesThomasMoon1979 May 7 '16 at 12:35 a.m. 2016-05-07 00:35
source share