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