diff --git a/Jenkinsfile b/Jenkinsfile index 5fd62c2..d2cd8ce 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -49,14 +49,18 @@ pipeline { stage('Build docker image') { steps { echo 'Building image' - docker.build("${OWNER}/${IMAGE_NAME}:${TAG}") + script{ + docker.build("${OWNER}/${IMAGE_NAME}:${TAG}") + } } } stage('Push image to container registry') { steps { echo 'Pushing image to registry' - docker.withRegistry(REGISTRY_URL, GITEA_CREDS){ - docker.image("${OWNER}/${IMAGE_NAME}:${TAG}").push() + script{ + docker.withRegistry(REGISTRY_URL, GITEA_CREDS){ + docker.image("${OWNER}/${IMAGE_NAME}:${TAG}").push() + } } } }