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 committed Mar 6, 2020
1 parent fce71a9 commit b9ce2f8
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,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 @@ -91,7 +94,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 @@ -116,7 +122,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 @@ -137,7 +146,10 @@ pipeline {
}
when {
beforeAgent true
expression { return params.windows_ci }
allOf {
expression { return params.windows_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
withGithubNotify(context: 'Build-Test - Windows') {
Expand Down Expand Up @@ -173,7 +185,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 @@ -204,7 +219,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 @@ -255,6 +273,7 @@ pipeline {
expression { return params.Run_As_Master_Branch }
}
expression { return params.bench_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
Expand All @@ -279,7 +298,10 @@ pipeline {
}
when {
beforeAgent true
expression { return params.kibana_update_ci }
allOf {
expression { return params.kibana_update_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
withGithubNotify(context: 'Sync Kibana') {
Expand Down Expand Up @@ -328,6 +350,7 @@ pipeline {
expression { return !params.Run_As_Master_Branch }
}
expression { return params.its_ci }
expression { return env.ONLY_DOCS == "false" }
}
}
steps {
Expand Down Expand Up @@ -363,6 +386,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 b9ce2f8

Please sign in to comment.