Skip to content

Commit

Permalink
The last stages
Browse files Browse the repository at this point in the history
  • Loading branch information
rsandell committed May 18, 2017
1 parent 8eb6b53 commit f50257a
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,46 @@ pipeline {
})
}
}
stage('Build Container') {
agent {
docker {
image 'maven:3-alpine'
args '-v /root/.m2:/root/.m2 -v /var/run/docker.sock:/var/run/docker.sock'
}
}
when {
allOf {
branch "master"
branch "release-*"
}
}
steps {
unstash 'ws'
unstash 'war'
sh './mvnw -B docker:build'
}
}
stage('Deploy to Staging') {
agent any
when {
allOf {
branch "master"
branch "release-*"
}
}
steps {
echo "Let's pretend a deployment is happening"
}
}
stage('Deploy to production') {
agent any
when {
branch "release-*"
}
steps {
input message: 'Deploy to production?', ok: 'Fire zee missiles!'
echo "Let's pretend a production deployment is happening"
}
}
}
}

0 comments on commit f50257a

Please sign in to comment.