Browse Source

Merge branch 'fix_pipeline' of 21h/mqtt-operator into master

tags/0.0.3.1
Vladimir Smagin Gitea 5 months ago
parent
commit
6a51061ef7
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("${repository}", "dockerhub") {
image.push()
}
docker.withRegistry("", "dockerhub") {
image.push()
}

} catch(Exception e) {
error("Failed to push image")
echo e
} 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