-
Bug
-
Resolution: Duplicate
-
Minor
-
None
pipeline {
agent any
environment {
buildUser = '';
}
tools {
maven 'M3'
}
stages {
stage('build user') {
steps {
wrap([$class: 'BuildUser']) {
sh 'echo "${BUILD_USER}"'
script {
buildUser = "${BUILD_USER}";
echo env.BUILD_USER_ID
try {
if(env.BUILD_USER_ID != 'admin'){
error '发布stop'
}
}catch(e) {
}
}
}
}
}
stage('bate') {
when {
expression {
return false
}
}
input {
message "deploy to pro?"
ok "Yes"
submitter "admin"
parameters {
string(name: 'isdeploy', defaultValue: '0', description: 'deploy')
}
}
steps {
script {
sh 'echo 1111 '
}
}
}
}
}
- duplicates
-
JENKINS-52745 Stage input runs before when conditional
- Fixed but Unreleased