feat(jenkinsfile): use build_id
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Alex Moreno 2024-06-12 07:41:00 +02:00
parent ec7bf13e8c
commit c4c6df5a78
1 changed files with 4 additions and 4 deletions

8
Jenkinsfile vendored
View File

@ -121,7 +121,7 @@ pipeline {
steps { steps {
script { script {
def packageJson = readJSON file: 'package.json' def packageJson = readJSON file: 'package.json'
env.VERSION = "${packageJson.version}-vn${env.BUILD_ID}" env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
} }
sh 'docker-compose build back' sh 'docker-compose build back'
} }
@ -159,7 +159,7 @@ pipeline {
steps { steps {
script { script {
def packageJson = readJSON file: 'package.json' def packageJson = readJSON file: 'package.json'
env.VERSION = "${packageJson.version}-vn${env.BUILD_ID}" env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
} }
sh 'gulp build' sh 'gulp build'
sh 'docker-compose build front' sh 'docker-compose build front'
@ -179,7 +179,7 @@ pipeline {
steps { steps {
script { script {
def packageJson = readJSON file: 'package.json' def packageJson = readJSON file: 'package.json'
env.VERSION = "${packageJson.version}-vn${env.BUILD_ID}" env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
} }
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY' sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
sh 'docker-compose push' sh 'docker-compose push'
@ -210,7 +210,7 @@ pipeline {
steps { steps {
script { script {
def packageJson = readJSON file: 'package.json' def packageJson = readJSON file: 'package.json'
env.VERSION = "${packageJson.version}-vn${env.BUILD_ID}" env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
} }
withKubeConfig([ withKubeConfig([
serverUrl: "$KUBERNETES_API", serverUrl: "$KUBERNETES_API",