diff --git a/Jenkinsfile b/Jenkinsfile index b0fc6efa5..5d8082803 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,5 +30,16 @@ pipeline { } } } + stage('Build Image') { + agent { + image 'docker:20.10.16' + args '--privileged -v /var/ryn/docker.sock:/var/run/docker.sock' + } + steps { + sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' + sh 'docker build -t mr:8084/spring-petclinic:$GITCOMMIT .' + sh 'docker push mr:8084/spring-petclinic:$GITCOMMIT' + } + } } }