From 777daee59937d6ca47e13cb05af15ddebad59daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 30 Jul 2021 08:21:34 +0200 Subject: [PATCH] chore: decouple unit and integration tests on CI (#27069) --- 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 876696ded99d..abfe7e1cfcfe 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 53557831c820..55a296e9fdb0 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 module-compat-7.11: mage: >- ## Run module integration tests under ES 7.11 to ensure ingest pipeline compatibility. diff --git a/heartbeat/Jenkinsfile.yml b/heartbeat/Jenkinsfile.yml index b605fea3e8f1..f760966bf620 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 1e9f77240286..b97771161451 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 86cf53094b97..c9d9fd211d4f 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 c608d5ed54fc..3f71e9df6150 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 7b45fe7ae7aa..bef4d4527a5f 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 a425b6764c94..58e555e12686 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 module-compat-7.11: mage: >- ## Run module integration tests under ES 7.11 to ensure ingest pipeline compatibility. @@ -112,4 +117,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 8128d9d716fd..325dca6daf3e 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 bdf8b8f98174..a792e09a220c 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 5d295d739043..76c1847de08b 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 7ed2ac5e088b..6329e6f3ed0b 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 40227865b5f9..3fa92bce14fd 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"