Update Jenkinsfile

This commit is contained in:
Mihai Georgescu 2023-11-28 12:16:58 +02:00 committed by GitHub
parent 3f22324595
commit 2d86de799a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

5
Jenkinsfile vendored
View file

@ -48,8 +48,7 @@ pipeline {
steps { steps {
script { script {
echo "now we will tag the docker image" echo "now we will tag the docker image"
def dockerTag = sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim() sh "docker tag imagine_spring_petclinic:0.1 mihaivalentingeorgescu/mr:0.1"
echo "The tag used for Docker image: ${dockerTag}"
} }
} }
} }
@ -62,7 +61,7 @@ pipeline {
stage('Push to DockerHub') { stage('Push to DockerHub') {
steps { steps {
echo "now we will push to the docker file" echo "now we will push to the docker file"
sh 'docker push mihaivalentingeorgescu/imagine_spring_petclinic:0.1' sh 'docker push mihaivalentingeorgescu/mr:0.1'
} }
} }
stage('Change stages') { stage('Change stages') {