Created
May 3, 2019 18:11
-
-
Save kenrachynski/83f18cf00d01f5273ff47f639f565023 to your computer and use it in GitHub Desktop.
Jenkins Input to deploy to prod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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