Jenkinsfile fixes

This commit is contained in:
Juan Ferrer 2019-01-11 14:49:25 +01:00
parent 2e0b5717ed
commit 133c32b4ea
1 changed files with 5 additions and 12 deletions

17
Jenkinsfile vendored
View File

@ -7,7 +7,7 @@ pipeline {
environment {
REGISTRY = 'registry.verdnatura.es'
DOCKER_HOST_1 = 'tcp://vch1.verdnatura.es:2376'
DOCKER_HOST_2 = 'tcp://vch1.verdnatura.es:2376'
DOCKER_HOST_2 = 'tcp://vch2.verdnatura.es:2376'
TAG = "${env.BRANCH_NAME}"
}
stages {
@ -47,23 +47,16 @@ pipeline {
echo "Committer: ${env.GIT_COMMITTER_EMAIL}"
}
}
stage('Install') {
environment {
NODE_ENV = ''
}
steps {
nodejs('node-lts') {
sh "npm install --no-audit"
sh "gulp install"
}
}
}
stage('Build') {
environment {
CREDS = credentials('docker-registry')
}
steps {
nodejs('node-lts') {
withEnv(['NODE_ENV=']) {
sh "npm install --no-audit"
sh "gulp install"
}
sh "gulp build"
}
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'