Jenkinsfile fix
This commit is contained in:
parent
ac41a77d2f
commit
d7cacd62b3
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue