Jenkinsfile fix

This commit is contained in:
Juan Ferrer 2019-01-11 14:40:13 +01:00
parent ac41a77d2f
commit d7cacd62b3
1 changed files with 12 additions and 9 deletions

21
Jenkinsfile vendored
View File

@ -51,12 +51,10 @@ pipeline {
environment {
NODE_ENV = ''
}
parallel {
stage('npm') {
steps { nodejs('node-lts') { sh "npm install --no-audit" } }
}
stage('Gulp') {
steps { nodejs('node-lts') { sh "gulp install" } }
steps {
nodejs('node-lts') {
sh "npm install --no-audit"
sh "gulp install"
}
}
}
@ -76,8 +74,8 @@ pipeline {
stage('Deploy') {
environment {
DOCKER_TLS_VERIFY = 1
DOCKER_CERT_PATH = credentials('docker')
}
withCredentials([dockerCert(credentialsId: 'docker', variable: 'DOCKER_CERT_PATH')]) {
parallel {
stage('Host 1') {
environment {
@ -85,7 +83,9 @@ pipeline {
}
steps {
sh "docker-compose pull"
sh "docker-compose up -d"
withCredentials([dockerCert(credentialsId: 'docker', variable: 'DOCKER_CERT_PATH')]) {
sh "docker-compose up -d"
}
}
}
stage('Host 2') {
@ -94,10 +94,13 @@ pipeline {
}
steps {
sh "docker-compose pull"
sh "docker-compose up -d"
withCredentials([dockerCert(credentialsId: 'docker', variable: 'DOCKER_CERT_PATH')]) {
sh "docker-compose up -d"
}
}
}
}
}
}
stage('Cleanup') {
steps {