adding deployment step to jenkisfile

This commit is contained in:
Natalia Villegas 2018-12-16 19:42:24 -03:00
parent 623a2b4e96
commit d39d496a42

17
Jenkinsfile vendored
View file

@ -22,6 +22,23 @@ pipeline {
} }
} }
stage('Run local container') {
agent any
steps {
sh 'docker rm -f natyramone/pet-clinic:latest || true'
sh 'docker run -d -p 8081:8080 natyramone/pet-clinic:latest'
}
}
stage('Push to dockerhub') {
agent any
steps {
sh 'docker push $DOCKER_USER/pet-clinic:latest'
}
}
} }
} }