diff --git a/Jenkinsfile b/Jenkinsfile index 382b3a156..1d3d53af2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,7 +35,6 @@ pipeline { sh 'docker build -t $NEXUS_DOCKER_REPO/spring-petclinic:${GIT_COMMIT} .' } } - stage('Docker Login') { steps { echo 'Nexus Docker Repository Login' @@ -47,6 +46,12 @@ pipeline { } } } + stage('Docker Push') { + steps { + echo 'Pushing Image to docker hub' + sh 'docker push $NEXUS_DOCKER_REPO/spring-petclinic:${GIT_COMMIT}' + } + } } post {