[ci] Add testing phase to exhaustive tests suite (#15711) (#15716)

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 9538338abb)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
This commit is contained in:
github-actions[bot] 2023-12-21 10:13:15 +02:00 committed by GitHub
parent 7b05c93020
commit 3dbeb0fcb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,7 @@ from ruamel.yaml.scalarstring import LiteralScalarString
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 @@ if __name__ == "__main__":
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)],
})