This commit is contained in:
parent
c2598b9e80
commit
85a804001f
|
@ -186,27 +186,27 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
// stage('Push') {
|
||||
// when {
|
||||
// expression { RUN_BUILD }
|
||||
// }
|
||||
// environment {
|
||||
// CREDENTIALS = credentials('docker-registry')
|
||||
// }
|
||||
// steps {
|
||||
// script {
|
||||
// def packageJson = readJSON file: 'package.json'
|
||||
// env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
// }
|
||||
// sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
||||
// sh 'docker-compose push'
|
||||
// script {
|
||||
// if (env.BRANCH_NAME == 'master') {
|
||||
// sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
|
||||
// sh 'docker push $IMAGE:latest'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
stage('Push') {
|
||||
when {
|
||||
expression { RUN_BUILD }
|
||||
}
|
||||
environment {
|
||||
CREDENTIALS = credentials('docker-registry')
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
}
|
||||
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
||||
sh 'docker-compose push'
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
|
||||
sh 'docker push $IMAGE:latest'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
when {
|
||||
|
|
Loading…
Reference in New Issue