From 0f920a49491f429461c68367b5db47d995879ca6 Mon Sep 17 00:00:00 2001 From: Oliver Bertuch Date: Fri, 30 Aug 2019 15:32:06 +0200 Subject: [PATCH] #22. Push real release tags (v4.*) and latest images. --- docker/dataverse-k8s/Jenkinsfile | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/docker/dataverse-k8s/Jenkinsfile b/docker/dataverse-k8s/Jenkinsfile index cd54031c..0add5bda 100644 --- a/docker/dataverse-k8s/Jenkinsfile +++ b/docker/dataverse-k8s/Jenkinsfile @@ -16,17 +16,31 @@ pipeline { } } - stage('push-latest') { + stage('push') { when { anyOf { branch 'master' - buildingTag() + tag "v4.*" } } - steps { - script { - docker.withRegistry("${env.registry}", "${env.hublogin}") { - docker_image.push("latest") + parallel { + stage('release') { + when { buildingTag() } + steps { + script { + docker.withRegistry("${env.registry}", "${env.hublogin}") { + docker_image.push("${env.TAG_NAME}") + } + } + } + } + stage('latest') { + steps { + script { + docker.withRegistry("${env.registry}", "${env.hublogin}") { + docker_image.push("latest") + } + } } } }