From b9ce2f823278ba84dabc7ab6ccaa1df966b86f8d Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 18 Nov 2019 10:59:48 +0000 Subject: [PATCH] [apm-ci] When asciidoc speedup skip some stages (#2891) --- Jenkinsfile | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f886043d2a7..e321e6d714d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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) } } } @@ -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() @@ -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() @@ -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') { @@ -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() @@ -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() @@ -255,6 +273,7 @@ pipeline { expression { return params.Run_As_Master_Branch } } expression { return params.bench_ci } + expression { return env.ONLY_DOCS == "false" } } } steps { @@ -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') { @@ -328,6 +350,7 @@ pipeline { expression { return !params.Run_As_Master_Branch } } expression { return params.its_ci } + expression { return env.ONLY_DOCS == "false" } } } steps { @@ -363,6 +386,7 @@ pipeline { expression { return env.BEATS_UPDATED != "0" } } expression { return params.release_ci } + expression { return env.ONLY_DOCS == "false" } } } steps {