changed how push is invoked

This commit is contained in:
TomPGrid 2025-02-28 13:18:36 +01:00
parent f61ab0a514
commit 935ce0c7aa

11
Jenkinsfile vendored
View file

@ -39,11 +39,12 @@ pipeline {
}
steps {
checkout scm
def docker_image=docker.build("mr:8084/spring-petclinic:$GIT_COMMIT")
sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084'
docker.withRegistry('mr:8084') {
docker_image.push()
script {
def docker_image=docker.build("mr:8084/spring-petclinic:$GIT_COMMIT")
sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084'
docker.withRegistry('mr:8084') {
docker_image.push()
}
}
}
}