Jenkinsfile omit test step when branch not dev

This commit is contained in:
Juan Ferrer 2019-02-01 09:44:00 +01:00
parent 13ec9006a9
commit 6290e9e33f
1 changed files with 12 additions and 0 deletions

12
Jenkinsfile vendored
View File

@ -56,6 +56,9 @@ pipeline {
} }
} }
stage('Test') { stage('Test') {
when {
branch 'dev';
}
environment { environment {
NODE_ENV = "" NODE_ENV = ""
FIREFOX_BIN = "/opt/firefox/firefox-bin" FIREFOX_BIN = "/opt/firefox/firefox-bin"
@ -71,6 +74,9 @@ pipeline {
} }
} }
stage('Docker') { stage('Docker') {
when {
not { branch 'dev' }
}
environment { environment {
CREDS = credentials('docker-registry') CREDS = credentials('docker-registry')
} }
@ -81,6 +87,9 @@ pipeline {
} }
} }
stage('Deploy') { stage('Deploy') {
when {
not { branch 'dev' }
}
environment { environment {
DOCKER_TLS_VERIFY = 1 DOCKER_TLS_VERIFY = 1
} }
@ -110,6 +119,9 @@ pipeline {
} }
} }
stage('Cleanup') { stage('Cleanup') {
when {
not { branch 'dev' }
}
steps { steps {
sh 'docker logout $REGISTRY' sh 'docker logout $REGISTRY'
} }