ci(Jenkinsfile): refs #7643 Tag only master as latest
This commit is contained in:
parent
ddc5c2adc7
commit
90dea8fde9
|
@ -72,11 +72,15 @@ pipeline {
|
|||
}
|
||||
|
||||
sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel'
|
||||
sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
|
||||
|
||||
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
|
||||
sh 'docker push $IMAGE:$TAG'
|
||||
sh 'docker push $IMAGE:latest'
|
||||
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
|
||||
sh 'docker push $IMAGE:latest'
|
||||
}
|
||||
}
|
||||
|
||||
withKubeConfig([
|
||||
serverUrl: "$KUBERNETES_API",
|
||||
|
|
Loading…
Reference in New Issue