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

6
Jenkinsfile vendored
View File

@ -92,10 +92,12 @@ pipeline {
stage('Push image') {
environment {
CREDENTIALS = credentials('docker-registry')
IMAGE = "$REGISTRY/verdnatura/salix-back"
}
steps {
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
sh 'docker push salix-back:$BRANCH_NAME'
sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel'
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
sh 'docker push $IMAGE:$BRANCH_NAME'
}
}
}