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 3b5c944336 - Show all commits

4
Jenkinsfile vendored
View File

@ -100,12 +100,12 @@ pipeline {
steps { steps {
script { script {
def packageJson = readJSON file: 'package.json' def packageJson = readJSON file: 'package.json'
env.VERSION = BRANCH_NAME env.VERSION = "${packageJson.version}-build${env.BUILD_ID}a"
} }
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 push registry.verdnatura.es/back:$BRANCH_NAME' sh 'docker push $IMAGE:$BRANCH_NAME'
} }
} }
stage('Stack') { stage('Stack') {