Skip to content

Instantly share code, notes, and snippets.

@kenrachynski
Created May 3, 2019 18:11
Show Gist options
  • Select an option

  • Save kenrachynski/83f18cf00d01f5273ff47f639f565023 to your computer and use it in GitHub Desktop.

Select an option

Save kenrachynski/83f18cf00d01f5273ff47f639f565023 to your computer and use it in GitHub Desktop.
Jenkins Input to deploy to prod
pipeline {
agent {
label 'aws'
}
tools {
maven 'Maven35'
jdk 'jdk-1.8.0-aws'
}
stages {
stage('Build') {
steps {
checkout scm
// build site steps
}
}
stage('Deploy Development') {
when { not { branch 'master' } }
steps {
// deployment steps
}
}
stage('Deploy Production') {
when { branch 'master' }
parallel {
stage('Release') {
input {
message "Permission to deploy to production server?"
}
steps {
// deployment steps
}
}
}
}
}
post {
always {
// use a Shared Pipeline Library function
sendNotifications currentBuild.currentResult
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment