add input stage

This commit is contained in:
MovingToWeb
2019-07-19 22:25:35 +05:30
parent f43ea41133
commit ac94e042f4

23
Jenkinsfile vendored
View File

@@ -20,18 +20,31 @@ pipeline {
} }
} }
stage ('Deploy?') {
try {
input(
id: 'Proceed1', message: 'Proceed to Production deployment?', parameters: [
[$class: 'BooleanParameterDefinition', defaultValue: true, description: '', name: 'Please confirm deployment']
])
}
catch (Exception e) {
}
}
stage ('Deployment Stage') { stage ('Deployment Stage') {
steps { steps {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'PCF_LOGIN', withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'PCF_LOGIN',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) { usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
sh '/usr/local/bin/cf login -a http://api.run.pivotal.io -u $USERNAME -p $PASSWORD' sh '/usr/local/bin/cf login -a http://api.run.pivotal.io -u $USERNAME -p $PASSWORD'
sh '/usr/local/bin/cf push' sh '/usr/local/bin/cf push'
} }
} }
} }
} }