test jenkins

This commit is contained in:
Fedor Katurov 2020-03-20 21:10:36 +07:00
parent 8a80569cca
commit 4cffb64bc5

9
Jenkinsfile vendored
View file

@ -1,3 +1,5 @@
def failed = false
pipeline { pipeline {
agent any agent any
@ -21,6 +23,7 @@ pipeline {
script { script {
if("${WWW}" == "/var/www/on-deploy/map/staging/frontend") { if("${WWW}" == "/var/www/on-deploy/map/staging/frontend") {
currentBuild.result = 'FAILED' currentBuild.result = 'FAILED'
failed = true
return return
} }
} }
@ -30,6 +33,9 @@ pipeline {
stage('Deploy: dev') { stage('Deploy: dev') {
when { when {
branch 'develop' branch 'develop'
expression {
!failed
}
} }
steps{ steps{
@ -40,6 +46,9 @@ pipeline {
stage('Deploy: master') { stage('Deploy: master') {
when { when {
branch 'master' branch 'master'
expression {
!failed
}
} }
steps{ steps{