From 25dd238da67d0d636afcbae67481ec665f516a29 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 15 Jan 2020 11:30:24 +0100 Subject: [PATCH 01/14] feat: run test on Windows --- .ci/scripts/install-tools.bat | 10 ++ Jenkinsfile | 323 +++++++++++++++++++--------------- dev-tools/make/mage.mk | 2 +- 3 files changed, 189 insertions(+), 146 deletions(-) create mode 100644 .ci/scripts/install-tools.bat diff --git a/.ci/scripts/install-tools.bat b/.ci/scripts/install-tools.bat new file mode 100644 index 00000000000..f033e27db5f --- /dev/null +++ b/.ci/scripts/install-tools.bat @@ -0,0 +1,10 @@ +set GOPATH=%WORKSPACE% +set MAGEFILE_CACHE=%WORKSPACE%\.magefile +set PATH=%WORKSPACE%\bin;C:\ProgramData\chocolatey\bin;%PATH% + +choco install curl -y --no-progress --skipdownloadcache +mkdir %WORKSPACE%\bin +curl -sL -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.2.1/gvm-windows-amd64.exe +FOR /f "tokens=*" %%i IN ('"gvm.exe" use %GO_VERSION% --format=batch') DO %%i + +go install github.com/elastic/beats/vendor/github.com/magefile/mage diff --git a/Jenkinsfile b/Jenkinsfile index 89753eec3e2..138cf73b8bf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,11 +1,6 @@ #!/usr/bin/env groovy -library identifier: 'apm@master', -retriever: modernSCM( - [$class: 'GitSCMSource', - credentialsId: 'f94e9298-83ae-417e-ba91-85c279771570', - id: '37cf2c00-2cc7-482e-8c62-7bbffef475e2', - remote: 'git@github.com:elastic/apm-pipeline-library.git']) +@Library('apm@current') _ pipeline { agent { label 'ubuntu && immutable' } @@ -22,6 +17,7 @@ pipeline { disableResume() durabilityHint('PERFORMANCE_OPTIMIZED') disableConcurrentBuilds() +// checkoutToSubdirectory "${env.BASE_DIR}" } triggers { issueCommentTrigger('(?i).*(?:jenkins\\W+)?run\\W+(?:the\\W+)?tests(?:\\W+please)?.*') @@ -36,13 +32,7 @@ pipeline { stage('Checkout') { options { skipDefaultCheckout() } steps { - //TODO we need to configure the library in Jenkins to use privileged methods. - //gitCheckout(basedir: "${BASE_DIR}") - dir("${BASE_DIR}"){ - checkout scm - githubEnv() - } - stash allowEmpty: true, name: 'source', useDefaultExcludes: false + gitCheckout(basedir: "${BASE_DIR}") script { env.GO_VERSION = readFile("${BASE_DIR}/.go-version").trim() env.BUILD_FILEBEAT = isChanged(["^filebeat/.*"]) @@ -59,20 +49,19 @@ pipeline { env.BUILD_DOCS = isGitRegionMatch(patterns: ["^docs/.*"], comparator: 'regexp') || params.runAllStages env.BUILD_LIBBEAT = isGitRegionMatch(patterns: ["^Libbeat/.*"], comparator: 'regexp') || params.runAllStages } + stash allowEmpty: true, name: 'source', useDefaultExcludes: false } } stage('Lint'){ options { skipDefaultCheckout() } steps { - withBeatsEnv(){ - makeTarget("Lint", "check") - } + makeTarget("Lint", "check") } } stage('Build and Test'){ failFast false parallel { - stage('Filebeat'){ + stage('Filebeat oss'){ agent { label 'ubuntu && immutable' } options { skipDefaultCheckout() } when { @@ -81,31 +70,49 @@ pipeline { return env.BUILD_FILEBEAT != "false" } } - stages { - stage('Filebeat oss'){ - steps { - withBeatsEnv(){ - makeTarget("Filebeat oss Linux", "-C filebeat testsuite") - } - } + steps { + makeTarget("Filebeat oss Linux", "-C filebeat testsuite") + } + } + stage('Filebeat x-pack'){ + agent { label 'ubuntu && immutable' } + options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return env.BUILD_FILEBEAT != "false" } - stage('Filebeat x-pack'){ - steps { - withBeatsEnv(){ - makeTarget("Filebeat x-pack Linux", "-C x-pack/filebeat testsuite") - } - } + } + steps { + makeTarget("Filebeat x-pack Linux", "-C x-pack/filebeat testsuite") + } + } + stage('Filebeat Mac OS X'){ + agent { label 'macosx' } + options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return env.BUILD_FILEBEAT != "false" } - stage('Filebeat Mac OS X'){ - agent { label 'macosx' } - options { skipDefaultCheckout() } - steps { - withBeatsEnv(){ - makeTarget("Filebeat oss Mac OS X", "TEST_ENVIRONMENT=0 -C filebeat testsuite") - } - } + } + steps { + makeTarget("Filebeat oss Mac OS X", "TEST_ENVIRONMENT=0 -C filebeat testsuite") + } + } + stage('Filebeat Windows'){ + agent { label 'windows-immutable && windows-2019' } + options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return env.BUILD_FILEBEAT != "false" } } + steps { + mageTargetWin("Filebeat oss Windows Unit test", "-d filebeat goUnitTest") + mageTargetWin("Filebeat oss Windows Integration test", "-d filebeat goIntegTest") + } } stage('Heartbeat'){ agent { label 'ubuntu && immutable' } @@ -119,18 +126,21 @@ pipeline { stages { stage('Heartbeat oss'){ steps { - withBeatsEnv(){ - makeTarget("Heartbeat oss Linux", "-C heartbeat testsuite") - } + makeTarget("Heartbeat oss Linux", "-C heartbeat testsuite") } } stage('Heartbeat Mac OS X'){ agent { label 'macosx' } options { skipDefaultCheckout() } steps { - withBeatsEnv(){ - makeTarget("Heartbeat oss Mac OS X", "TEST_ENVIRONMENT=0 -C heartbeat testsuite") - } + makeTarget("Heartbeat oss Mac OS X", "TEST_ENVIRONMENT=0 -C heartbeat testsuite") + } + } + stage('Heartbeat Windows'){ + agent { label 'windows-immutable && windows-2019' } + options { skipDefaultCheckout() } + steps { + mageTargetWin("Heartbeat oss Windows Unit test", "-d heartbeat goTestUnit") } } } @@ -147,32 +157,32 @@ pipeline { stages { stage('Auditbeat oss'){ steps { - withBeatsEnv(){ - makeTarget("Auditbeat oss Linux", "-C auditbeat testsuite") - } + makeTarget("Auditbeat oss Linux", "-C auditbeat testsuite") } } stage('Auditbeat crosscompile'){ steps { - withBeatsEnv(){ - makeTarget("Auditbeat oss crosscompile", "-C auditbeat crosscompile") - } + makeTarget("Auditbeat oss crosscompile", "-C auditbeat crosscompile") } } stage('Auditbeat x-pack'){ steps { - withBeatsEnv(){ - makeTarget("Auditbeat x-pack Linux", "-C x-pack/auditbeat testsuite") - } + makeTarget("Auditbeat x-pack Linux", "-C x-pack/auditbeat testsuite") } } stage('Auditbeat Mac OS X'){ agent { label 'macosx' } options { skipDefaultCheckout() } steps { - withBeatsEnv(){ - makeTarget("Auditbeat oss Mac OS X", "TEST_ENVIRONMENT=0 -C auditbeat testsuite") - } + makeTarget("Auditbeat oss Mac OS X", "TEST_ENVIRONMENT=0 -C auditbeat testsuite") + } + } + stage('Auditbeat Windows'){ + agent { label 'windows-immutable && windows-2019' } + options { skipDefaultCheckout() } + steps { + mageTargetWin("Auditbeat Windows Unit test", "-d auditbeat goUnitTest") + mageTargetWin("Auditbeat Windows Integration test", "-d auditbeat goIntegTest") } } } @@ -189,30 +199,22 @@ pipeline { stages { stage('Libbeat oss'){ steps { - withBeatsEnv(){ - makeTarget("Libbeat oss Linux", "-C libbeat testsuite") - } + makeTarget("Libbeat oss Linux", "-C libbeat testsuite") } } stage('Libbeat crosscompile'){ steps { - withBeatsEnv(){ - makeTarget("Libbeat oss crosscompile", "-C libbeat crosscompile") - } + makeTarget("Libbeat oss crosscompile", "-C libbeat crosscompile") } } stage('Libbeat stress-tests'){ steps { - withBeatsEnv(){ - makeTarget("Libbeat stress-tests", "STRESS_TEST_OPTIONS='-timeout=20m -race -v -parallel 1' -C libbeat stress-tests") - } + makeTarget("Libbeat stress-tests", "STRESS_TEST_OPTIONS='-timeout=20m -race -v -parallel 1' -C libbeat stress-tests") } } stage('Libbeat x-pack'){ steps { - withBeatsEnv(){ - makeTarget("Libbeat x-pack Linux", "-C x-pack/libbeat testsuite") - } + makeTarget("Libbeat x-pack Linux", "-C x-pack/libbeat testsuite") } } } @@ -227,9 +229,7 @@ pipeline { } } steps { - withBeatsEnv(){ - makeTarget("Metricbeat Unit tests", "-C metricbeat unit-tests coverage-report") - } + makeTarget("Metricbeat Unit tests", "-C metricbeat unit-tests coverage-report") } } stage('Metricbeat Integration tests'){ @@ -242,9 +242,7 @@ pipeline { } } steps { - withBeatsEnv(){ - makeTarget("Metricbeat Integration tests", "-C metricbeat integration-tests-environment coverage-report") - } + makeTarget("Metricbeat Integration tests", "-C metricbeat integration-tests-environment coverage-report") } } stage('Metricbeat System tests'){ @@ -257,9 +255,7 @@ pipeline { } } steps { - withBeatsEnv(){ - makeTarget("Metricbeat System tests", "-C metricbeat update system-tests-environment coverage-report") - } + makeTarget("Metricbeat System tests", "-C metricbeat update system-tests-environment coverage-report") } } stage('Metricbeat oss'){ @@ -272,9 +268,7 @@ pipeline { } } steps { - withBeatsEnv(){ - makeTarget("Metricbeat x-pack Linux", "-C x-pack/metricbeat testsuite") - } + makeTarget("Metricbeat x-pack Linux", "-C x-pack/metricbeat testsuite") } } stage('Metricbeat crosscompile'){ @@ -287,9 +281,7 @@ pipeline { } } steps { - withBeatsEnv(){ - makeTarget("Metricbeat oss crosscompile", "-C metricbeat crosscompile") - } + makeTarget("Metricbeat oss crosscompile", "-C metricbeat crosscompile") } } stage('Metricbeat Mac OS X'){ @@ -302,10 +294,22 @@ pipeline { } } steps { - withBeatsEnv(){ - makeTarget("Metricbeat oss Mac OS X", "TEST_ENVIRONMENT=0 -C metricbeat testsuite") + makeTarget("Metricbeat oss Mac OS X", "TEST_ENVIRONMENT=0 -C metricbeat testsuite") + } + } + stage('Metricbeat Windows'){ + agent { label 'windows-immutable && windows-2019' } + options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return env.BUILD_METRICBEAT != "false" } } + steps { + mageTargetWin("Metricbeat Windows Unit test", "-d metricbeat goUnitTest") + mageTargetWin("Metricbeat Windows Integration test", "-d metricbeat goIntegTest") + } } stage('Packetbeat'){ agent { label 'ubuntu && immutable' } @@ -319,9 +323,7 @@ pipeline { stages { stage('Packetbeat oss'){ steps { - withBeatsEnv(){ - makeTarget("Packetbeat oss Linux", "-C packetbeat testsuite") - } + makeTarget("Packetbeat oss Linux", "-C packetbeat testsuite") } } } @@ -338,9 +340,7 @@ pipeline { stages { stage('Dockerlogbeat'){ steps { - withBeatsEnv(){ - makeTarget("Elastic Log Plugin unit tests", "-C x-pack/dockerlogbeat testsuite") - } + makeTarget("Elastic Log Plugin unit tests", "-C x-pack/dockerlogbeat testsuite") } } } @@ -357,9 +357,14 @@ pipeline { stages { stage('Winlogbeat oss'){ steps { - withBeatsEnv(){ - makeTarget("Winlogbeat oss crosscompile", "-C winlogbeat crosscompile") - } + makeTarget("Winlogbeat oss crosscompile", "-C winlogbeat crosscompile") + } + } + stage('Winlogbeat Windows'){ + agent { label 'windows-immutable && windows-2019' } + options { skipDefaultCheckout() } + steps { + mageTargetWin("Winlogbeat Windows Unit test", "-d winlogbeat goUnitTest") } } } @@ -376,18 +381,21 @@ pipeline { stages { stage('Functionbeat x-pack'){ steps { - withBeatsEnv(){ - makeTarget("Functionbeat x-pack Linux", "-C x-pack/functionbeat testsuite") - } + makeTarget("Functionbeat x-pack Linux", "-C x-pack/functionbeat testsuite") } } stage('Functionbeat Mac OS X x-pack'){ agent { label 'macosx' } options { skipDefaultCheckout() } steps { - withBeatsEnv(){ - makeTarget("Functionbeat x-pack Mac OS X", "TEST_ENVIRONMENT=0 -C x-pack/functionbeat testsuite") - } + makeTarget("Functionbeat x-pack Mac OS X", "TEST_ENVIRONMENT=0 -C x-pack/functionbeat testsuite") + } + } + stage('Functionbeat Windows'){ + agent { label 'windows-immutable && windows-2019' } + options { skipDefaultCheckout() } + steps { + mageTargetWin("Functionbeat Windows Unit test", "-d x-pack/functionbeat goUnitTest") } } } @@ -404,9 +412,7 @@ pipeline { stages { stage('Journalbeat oss'){ steps { - withBeatsEnv(){ - makeTarget("Journalbeat Linux", "-C journalbeat testsuite") - } + makeTarget("Journalbeat Linux", "-C journalbeat testsuite") } } } @@ -423,34 +429,28 @@ pipeline { stages { stage('Generators Metricbeat Linux'){ steps { - withBeatsEnv(){ - makeTarget("Generators Metricbeat Linux", "-C generator/metricbeat test test-package") - } + makeTarget("Generators Metricbeat Linux", "-C generator/metricbeat test") + makeTarget("Generators Metricbeat Linux", "-C generator/metricbeat test-package") } } stage('Generators Beat Linux'){ steps { - withBeatsEnv(){ - makeTarget("Generators Beat Linux", "-C generator/beat test test-package") - } + makeTarget("Generators Beat Linux", "-C generator/beat test") + makeTarget("Generators Beat Linux", "-C generator/beat test-package") } } stage('Generators Metricbeat Mac OS X'){ agent { label 'macosx' } options { skipDefaultCheckout() } steps { - withBeatsEnv(){ - makeTarget("Generators Metricbeat Mac OS X", "-C generator/metricbeat test") - } + makeTarget("Generators Metricbeat Mac OS X", "-C generator/metricbeat test") } } stage('Generators Beat Mac OS X'){ agent { label 'macosx' } options { skipDefaultCheckout() } steps { - withBeatsEnv(){ - makeTarget("Generators Beat Mac OS X", "-C generator/beat test") - } + makeTarget("Generators Beat Mac OS X", "-C generator/beat test") } } } @@ -476,9 +476,7 @@ pipeline { expression { return env.BUILD_DOCS != "false" } } steps { - withBeatsEnv(){ - makeTarget("Docs", "docs") - } + makeTarget("Docs", "docs") } } } @@ -486,9 +484,25 @@ pipeline { } } -def makeTarget(context, target, clean = true){ +def makeTarget(context, target){ + withGithubNotify(context: "${context}") { + withBeatsEnv(){ + sh(label: "Make ${target}", script: """ + eval "\$(gvm use ${GO_VERSION} --format=bash)" + make ${target} + """) + } + } +} + +def mageTargetWin(context, target){ withGithubNotify(context: "${context}") { - sh(label: "Make ${target}", script: "make ${target}") + withBeatsEnvWin(){ + bat(label: "Mage ${target}", script: """ + set + mage ${target} + """) + } } } @@ -496,47 +510,65 @@ def withBeatsEnv(Closure body){ withEnv([ "HOME=${env.WORKSPACE}", "GOPATH=${env.WORKSPACE}", - "PATH=${env.WORKSPACE}/bin:${env.PATH}", + "PATH+GO=${env.WORKSPACE}/bin:${env.PATH}", + "MAGEFILE_CACHE=${WORKSPACE}\\.magefile", + "TEST_COVERAGE=true", + "RACE_DETECTOR=true", ]){ deleteDir() unstash 'source' sh(label: "Install Go ${GO_VERSION}", script: ".ci/scripts/install-go.sh") sh(label: "Install docker-compose ${DOCKER_COMPOSE_VERSION}", script: ".ci/scripts/install-docker-compose.sh") - - def envTmp = propertiesToEnv("go_env.properties") - withEnv(envTmp){ - dir("${BASE_DIR}"){ - try { - body() - } finally { - reportCoverage() - } + dir("${BASE_DIR}"){ + try { + body() + } finally { + reportCoverage() } } } } -def propertiesToEnv(file){ - def props = readProperties(file: file) - if(props.containsKey('PATH')){ - newPath = sh(label: 'eval path', returnStdout: true, script: "echo \"${props['PATH']}\"").trim() - props["PATH"] = "${newPath}:${env.PATH}" - } - def envTmp = [] - props.each { key, value -> - envTmp += "${key}=${value}" +def withBeatsEnvWin(Closure body){ + def goRoot = "${env.USERPROFILE}\\.gvm\\versions\\go${GO_VERSION}.windows.amd64" + withEnv([ + "HOME=${WORKSPACE}", + "GOPATH=${WORKSPACE}", + "PATH+GO=${WORKSPACE}\\bin;${goRoot}\\bin;C:\\ProgramData\\chocolatey\\bin", + "MAGEFILE_CACHE=${WORKSPACE}\\.magefile", + "GOROOT=${goRoot}", + "TEST_COVERAGE=true", + "RACE_DETECTOR=true", + ]){ + deleteDir() + unstash 'source' + bat(label: "Install Go ${GO_VERSION}", script: ".ci/scripts/install-tools.bat") + dir("${BASE_DIR}"){ + try { + body() + } finally { + catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') { + junit(allowEmptyResults: true, keepLongStdio: true, testResults: "**\\build\\TEST*.xml") + archiveArtifacts(allowEmptyArchive: true, artifacts: '**\\build\\TEST*.out') + } + } + } } - return envTmp } def k8sTest(versions){ versions.each{ v -> stage("k8s ${v}"){ withEnv(["K8S_VERSION=${v}"]){ - withBeatsEnv(){ - sh(label: "Install k8s", script: ".ci/scripts/kind-setup.sh") - makeTarget("Kubernetes Kind", "KUBECONFIG=\"\$(kind get kubeconfig-path)\" -C deploy/kubernetes test", false) - sh(label: 'Delete cluster', script: 'kind delete cluster') + withGithubNotify(context: "K8s ${v}") { + withBeatsEnv(){ + sh(label: "Install k8s", script: """ + eval "\$(gvm use ${GO_VERSION} --format=bash)" + .ci/scripts/kind-setup.sh + """) + sh(label: "Kubernetes Kind",script: "make KUBECONFIG=\"\$(kind get kubeconfig-path)\" -C deploy/kubernetes test") + sh(label: 'Delete cluster', script: 'kind delete cluster') + } } } } @@ -545,6 +577,8 @@ def k8sTest(versions){ def reportCoverage(){ catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') { + junit(allowEmptyResults: true, keepLongStdio: true, testResults: "**/TEST-*.xml") + archiveArtifacts(allowEmptyArchive: true, artifacts: '**/TEST-*.out') retry(2){ sh(label: 'Report to Codecov', script: ''' curl -sSLo codecov https://codecov.io/bash @@ -557,7 +591,6 @@ def reportCoverage(){ done ''') } - junit(allowEmptyResults: true, keepLongStdio: true, testResults: "**/TEST-*.xml") } } diff --git a/dev-tools/make/mage.mk b/dev-tools/make/mage.mk index e3bc2631a74..aefa149f4c2 100644 --- a/dev-tools/make/mage.mk +++ b/dev-tools/make/mage.mk @@ -7,7 +7,7 @@ export MAGE_IMPORT_PATH mage: ifndef MAGE_PRESENT @echo Installing mage $(MAGE_VERSION) from vendor dir. - @go install -ldflags="-X $(MAGE_IMPORT_PATH)/mage.gitTag=$(MAGE_VERSION)" ${MAGE_IMPORT_PATH} + go install -ldflags="-X $(MAGE_IMPORT_PATH)/mage.gitTag=$(MAGE_VERSION)" ${MAGE_IMPORT_PATH} @-mage -clean endif @true From b38031d28ce6022a9c83d4e52c4711ae8e7ea687 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Thu, 16 Jan 2020 16:21:35 +0100 Subject: [PATCH 02/14] chore: parameter to enable/disable windows test --- Jenkinsfile | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 138cf73b8bf..bcf50804890 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,6 +24,7 @@ pipeline { } parameters { booleanParam(name: 'runAllStages', defaultValue: false, description: 'Allow to run all stages.') + booleanParam(name: 'windowsTest', defaultValue: false, description: 'Allow to run all stages.') } stages { /** @@ -106,7 +107,7 @@ pipeline { when { beforeAgent true expression { - return env.BUILD_FILEBEAT != "false" + return env.BUILD_FILEBEAT != "false" && params.windowsTest } } steps { @@ -139,6 +140,12 @@ pipeline { stage('Heartbeat Windows'){ agent { label 'windows-immutable && windows-2019' } options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return params.windowsTest + } + } steps { mageTargetWin("Heartbeat oss Windows Unit test", "-d heartbeat goTestUnit") } @@ -180,6 +187,12 @@ pipeline { stage('Auditbeat Windows'){ agent { label 'windows-immutable && windows-2019' } options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return params.windowsTest + } + } steps { mageTargetWin("Auditbeat Windows Unit test", "-d auditbeat goUnitTest") mageTargetWin("Auditbeat Windows Integration test", "-d auditbeat goIntegTest") @@ -303,7 +316,7 @@ pipeline { when { beforeAgent true expression { - return env.BUILD_METRICBEAT != "false" + return env.BUILD_METRICBEAT != "false" && params.windowsTest } } steps { @@ -363,6 +376,12 @@ pipeline { stage('Winlogbeat Windows'){ agent { label 'windows-immutable && windows-2019' } options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return params.windowsTest + } + } steps { mageTargetWin("Winlogbeat Windows Unit test", "-d winlogbeat goUnitTest") } @@ -394,6 +413,12 @@ pipeline { stage('Functionbeat Windows'){ agent { label 'windows-immutable && windows-2019' } options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return params.windowsTest + } + } steps { mageTargetWin("Functionbeat Windows Unit test", "-d x-pack/functionbeat goUnitTest") } From 914d1139ad1ac94776c6728bfa41db983f7b47a0 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Fri, 17 Jan 2020 12:27:54 +0100 Subject: [PATCH 03/14] deleteDir before of the checkout --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index bcf50804890..8924125b057 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,6 +33,7 @@ pipeline { stage('Checkout') { options { skipDefaultCheckout() } steps { + deleteDir() gitCheckout(basedir: "${BASE_DIR}") script { env.GO_VERSION = readFile("${BASE_DIR}/.go-version").trim() From f3ea4eb899638c8d584d7545e4d6bb927d1f1229 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 22 Jan 2020 15:29:39 +0100 Subject: [PATCH 04/14] Update Jenkinsfile --- Jenkinsfile | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8924125b057..98ec8a8cd8c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,21 +35,23 @@ pipeline { steps { deleteDir() gitCheckout(basedir: "${BASE_DIR}") - script { - env.GO_VERSION = readFile("${BASE_DIR}/.go-version").trim() - env.BUILD_FILEBEAT = isChanged(["^filebeat/.*"]) - env.BUILD_HEARTBEAT = isChanged(["^heartbeat/.*"]) - env.BUILD_AUDITBEAT = isChanged(["^auditbeat/.*"]) - env.BUILD_METRICBEAT = isChanged(["^metricbeat/.*"]) - env.BUILD_PACKETBEAT = isChanged(["^packetbeat/.*"]) - env.BUILD_WINLOGBEAT = isChanged(["^winlogbeat/.*"]) - env.BUILD_DOCKERLOGBEAT = isChanged(["^x-pack/dockerlogbeat/.*"]) - env.BUILD_FUNCTIONBEAT = isChanged(["^x-pack/functionbeat/.*"]) - env.BUILD_JOURNALBEAT = isChanged(["^journalbeat/.*"]) - env.BUILD_GENERATOR = isChanged(["^generator/.*"]) - env.BUILD_KUBERNETES = isChanged(["^deploy/kubernetes/*"]) - env.BUILD_DOCS = isGitRegionMatch(patterns: ["^docs/.*"], comparator: 'regexp') || params.runAllStages - env.BUILD_LIBBEAT = isGitRegionMatch(patterns: ["^Libbeat/.*"], comparator: 'regexp') || params.runAllStages + dir("${BASE_DIR}"){ + script { + env.GO_VERSION = readFile("${BASE_DIR}/.go-version").trim() + env.BUILD_FILEBEAT = isChanged(["^filebeat/.*"]) + env.BUILD_HEARTBEAT = isChanged(["^heartbeat/.*"]) + env.BUILD_AUDITBEAT = isChanged(["^auditbeat/.*"]) + env.BUILD_METRICBEAT = isChanged(["^metricbeat/.*"]) + env.BUILD_PACKETBEAT = isChanged(["^packetbeat/.*"]) + env.BUILD_WINLOGBEAT = isChanged(["^winlogbeat/.*"]) + env.BUILD_DOCKERLOGBEAT = isChanged(["^x-pack/dockerlogbeat/.*"]) + env.BUILD_FUNCTIONBEAT = isChanged(["^x-pack/functionbeat/.*"]) + env.BUILD_JOURNALBEAT = isChanged(["^journalbeat/.*"]) + env.BUILD_GENERATOR = isChanged(["^generator/.*"]) + env.BUILD_KUBERNETES = isChanged(["^deploy/kubernetes/*"]) + env.BUILD_DOCS = isGitRegionMatch(patterns: ["^docs/.*"], comparator: 'regexp') || params.runAllStages + env.BUILD_LIBBEAT = isGitRegionMatch(patterns: ["^Libbeat/.*"], comparator: 'regexp') || params.runAllStages + } } stash allowEmpty: true, name: 'source', useDefaultExcludes: false } From 85bd542c2d7b7d50773365d1e476cc2134201367 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 22 Jan 2020 15:36:55 +0100 Subject: [PATCH 05/14] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 98ec8a8cd8c..2f1b36daf48 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,7 +37,7 @@ pipeline { gitCheckout(basedir: "${BASE_DIR}") dir("${BASE_DIR}"){ script { - env.GO_VERSION = readFile("${BASE_DIR}/.go-version").trim() + env.GO_VERSION = readFile(".go-version").trim() env.BUILD_FILEBEAT = isChanged(["^filebeat/.*"]) env.BUILD_HEARTBEAT = isChanged(["^heartbeat/.*"]) env.BUILD_AUDITBEAT = isChanged(["^auditbeat/.*"]) From c9546e61e77e766333b4f5f7a38d38ba0e711011 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 22 Jan 2020 16:06:34 +0100 Subject: [PATCH 06/14] Update Jenkinsfile --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2f1b36daf48..5c8b5699ec8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -545,9 +545,9 @@ def withBeatsEnv(Closure body){ ]){ deleteDir() unstash 'source' - sh(label: "Install Go ${GO_VERSION}", script: ".ci/scripts/install-go.sh") - sh(label: "Install docker-compose ${DOCKER_COMPOSE_VERSION}", script: ".ci/scripts/install-docker-compose.sh") dir("${BASE_DIR}"){ + sh(label: "Install Go ${GO_VERSION}", script: ".ci/scripts/install-go.sh") + sh(label: "Install docker-compose ${DOCKER_COMPOSE_VERSION}", script: ".ci/scripts/install-docker-compose.sh") try { body() } finally { @@ -570,8 +570,8 @@ def withBeatsEnvWin(Closure body){ ]){ deleteDir() unstash 'source' - bat(label: "Install Go ${GO_VERSION}", script: ".ci/scripts/install-tools.bat") dir("${BASE_DIR}"){ + bat(label: "Install Go ${GO_VERSION}", script: ".ci/scripts/install-tools.bat") try { body() } finally { From de6631276d41ac3216c288bd50cd9df62387130d Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 29 Jan 2020 11:36:07 +0100 Subject: [PATCH 07/14] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5c8b5699ec8..eb21feebec3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,7 +24,7 @@ pipeline { } parameters { booleanParam(name: 'runAllStages', defaultValue: false, description: 'Allow to run all stages.') - booleanParam(name: 'windowsTest', defaultValue: false, description: 'Allow to run all stages.') + booleanParam(name: 'windowsTest', defaultValue: false, description: 'Allow Windows stages.') } stages { /** From 9b8d8ca1c54132494711b9fe985301d66211a5e8 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 29 Jan 2020 11:37:40 +0100 Subject: [PATCH 08/14] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index eb21feebec3..47e9d13732e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -115,7 +115,7 @@ pipeline { } steps { mageTargetWin("Filebeat oss Windows Unit test", "-d filebeat goUnitTest") - mageTargetWin("Filebeat oss Windows Integration test", "-d filebeat goIntegTest") + //mageTargetWin("Filebeat oss Windows Integration test", "-d filebeat goIntegTest") } } stage('Heartbeat'){ From 8cded742665579102f6d179d2bea6c12d2120852 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 29 Jan 2020 11:50:02 +0100 Subject: [PATCH 09/14] Apply suggestions from code review --- .ci/scripts/install-tools.bat | 10 ++++++++-- Jenkinsfile | 8 ++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.ci/scripts/install-tools.bat b/.ci/scripts/install-tools.bat index f033e27db5f..379eab90063 100644 --- a/.ci/scripts/install-tools.bat +++ b/.ci/scripts/install-tools.bat @@ -2,9 +2,15 @@ set GOPATH=%WORKSPACE% set MAGEFILE_CACHE=%WORKSPACE%\.magefile set PATH=%WORKSPACE%\bin;C:\ProgramData\chocolatey\bin;%PATH% -choco install curl -y --no-progress --skipdownloadcache +where /q curl +IF ERRORLEVEL 1 ( + choco install curl -y --no-progress --skipdownloadcache +) mkdir %WORKSPACE%\bin -curl -sL -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.2.1/gvm-windows-amd64.exe +where /q gvm +IF ERRORLEVEL 1 ( + curl -sL -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.2.1/gvm-windows-amd64.exe +) FOR /f "tokens=*" %%i IN ('"gvm.exe" use %GO_VERSION% --format=batch') DO %%i go install github.com/elastic/beats/vendor/github.com/magefile/mage diff --git a/Jenkinsfile b/Jenkinsfile index 47e9d13732e..b4ba313099c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,7 +24,7 @@ pipeline { } parameters { booleanParam(name: 'runAllStages', defaultValue: false, description: 'Allow to run all stages.') - booleanParam(name: 'windowsTest', defaultValue: false, description: 'Allow Windows stages.') + booleanParam(name: 'windowsTest', defaultValue: true, description: 'Allow Windows stages.') } stages { /** @@ -50,7 +50,7 @@ pipeline { env.BUILD_GENERATOR = isChanged(["^generator/.*"]) env.BUILD_KUBERNETES = isChanged(["^deploy/kubernetes/*"]) env.BUILD_DOCS = isGitRegionMatch(patterns: ["^docs/.*"], comparator: 'regexp') || params.runAllStages - env.BUILD_LIBBEAT = isGitRegionMatch(patterns: ["^Libbeat/.*"], comparator: 'regexp') || params.runAllStages + env.BUILD_LIBBEAT = isGitRegionMatch(patterns: ["^libbeat/.*","^x-pack/filebeat./*"], comparator: 'regexp') || params.runAllStages } } stash allowEmpty: true, name: 'source', useDefaultExcludes: false @@ -198,7 +198,7 @@ pipeline { } steps { mageTargetWin("Auditbeat Windows Unit test", "-d auditbeat goUnitTest") - mageTargetWin("Auditbeat Windows Integration test", "-d auditbeat goIntegTest") + //mageTargetWin("Auditbeat Windows Integration test", "-d auditbeat goIntegTest") } } } @@ -324,7 +324,7 @@ pipeline { } steps { mageTargetWin("Metricbeat Windows Unit test", "-d metricbeat goUnitTest") - mageTargetWin("Metricbeat Windows Integration test", "-d metricbeat goIntegTest") + //mageTargetWin("Metricbeat Windows Integration test", "-d metricbeat goIntegTest") } } stage('Packetbeat'){ From d0fc593393b2c8253c439c7ca03d3f4b7d08b15b Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Tue, 4 Feb 2020 14:24:33 +0100 Subject: [PATCH 10/14] feat: apply dependency hierarchies --- Jenkinsfile | 133 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 101 insertions(+), 32 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b4ba313099c..36075df7780 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,22 +36,7 @@ pipeline { deleteDir() gitCheckout(basedir: "${BASE_DIR}") dir("${BASE_DIR}"){ - script { - env.GO_VERSION = readFile(".go-version").trim() - env.BUILD_FILEBEAT = isChanged(["^filebeat/.*"]) - env.BUILD_HEARTBEAT = isChanged(["^heartbeat/.*"]) - env.BUILD_AUDITBEAT = isChanged(["^auditbeat/.*"]) - env.BUILD_METRICBEAT = isChanged(["^metricbeat/.*"]) - env.BUILD_PACKETBEAT = isChanged(["^packetbeat/.*"]) - env.BUILD_WINLOGBEAT = isChanged(["^winlogbeat/.*"]) - env.BUILD_DOCKERLOGBEAT = isChanged(["^x-pack/dockerlogbeat/.*"]) - env.BUILD_FUNCTIONBEAT = isChanged(["^x-pack/functionbeat/.*"]) - env.BUILD_JOURNALBEAT = isChanged(["^journalbeat/.*"]) - env.BUILD_GENERATOR = isChanged(["^generator/.*"]) - env.BUILD_KUBERNETES = isChanged(["^deploy/kubernetes/*"]) - env.BUILD_DOCS = isGitRegionMatch(patterns: ["^docs/.*"], comparator: 'regexp') || params.runAllStages - env.BUILD_LIBBEAT = isGitRegionMatch(patterns: ["^libbeat/.*","^x-pack/filebeat./*"], comparator: 'regexp') || params.runAllStages - } + loadConfigEnvVars() } stash allowEmpty: true, name: 'source', useDefaultExcludes: false } @@ -84,7 +69,7 @@ pipeline { when { beforeAgent true expression { - return env.BUILD_FILEBEAT != "false" + return env.BUILD_FILEBEAT_XPACK != "false" } } steps { @@ -155,7 +140,7 @@ pipeline { } } } - stage('Auditbeat'){ + stage('Auditbeat oss'){ agent { label 'ubuntu && immutable' } options { skipDefaultCheckout() } when { @@ -165,7 +150,7 @@ pipeline { } } stages { - stage('Auditbeat oss'){ + stage('Auditbeat Linux'){ steps { makeTarget("Auditbeat oss Linux", "-C auditbeat testsuite") } @@ -175,11 +160,6 @@ pipeline { makeTarget("Auditbeat oss crosscompile", "-C auditbeat crosscompile") } } - stage('Auditbeat x-pack'){ - steps { - makeTarget("Auditbeat x-pack Linux", "-C x-pack/auditbeat testsuite") - } - } stage('Auditbeat Mac OS X'){ agent { label 'macosx' } options { skipDefaultCheckout() } @@ -203,6 +183,19 @@ pipeline { } } } + stage('Auditbeat x-pack'){ + agent { label 'ubuntu && immutable' } + options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return env.BUILD_AUDITBEAT_XPACK != "false" + } + } + steps { + makeTarget("Auditbeat x-pack Linux", "-C x-pack/auditbeat testsuite") + } + } stage('Libbeat'){ agent { label 'ubuntu && immutable' } options { skipDefaultCheckout() } @@ -228,12 +221,20 @@ pipeline { makeTarget("Libbeat stress-tests", "STRESS_TEST_OPTIONS='-timeout=20m -race -v -parallel 1' -C libbeat stress-tests") } } - stage('Libbeat x-pack'){ - steps { - makeTarget("Libbeat x-pack Linux", "-C x-pack/libbeat testsuite") - } + } + } + stage('Libbeat x-pack'){ + agent { label 'ubuntu && immutable' } + options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return env.BUILD_LIBBEAT_XPACK != "false" } } + steps { + makeTarget("Libbeat x-pack Linux", "-C x-pack/libbeat testsuite") + } } stage('Metricbeat Unit tests'){ agent { label 'ubuntu && immutable' } @@ -274,13 +275,13 @@ pipeline { makeTarget("Metricbeat System tests", "-C metricbeat update system-tests-environment coverage-report") } } - stage('Metricbeat oss'){ + stage('Metricbeat x-pack'){ agent { label 'ubuntu && immutable' } options { skipDefaultCheckout() } when { beforeAgent true expression { - return env.BUILD_METRICBEAT != "false" + return env.BUILD_METRICBEAT_XPACK != "false" } } steps { @@ -350,7 +351,7 @@ pipeline { when { beforeAgent true expression { - return env.BUILD_DOCKERLOGBEAT != "false" + return env.BUILD_DOCKERLOGBEAT_XPACK != "false" } } stages { @@ -397,7 +398,7 @@ pipeline { when { beforeAgent true expression { - return env.BUILD_FUNCTIONBEAT != "false" + return env.BUILD_FUNCTIONBEAT_XPACK != "false" } } stages { @@ -628,3 +629,71 @@ def isChanged(patterns){ || isGitRegionMatch(patterns: ["^libbeat/.*"], comparator: 'regexp') ) } + +def loadConfigEnvVars(){ + env.BUILD_AUDITBEAT = isChanged(["^auditbeat/.*"]) + env.BUILD_AUDITBEAT_XPACK = isChanged([ + "^auditbeat/.*", + "^x-pack/auditbeat/.*", + "^x-pack/libbeat/.*", + ]) + env.BUILD_DOCKERLOGBEAT_XPACK = isChanged([ + "^x-pack/dockerlogbeat/.*", + "^x-pack/libbeat/.*", + ]) + env.BUILD_DOCS = isGitRegionMatch( + patterns: ["^docs/.*"], + comparator: 'regexp' + ) || params.runAllStages + env.BUILD_FILEBEAT = isChanged(["^filebeat/.*"]) + env.BUILD_FILEBEAT_XPACK = isChanged([ + "^filebeat/.*", + "^x-pack/filebeat/.*", + "^x-pack/libbeat/.*", + ]) + env.BUILD_FUNCTIONBEAT_XPACK = isChanged([ + "^x-pack/functionbeat/.*", + "^x-pack/libbeat/.*", + ]) + env.BUILD_GENERATOR = isChanged(["^generator/.*"]) + env.BUILD_HEARTBEAT = isChanged(["^heartbeat/.*"]) + env.BUILD_HEARTBEAT_XPACK = isChanged([ + "^heartbeat/.*", + "^x-pack/heartbeat/.*", + "^x-pack/libbeat/.*", + ]) + env.BUILD_JOURNALBEAT = isChanged(["^journalbeat/.*"]) + env.BUILD_JOURNALBEAT_XPACK = isChanged([ + "^journalbeat/.*", + "^x-pack/journalbeat/.*", + "^x-pack/libbeat/.*", + ]) + env.BUILD_KUBERNETES = isChanged(["^deploy/kubernetes/*"]) + env.BUILD_LIBBEAT = isGitRegionMatch( + patterns: ["^libbeat/.*"], + comparator: 'regexp' + ) || params.runAllStages + env.BUILD_LIBBEAT_XPACK = isChanged([ + "^libbeat/.*", + "^x-pack/libbeat/.*", + ]) + env.BUILD_METRICBEAT = isChanged(["^metricbeat/.*"]) + env.BUILD_METRICBEAT_XPACK = isChanged([ + "^metricbeat/.*", + "^x-pack/libbeat/.*", + "^x-pack/metricbeat/.*", + ]) + env.BUILD_PACKETBEAT = isChanged(["^packetbeat/.*"]) + env.BUILD_PACKETBEAT_XPACK = isChanged([ + "^packetbeat/.*", + "^x-pack/libbeat/.*", + "^x-pack/packetbeat/.*", + ]) + env.BUILD_WINLOGBEAT = isChanged(["^winlogbeat/.*"]) + env.BUILD_WINLOGBEAT_XPACK = isChanged([ + "^winlogbeat/.*", + "^x-pack/libbeat/.*", + "^x-pack/winlogbeat/.*", + ]) + env.GO_VERSION = readFile(".go-version").trim() +} From 2e208aa2169fc429a7a79df66d356574b6e46b86 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 5 Feb 2020 09:38:28 +0100 Subject: [PATCH 11/14] fit: use isChanged for all matches, and add the libbeat match where it is needed --- Jenkinsfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 36075df7780..c9b8a2c4d90 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -626,7 +626,6 @@ def reportCoverage(){ def isChanged(patterns){ return (params.runAllStages || isGitRegionMatch(patterns: patterns, comparator: 'regexp') - || isGitRegionMatch(patterns: ["^libbeat/.*"], comparator: 'regexp') ) } @@ -641,10 +640,10 @@ def loadConfigEnvVars(){ "^x-pack/dockerlogbeat/.*", "^x-pack/libbeat/.*", ]) - env.BUILD_DOCS = isGitRegionMatch( + env.BUILD_DOCS = isChanged( patterns: ["^docs/.*"], comparator: 'regexp' - ) || params.runAllStages + ) env.BUILD_FILEBEAT = isChanged(["^filebeat/.*"]) env.BUILD_FILEBEAT_XPACK = isChanged([ "^filebeat/.*", @@ -669,10 +668,10 @@ def loadConfigEnvVars(){ "^x-pack/libbeat/.*", ]) env.BUILD_KUBERNETES = isChanged(["^deploy/kubernetes/*"]) - env.BUILD_LIBBEAT = isGitRegionMatch( + env.BUILD_LIBBEAT = isChanged( patterns: ["^libbeat/.*"], comparator: 'regexp' - ) || params.runAllStages + ) env.BUILD_LIBBEAT_XPACK = isChanged([ "^libbeat/.*", "^x-pack/libbeat/.*", From 6e6eeb6b63b4beb44a9e820c569b4a9b3a24cf10 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 5 Feb 2020 12:14:47 +0100 Subject: [PATCH 12/14] feat: add x-pack/winlogbeat windows unit tests --- Jenkinsfile | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c9b8a2c4d90..bdc41e0ed8a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -392,6 +392,25 @@ pipeline { } } } + stage('Winlogbeat Windows x-pack'){ + agent { label 'windows-immutable && windows-2019' } + options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return env.BUILD_WINLOGBEAT_XPACK != "false" + } + } + when { + beforeAgent true + expression { + return params.windowsTest + } + } + steps { + mageTargetWin("Winlogbeat Windows Unit test", "-d x-pack/winlogbeat goUnitTest") + } + } stage('Functionbeat'){ agent { label 'ubuntu && immutable' } options { skipDefaultCheckout() } @@ -624,7 +643,8 @@ def reportCoverage(){ } def isChanged(patterns){ - return (params.runAllStages + return ( + params.runAllStages || isGitRegionMatch(patterns: patterns, comparator: 'regexp') ) } From 16425706cd0a5d025a8df914bb6a2d378f8b4f98 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 5 Feb 2020 12:26:03 +0100 Subject: [PATCH 13/14] fix: duplicate when condition --- Jenkinsfile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bdc41e0ed8a..a25aaa4f9a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -398,13 +398,7 @@ pipeline { when { beforeAgent true expression { - return env.BUILD_WINLOGBEAT_XPACK != "false" - } - } - when { - beforeAgent true - expression { - return params.windowsTest + return params.windowsTest && env.BUILD_WINLOGBEAT_XPACK != "false" } } steps { From f31c40d035f3ea62240c6cb80e114956ef75663e Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 5 Feb 2020 15:44:57 +0100 Subject: [PATCH 14/14] Update Jenkinsfile Co-Authored-By: Andrew Kroh --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a25aaa4f9a2..9a268376301 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -402,7 +402,7 @@ pipeline { } } steps { - mageTargetWin("Winlogbeat Windows Unit test", "-d x-pack/winlogbeat goUnitTest") + mageTargetWin("Winlogbeat Windows Unit test", "-d x-pack/winlogbeat update:fields goUnitTest") } } stage('Functionbeat'){