WIP: feat: jenkins push docker imagen by branch #2763
|
@ -92,22 +92,22 @@ pipeline {
|
|||
|
||||
}
|
||||
}
|
||||
stage('Push image') {
|
||||
environment {
|
||||
CREDENTIALS = credentials('docker-registry')
|
||||
IMAGE = "$REGISTRY/salix-back"
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = "e2e-try"
|
||||
}
|
||||
sh 'docker-compose build back'
|
||||
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
||||
sh 'docker tag $IMAGE:$VERSION $IMAGE:$GIT_BRANCH'
|
||||
sh 'docker push $IMAGE:$GIT_BRANCH'
|
||||
}
|
||||
}
|
||||
// stage('Push image') {
|
||||
// environment {
|
||||
// CREDENTIALS = credentials('docker-registry')
|
||||
// IMAGE = "$REGISTRY/salix-back"
|
||||
// }
|
||||
// steps {
|
||||
// script {
|
||||
// def packageJson = readJSON file: 'package.json'
|
||||
// env.VERSION = "e2e-try"
|
||||
// }
|
||||
// sh 'docker-compose build back'
|
||||
// sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
||||
// sh 'docker tag $IMAGE:$VERSION $IMAGE:$GIT_BRANCH'
|
||||
// sh 'docker push $IMAGE:$GIT_BRANCH'
|
||||
// }
|
||||
// }
|
||||
stage('Stack') {
|
||||
parallel {
|
||||
stage('Back') {
|
||||
|
|
Loading…
Reference in New Issue