declarative pipeline
those test only send the default branch lastest commit id
${var} => read local var
${params.var} => read from params
${env.var} => read enviroment var
2a. each bash is new environment, its env variables are copied from the outer runtime.
2b. local varible declare in script block
w/ def : scope within this script block
w/o def: global var
2c. order of searching variable: local(def)-> global -> params -> env
clone,pull:
ps. name can replace with git commit id
push:
double quote script for groovy templatable String(replace var by groovy)
communicate with bash,echo for standard output to params,
trim for unpredictable blank string
for create new folder (ex. for multi_repo checkout)
p.s. blank block are forbidden
jenkins
declarative pipeline