Skip to content

Commit

Permalink
[apm-ci] When asciidoc speedup skip some stages (elastic#2891)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored and simitt committed Dec 18, 2019
1 parent 3c850d9 commit cc89749
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ pipeline {
"^vendor/github.com/elastic/beats"
]
env.BEATS_UPDATED = isGitRegionMatch(patterns: regexps)

// Skip all the stages except docs for PR's with asciidoc changes only
env.ONLY_DOCS = isGitRegionMatch(patterns: [ '.*\\.asciidoc' ], comparator: 'regexp', shouldMatchAll: true)
}
}
}
Expand All @@ -89,7 +92,10 @@ pipeline {
}
when {
beforeAgent true
expression { return params.intake_ci }
allOf {
expression { return params.intake_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
deleteDir()
Expand All @@ -114,7 +120,10 @@ pipeline {
}
when {
beforeAgent true
expression { return params.linux_ci }
allOf {
expression { return params.linux_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
deleteDir()
Expand All @@ -132,7 +141,10 @@ pipeline {
options { skipDefaultCheckout() }
when {
beforeAgent true
expression { return params.windows_ci }
allOf {
expression { return params.windows_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
deleteDir()
Expand Down Expand Up @@ -160,7 +172,10 @@ pipeline {
}
when {
beforeAgent true
expression { return params.test_ci }
allOf {
expression { return params.test_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
deleteDir()
Expand Down Expand Up @@ -191,7 +206,10 @@ pipeline {
}
when {
beforeAgent true
expression { return params.test_sys_env_ci }
allOf {
expression { return params.test_sys_env_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
deleteDir()
Expand Down Expand Up @@ -273,6 +291,7 @@ pipeline {
expression { return params.Run_As_Master_Branch }
}
expression { return params.bench_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
Expand Down Expand Up @@ -328,7 +347,8 @@ pipeline {
branch 'master'
expression { return params.Run_As_Master_Branch }
}
expression { return params.doc_ci }
expression { return params.its_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
Expand Down Expand Up @@ -384,6 +404,7 @@ pipeline {
expression { return env.BEATS_UPDATED != "0" }
}
expression { return params.release_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
Expand Down

0 comments on commit cc89749

Please sign in to comment.