Skip to content

Commit

Permalink
Production tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vfarcic committed Jul 1, 2017
1 parent 2a5a5c2 commit 6da00f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Jenkinsfile
Expand Up @@ -27,8 +27,12 @@ pipeline {
stage("Production") {
steps {
sh "DOCKER_HOST=tcp://${env.PROD_IP}:2375 docker service update --image localhost:5000/go-demo:2.${env.BUILD_NUMBER} go-demo_main"
for (i = 0; i < 10; i++) {
try {
for (i = 0; i < 10; i++) {
sh "HOST_IP=${env.PROD_IP} docker-compose -f docker-compose-test-local.yml run --rm production"
}
} catch (e) {
sh "DOCKER_HOST=tcp://${env.PROD_IP}:2375 docker service update --rollback go-demo"
}
}
}
Expand Down

0 comments on commit 6da00f3

Please sign in to comment.