pipeline {
agent none
stages {
stage('Build') {
steps {
echo " build1 "
}
}
stage('check if management signed off ? ') {
agent none
steps {
script {
env.GO_or_NO_GO = input message: 'User input required',
parameters: [choice(name: 'GO or no go today ', choices: 'YESnNO', description: 'Choose "yes" if we get signed off from manager')]
}
}
}
stage('after president say go ') {
agent none
when {
environment name: 'GO_or_NO_GO', value: 'YES'
}
steps {
echo "last step: begin deploy to production "
}
}
}
}