WIP: feat: jenkins push docker imagen by branch #2763

Draft
alexm wants to merge 53 commits from 6695-docker_push into dev
1 changed files with 5 additions and 3 deletions
Showing only changes of commit d56c8ee3a9 - Show all commits

2
Jenkinsfile vendored
View File

@ -188,12 +188,14 @@ pipeline {
} }
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY' sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
sh 'docker-compose push' sh 'docker-compose push'
script {
if (env.BRANCH_NAME == 'master') { if (env.BRANCH_NAME == 'master') {
sh 'docker tag $IMAGE:$TAG $IMAGE:latest' sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
sh 'docker push $IMAGE:latest' sh 'docker push $IMAGE:latest'
} }
} }
} }
}
stage('Deploy') { stage('Deploy') {
when { when {
expression { PROTECTED_BRANCH } expression { PROTECTED_BRANCH }