From f61ab0a514ccf99a25d5d9fbb485aab6d30950e9 Mon Sep 17 00:00:00 2001 From: TomPGrid Date: Fri, 28 Feb 2025 13:09:48 +0100 Subject: [PATCH] changed how push is invoked --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c6c1a2576..3a5879c9b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,9 +42,9 @@ pipeline { def docker_image=docker.build("mr:8084/spring-petclinic:$GIT_COMMIT") sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084' - - docker_image.push() - sh 'docker push mr:8084/spring-petclinic:$GIT_COMMIT' + docker.withRegistry('mr:8084') { + docker_image.push() + } } } }