test
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2024-07-19 14:21:29 +02:00
parent 9432b24a19
commit 8471b0804d
1 changed files with 4 additions and 4 deletions

8
Jenkinsfile vendored
View File

@ -94,11 +94,11 @@ pipeline {
CREDENTIALS = credentials('docker-registry') CREDENTIALS = credentials('docker-registry')
IMAGE = "$REGISTRY/verdnatura/salix-back" IMAGE = "$REGISTRY/verdnatura/salix-back"
} }
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
}
steps { steps {
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
}
sh 'docker-compose build back' sh 'docker-compose build back'
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY' sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
sh 'docker push $IMAGE:$BRANCH_NAME' sh 'docker push $IMAGE:$BRANCH_NAME'