From 2777a9fef4e8adf408a2083ea4cef712d5e5f917 Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Thu, 21 Dec 2023 09:42:14 +0200 Subject: [PATCH] [ci] Add testing phase to exhaustive tests suite (#15711) This is the second part of the migration of the exhaustive/main Jenkins Job to Buildkite. So far we've migrated the "compatibility phase" and this commit adds the "testing phase"[^1], which is essentially the same amount of tests that we ran on PR jobs. Relates https://github.com/elastic/ingest-dev/issues/1722 Depends https://github.com/elastic/logstash/pull/15708 [^1]: For more details, refer to the sequence diagram in https://github.com/elastic/ingest-dev/issues/1722#issuecomment-1824378635 (cherry picked from commit 9538338abbd282395d758bf807f91246b597d53e) --- .../scripts/exhaustive-tests/generate-steps.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.buildkite/scripts/exhaustive-tests/generate-steps.py b/.buildkite/scripts/exhaustive-tests/generate-steps.py index 07a302c13aa..03ad4ceb4ea 100644 --- a/.buildkite/scripts/exhaustive-tests/generate-steps.py +++ b/.buildkite/scripts/exhaustive-tests/generate-steps.py @@ -9,6 +9,7 @@ VM_IMAGES_FILE = ".buildkite/scripts/common/vm-images.json" VM_IMAGE_PREFIX = "platform-ingest-logstash-multi-jdk-" +CUR_PATH = os.path.dirname(os.path.abspath(__file__)) def slugify_bk_key(key: str) -> str: """ @@ -20,6 +21,10 @@ def slugify_bk_key(key: str) -> str: return key.translate(mapping_table) +def testing_phase_steps() -> typing.Dict[str, typing.List[typing.Any]]: + with open(os.path.join(CUR_PATH, "..", "..", "pull_request_pipeline.yml")) as fp: + return YAML().load(fp) + def compat_linux_step(imagesuffix: str) -> dict[str, typing.Any]: linux_command = LiteralScalarString("""#!/usr/bin/env bash set -eo pipefail @@ -89,15 +94,23 @@ def randomized_windows_os() -> str: structure = {"steps": []} + structure["steps"].append({ + "group": "Testing Phase", + "key": "testing-phase", + **testing_phase_steps(), + }) + structure["steps"].append({ "group": "Compatibility / Linux", "key": "compatibility-linux", + "depends_on": "testing-phase", "steps": compat_linux_steps, }) structure["steps"].append({ "group": "Compatibility / Windows", "key": "compatibility-windows", + "depends_on": "testing-phase", "steps": [compat_windows_step(imagesuffix=windows_test_os)], })