environment { //定义在stage中的变量只会在当前stage生效,其他的stage不会生效 HARBOR = ' ' } steps { sh "env" } } stage('env2') { steps { sh "env" } } }}