From 3e7f0958b93ca070c6b2813a18694a758602c199 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:51:06 +0200 Subject: [PATCH] Split java/ruby unit test steps on Windows (#15888) (#15992) As a follow up to #15861 this commit splits the current unit tests step for the Windows JDK matrix pipeline to two that run Java and Ruby unit tests separately. Closes https://github.com/elastic/logstash/issues/15566 (cherry picked from commit c0c213d17efdcef18bcd88cb82c5bd1ce91842d3) Co-authored-by: Dimitrios Liappis --- .../jdk-matrix-tests/generate-steps.py | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.buildkite/scripts/jdk-matrix-tests/generate-steps.py b/.buildkite/scripts/jdk-matrix-tests/generate-steps.py index 2f9fd7e9f23..681272b85bb 100644 --- a/.buildkite/scripts/jdk-matrix-tests/generate-steps.py +++ b/.buildkite/scripts/jdk-matrix-tests/generate-steps.py @@ -135,13 +135,30 @@ def __init__(self, os: str, jdk: str, group_key: str, agent: typing.Union[GCPAge def all_jobs(self) -> list[typing.Callable[[], JobRetValues]]: return [ self.init_annotation, - self.unit_tests, + self.java_unit_test, + self.ruby_unit_test, ] - def unit_tests(self) -> JobRetValues: - step_name_human = "Unit Test (Java/Ruby)" - step_key = f"{self.group_key}-unit-test" - test_command = rf'''.\\.buildkite\\scripts\\jdk-matrix-tests\\launch-command.ps1 -JDK "{self.jdk}" -StepNameHuman "{step_name_human}" -AnnotateContext "{self.group_key}" -CIScript ".\\ci\\unit_tests.ps1" -Annotate + def java_unit_test(self) -> JobRetValues: + step_name_human = "Java Unit Test" + step_key = f"{self.group_key}-java-unit-test" + test_command = rf'''.\\.buildkite\\scripts\\jdk-matrix-tests\\launch-command.ps1 -JDK "{self.jdk}" -StepNameHuman "{step_name_human}" -AnnotateContext "{self.group_key}" -CIScript ".\\ci\\unit_tests.ps1 java" -Annotate + ''' + + return JobRetValues( + step_label=step_name_human, + command=LiteralScalarString(test_command), + step_key=step_key, + depends=self.init_annotation_key, + artifact_paths=["build_reports.zip"], + agent=self.agent.to_dict(), + retry=copy.deepcopy(ENABLED_RETRIES), + ) + + def ruby_unit_test(self) -> JobRetValues: + step_name_human = "Ruby Unit Test" + step_key = f"{self.group_key}-ruby-unit-test" + test_command = rf'''.\\.buildkite\\scripts\\jdk-matrix-tests\\launch-command.ps1 -JDK "{self.jdk}" -StepNameHuman "{step_name_human}" -AnnotateContext "{self.group_key}" -CIScript ".\\ci\\unit_tests.ps1 ruby" -Annotate ''' return JobRetValues(