Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
pipeline {
agent any
stages{
stage('Build'){
steps {
sh 'mvn clean package'
}
post {
success {
echo 'Now Archiving...'
archiveArtifacts artifacts: '**/target/*.war'
}
}
}
stage ('Deploy to Staging'){
steps {
build job: 'Deploy-to-staging'
}
}

stage ('Deploy to Production'){
steps{
timeout(time:5, unit:'DAYS'){
input message:'Approve PRODUCTION Deployment?'
}

build job: 'Deploy-to-Prod'
}
post {
success {
echo 'Code deployed to Production.'
}

failure {
echo ' Deployment failed.'
}
}
}


}
}