Browse Source

gggg

tags/0.0.3.1
Vladimir Smagin 5 months ago
parent
commit
8221302925
1 changed files with 13 additions and 11 deletions
  1. +13
    -11
      Jenkinsfile

+ 13
- 11
Jenkinsfile View File

@@ -28,19 +28,21 @@ node {
}
}

stage("Push Image") {
try {
if (branch == 'master') {
stage("Push Image") {
try {

docker.withRegistry("", "dockerhub") {
image.push()
}
docker.withRegistry("", "dockerhub") {
image.push()
}

} catch(Exception e) {
echo "${e}"
error("Failed to push image")
} finally {
// cleanup
sh "docker rmi ${image_name} || true"
} catch(Exception e) {
echo "${e}"
error("Failed to push image")
} finally {
// cleanup
sh "docker rmi ${image_name} || true"
}
}
}
}

Loading…
Cancel
Save