From 980a3b1752315e5eff08c12ee6bd7553187d83ee Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 30 Jul 2021 11:27:05 +0200 Subject: [PATCH] chore: decouple unit and integration tests on CI (#27069) (#27149) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 777daee59937d6ca47e13cb05af15ddebad59daf) Co-authored-by: Manuel de la Peña --- auditbeat/Jenkinsfile.yml | 4 ++-- filebeat/Jenkinsfile.yml | 11 ++++++++--- heartbeat/Jenkinsfile.yml | 12 ++++++++++-- libbeat/Jenkinsfile.yml | 7 +++++-- packetbeat/Jenkinsfile.yml | 4 ++-- x-pack/dockerlogbeat/Jenkinsfile.yml | 7 +++++-- x-pack/elastic-agent/Jenkinsfile.yml | 7 +++++-- x-pack/filebeat/Jenkinsfile.yml | 13 +++++++++---- x-pack/functionbeat/Jenkinsfile.yml | 7 +++++-- x-pack/heartbeat/Jenkinsfile.yml | 9 ++++++--- x-pack/libbeat/Jenkinsfile.yml | 10 ++++++++-- x-pack/osquerybeat/Jenkinsfile.yml | 7 +++++-- x-pack/packetbeat/Jenkinsfile.yml | 4 ++-- 13 files changed, 72 insertions(+), 30 deletions(-) diff --git a/auditbeat/Jenkinsfile.yml b/auditbeat/Jenkinsfile.yml index 876696ded99..abfe7e1cfcf 100644 --- a/auditbeat/Jenkinsfile.yml +++ b/auditbeat/Jenkinsfile.yml @@ -35,8 +35,8 @@ stages: branches: true ## for all the branches tags: true ## for all the tags stage: extended - build: - mage: "mage build test" + unitTest: + mage: "mage build unitTest" stage: mandatory crosscompile: make: "make -C auditbeat crosscompile" diff --git a/filebeat/Jenkinsfile.yml b/filebeat/Jenkinsfile.yml index 121abfbb6ba..0cf61544a6f 100644 --- a/filebeat/Jenkinsfile.yml +++ b/filebeat/Jenkinsfile.yml @@ -35,9 +35,14 @@ stages: branches: true ## for all the branches tags: true ## for all the tags stage: extended - build: - mage: "mage build test" - withModule: true ## run the ITs only if the changeset affects a specific module. + unitTest: + mage: "mage build unitTest" + stage: mandatory + goIntegTest: + mage: "mage goIntegTest" + stage: mandatory + pythonIntegTest: + mage: "mage pythonIntegTest" ## run the ITs only if the changeset affects a specific module. stage: mandatory macos: mage: "mage build unitTest" diff --git a/heartbeat/Jenkinsfile.yml b/heartbeat/Jenkinsfile.yml index b605fea3e8f..f760966bf62 100644 --- a/heartbeat/Jenkinsfile.yml +++ b/heartbeat/Jenkinsfile.yml @@ -35,8 +35,16 @@ stages: branches: true ## for all the branches tags: true ## for all the tags stage: extended - build: - mage: "mage build test" + unitTest: + mage: "mage build unitTest" + stage: mandatory + goIntegTest: + mage: "mage goIntegTest" + withModule: true + stage: mandatory + pythonIntegTest: + mage: "mage pythonIntegTest" + withModule: true stage: mandatory macos: mage: "mage build unitTest" diff --git a/libbeat/Jenkinsfile.yml b/libbeat/Jenkinsfile.yml index 1e9f7724028..b9777116145 100644 --- a/libbeat/Jenkinsfile.yml +++ b/libbeat/Jenkinsfile.yml @@ -31,8 +31,11 @@ stages: - "arm" parameters: - "armTest" - build: - mage: "mage build test" + unitTest: + mage: "mage build unitTest" + stage: mandatory + goIntegTest: + mage: "mage goIntegTest" stage: mandatory crosscompile: make: "make -C libbeat crosscompile" diff --git a/packetbeat/Jenkinsfile.yml b/packetbeat/Jenkinsfile.yml index 86cf53094b9..c9d9fd211d4 100644 --- a/packetbeat/Jenkinsfile.yml +++ b/packetbeat/Jenkinsfile.yml @@ -36,8 +36,8 @@ stages: branches: true ## for all the branches tags: true ## for all the tags stage: extended - build: - mage: "mage build test" + unitTest: + mage: "mage build unitTest" stage: mandatory macos: mage: "mage build unitTest" diff --git a/x-pack/dockerlogbeat/Jenkinsfile.yml b/x-pack/dockerlogbeat/Jenkinsfile.yml index c608d5ed54f..3f71e9df615 100644 --- a/x-pack/dockerlogbeat/Jenkinsfile.yml +++ b/x-pack/dockerlogbeat/Jenkinsfile.yml @@ -19,8 +19,11 @@ stages: make -C x-pack/dockerlogbeat update; make check-no-changes; stage: lint - build: - mage: "mage build test" + unitTest: + mage: "mage build unitTest" + stage: mandatory + goIntegTest: + mage: "mage goIntegTest" withModule: true ## run the ITs only if the changeset affects a specific module. stage: mandatory packaging-linux: diff --git a/x-pack/elastic-agent/Jenkinsfile.yml b/x-pack/elastic-agent/Jenkinsfile.yml index 7b45fe7ae7a..bef4d4527a5 100644 --- a/x-pack/elastic-agent/Jenkinsfile.yml +++ b/x-pack/elastic-agent/Jenkinsfile.yml @@ -33,8 +33,11 @@ stages: branches: true ## for all the branches tags: true ## for all the tags stage: extended - build: - mage: "mage build test" + unitTest: + mage: "mage build unitTest" + stage: mandatory + goIntegTest: + mage: "mage goIntegTest" stage: mandatory macos: mage: "mage build unitTest" diff --git a/x-pack/filebeat/Jenkinsfile.yml b/x-pack/filebeat/Jenkinsfile.yml index 1246581eb0d..e41e4c76658 100644 --- a/x-pack/filebeat/Jenkinsfile.yml +++ b/x-pack/filebeat/Jenkinsfile.yml @@ -35,9 +35,14 @@ stages: branches: true ## for all the branches tags: true ## for all the tags stage: extended - build: - mage: "mage build test" - withModule: true ## run the ITs only if the changeset affects a specific module. + unitTest: + mage: "mage build unitTest" + stage: mandatory + goIntegTest: + mage: "mage goIntegTest" + stage: mandatory + pythonIntegTest: + mage: "mage pythonIntegTest" ## run the ITs only if the changeset affects a specific module. stage: mandatory macos: mage: "mage build unitTest" @@ -104,4 +109,4 @@ stages: enabled: false platforms: ## override default label in this specific stage. - "arm" - stage: packaging \ No newline at end of file + stage: packaging diff --git a/x-pack/functionbeat/Jenkinsfile.yml b/x-pack/functionbeat/Jenkinsfile.yml index 8128d9d716f..325dca6daf3 100644 --- a/x-pack/functionbeat/Jenkinsfile.yml +++ b/x-pack/functionbeat/Jenkinsfile.yml @@ -30,8 +30,11 @@ stages: - "arm" parameters: - "armTest" - build: - mage: "mage build test && GO_VERSION=1.13.1 mage testGCPFunctions" + unitTest: + mage: "mage build unitTest && GO_VERSION=1.13.1 mage testGCPFunctions" + stage: mandatory + goIntegTest: + mage: "mage goIntegTest" stage: mandatory macos: mage: "mage build unitTest" diff --git a/x-pack/heartbeat/Jenkinsfile.yml b/x-pack/heartbeat/Jenkinsfile.yml index bdf8b8f9817..a792e09a220 100644 --- a/x-pack/heartbeat/Jenkinsfile.yml +++ b/x-pack/heartbeat/Jenkinsfile.yml @@ -21,11 +21,14 @@ stages: make -C heartbeat update; make check-no-changes; stage: lint - build: - mage: "mage build test" + unitTest: + mage: "mage build unitTest" + stage: mandatory + goIntegTest: + mage: "mage goIntegTest" stage: mandatory macos: - mage: "mage build test" + mage: "mage build unitTest" platforms: ## override default label in this specific stage. - "macosx&&x86_64" when: ## Override the top-level when. diff --git a/x-pack/libbeat/Jenkinsfile.yml b/x-pack/libbeat/Jenkinsfile.yml index 5d295d73904..76c1847de08 100644 --- a/x-pack/libbeat/Jenkinsfile.yml +++ b/x-pack/libbeat/Jenkinsfile.yml @@ -33,6 +33,12 @@ stages: branches: true ## for all the branches tags: true ## for all the tags stage: extended - build: - mage: "mage build test" + unitTest: + mage: "mage build unitTest" + stage: mandatory + goIntegTest: + mage: "mage goIntegTest" + stage: mandatory + pythonIntegTest: + mage: "mage pythonIntegTest" stage: mandatory diff --git a/x-pack/osquerybeat/Jenkinsfile.yml b/x-pack/osquerybeat/Jenkinsfile.yml index 7ed2ac5e088..6329e6f3ed0 100644 --- a/x-pack/osquerybeat/Jenkinsfile.yml +++ b/x-pack/osquerybeat/Jenkinsfile.yml @@ -19,8 +19,11 @@ stages: make -C x-pack/osquerybeat update; make check-no-changes; stage: lint - build: - mage: "mage build test" + unitTest: + mage: "mage build unitTest" + stage: mandatory + goIntegTest: + mage: "mage goIntegTest" stage: mandatory macos: mage: "mage build unitTest" diff --git a/x-pack/packetbeat/Jenkinsfile.yml b/x-pack/packetbeat/Jenkinsfile.yml index 40227865b5f..3fa92bce14f 100644 --- a/x-pack/packetbeat/Jenkinsfile.yml +++ b/x-pack/packetbeat/Jenkinsfile.yml @@ -36,8 +36,8 @@ stages: branches: true ## for all the branches tags: true ## for all the tags stage: extended - build: - mage: "mage build test" + unitTest: + mage: "mage build unitTest" stage: mandatory macos: mage: "mage build unitTest"