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 2 additions and 2 deletions
Showing only changes of commit f847e6a95a - Show all commits

4
Jenkinsfile vendored
View File

@ -95,8 +95,7 @@ pipeline {
stage('Push image') { stage('Push image') {
environment { environment {
CREDENTIALS = credentials('docker-registry') CREDENTIALS = credentials('docker-registry')
E2E_VERSION = "e2e-try" IMAGE = "$REGISTRY/verdnatura/salix-back"
IMAGE = "$REGISTRY/verdnatura/salix-back:$E2E_VERSION"
} }
steps { steps {
script { script {
@ -106,6 +105,7 @@ pipeline {
sh 'docker-compose build back' sh 'docker-compose build back'
sh 'docker images' sh 'docker images'
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY' sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
sh 'docker tag back:e2e-try $IMAGE:$BRANCH_NAME'
sh 'docker push $IMAGE:$BRANCH_NAME' sh 'docker push $IMAGE:$BRANCH_NAME'
} }
} }