From 8be3536a35b21f32a6ce018d6f06d6042b80cc8f Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 30 Jul 2020 08:01:11 +0100 Subject: [PATCH] [CI] fix apm-beats-update.groovy pipeline with missing stages (#20238) (#20239) --- .ci/apm-beats-update.groovy | 82 +++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/.ci/apm-beats-update.groovy b/.ci/apm-beats-update.groovy index 9fec76266c9..3ca5153954e 100644 --- a/.ci/apm-beats-update.groovy +++ b/.ci/apm-beats-update.groovy @@ -48,51 +48,53 @@ pipeline { } } } - /** - Checkout the code and stash it, to use it on other stages. - */ - stage('Checkout') { - steps { - deleteDir() - gitCheckout(basedir: "${BEATS_DIR}", githubNotifyFirstTimeContributor: false) - script { - dir("${BEATS_DIR}"){ - env.GO_VERSION = readFile(".go-version").trim() - def regexps =[ - "^devtools/mage.*", - "^libbeat/scripts/Makefile", - ] - 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) + stages { + /** + Checkout the code and stash it, to use it on other stages. + */ + stage('Checkout') { + steps { + deleteDir() + gitCheckout(basedir: "${BEATS_DIR}", githubNotifyFirstTimeContributor: false) + script { + dir("${BEATS_DIR}"){ + env.GO_VERSION = readFile(".go-version").trim() + def regexps =[ + "^devtools/mage.*", + "^libbeat/scripts/Makefile", + ] + 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) + } } } } - } - /** - updates beats updates the framework part and go parts of beats. - Then build and test. - Finally archive the results. - */ - stage('Update Beats') { - options { skipDefaultCheckout() } - when { - beforeAgent true - anyOf { - branch 'master' - branch "\\d+\\.\\d+" - branch "v\\d?" - tag "v\\d+\\.\\d+\\.\\d+*" - allOf { - expression { return env.BEATS_UPDATED != "false" || isCommentTrigger() } - changeRequest() - } + /** + updates beats updates the framework part and go parts of beats. + Then build and test. + Finally archive the results. + */ + stage('Update Beats') { + options { skipDefaultCheckout() } + when { + beforeAgent true + anyOf { + branch 'master' + branch "\\d+\\.\\d+" + branch "v\\d?" + tag "v\\d+\\.\\d+\\.\\d+*" + allOf { + expression { return env.BEATS_UPDATED != "false" || isCommentTrigger() } + changeRequest() + } + } } - } - steps { - withGithubNotify(context: 'Check Apm Server Beats Update') { - beatsUpdate() + steps { + withGithubNotify(context: 'Check Apm Server Beats Update') { + beatsUpdate() + } } } }