pp2-demo-setenv-script

1
2
3
4
5
6
7
8
9
10
11
12
13
14
node {
stage('set-env'){
echo 'going to git clone......'
git url: 'https://gitee.com/roclli/6-setting-env.git'
echo "going to build.........."
echo "---1:${tool 'M3'}---"
withEnv(["PATH_MAVEN=${tool 'M3'}/bin"]){
echo "---2:${PATH_MAVEN}---"
sh "${PATH_MAVEN}/mvn -B verify || true"
sh "printenv"
}
}

}