main
Cizz22 1 year ago
parent 62563442c3
commit 321304276e

4
Jenkinsfile vendored

@ -67,7 +67,7 @@ pipeline {
try { try {
sh """ sh """
# Push both tags # Push both tags
docker rmi ${DOCKER_HUB_USERNAME}/${IMAGE_NAME}:${commitHash} docker rmi ${DOCKER_HUB_USERNAME}/${IMAGE_NAME}:${GIT_COMMIT_HASH}
docker rmi ${DOCKER_HUB_USERNAME}/${IMAGE_NAME}:latest docker rmi ${DOCKER_HUB_USERNAME}/${IMAGE_NAME}:latest
""" """
} catch (err) { } catch (err) {
@ -76,7 +76,7 @@ pipeline {
} }
} }
success { success {
echo "Successfully built and pushed Docker image with tags: latest and ${commitHash}" echo "Successfully built and pushed Docker image with tags: latest and ${GIT_COMMIT_HASH}"
} }
failure { failure {
echo 'Failed to build/push Docker image!' echo 'Failed to build/push Docker image!'

Loading…
Cancel
Save