Skip to content

Commit

Permalink
[ci] Fix scheduled JDK matrix CI jobs (#15623)
Browse files Browse the repository at this point in the history
This commit fixes failed scheduled JDK matrix CI jobs, that
can't access the default values for the OS and JDK from the input
steps, as observed in [^1] and [^2].

[^1] https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/53#018c1371-b760-4c28-9203-340c0a1df150
[^2]: https://buildkite.com/elastic/logstash-windows-jdk-matrix-pipeline/builds/35#018c1371-b72e-48b4-b707-ce103eb6039c

(cherry picked from commit f0019bf)
  • Loading branch information
dliappis authored and logstashmachine committed Nov 28, 2023
1 parent 6f4a7d4 commit 9f316a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions .buildkite/linux_jdk_matrix_pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json

env:
DEFAULT_MATRIX_OS: "ubuntu-2204"
DEFAULT_MATRIX_JDK: "adoptiumjdk_17"

steps:
- input: "Test Parameters"
if: build.source != "schedule"
Expand All @@ -9,7 +13,7 @@ steps:
hint: "The operating system variant(s) to run on:"
required: true
multiple: true
default: "ubuntu-2204"
default: "${DEFAULT_MATRIX_OS}"
options:
- label: "Ubuntu 22.04"
value: "ubuntu-2204"
Expand Down Expand Up @@ -43,7 +47,7 @@ steps:
hint: "The JDK to test with:"
required: true
multiple: true
default: "adoptiumjdk_17"
default: "${DEFAULT_MATRIX_JDK}"
options:
- label: "Adoptium JDK 17 (Eclipse Temurin)"
value: "adoptiumjdk_17"
Expand All @@ -68,8 +72,8 @@ steps:
python3 -m pip install ruamel.yaml
echo "--- Printing generated dynamic steps"
export MATRIX_OSES="$(buildkite-agent meta-data get matrix-os)"
export MATRIX_JDKS="$(buildkite-agent meta-data get matrix-jdk)"
export MATRIX_OSES="$(buildkite-agent meta-data get matrix-os --default=${DEFAULT_MATRIX_OS})"
export MATRIX_JDKS="$(buildkite-agent meta-data get matrix-jdk --default=${DEFAULT_MATRIX_JDK})"
set +eo pipefail
python3 .buildkite/scripts/jdk-matrix-tests/generate-steps.py >pipeline_steps.yml
if [[ $$? -ne 0 ]]; then
Expand Down
12 changes: 8 additions & 4 deletions .buildkite/windows_jdk_matrix_pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json

env:
DEFAULT_MATRIX_OS: "windows-2022"
DEFAULT_MATRIX_JDK: "adoptiumjdk_17"

steps:
- input: "Test Parameters"
if: build.source != "schedule"
Expand All @@ -9,7 +13,7 @@ steps:
hint: "The operating system variant(s) to run on:"
required: true
multiple: true
default: "windows-2022"
default: "${DEFAULT_MATRIX_OS}"
options:
- label: "Windows 2022"
value: "windows-2022"
Expand All @@ -23,7 +27,7 @@ steps:
hint: "The JDK to test with:"
required: true
multiple: true
default: "adoptiumjdk_17"
default: "${DEFAULT_MATRIX_JDK}"
options:
- label: "Adoptium JDK 17 (Eclipse Temurin)"
value: "adoptiumjdk_17"
Expand All @@ -48,8 +52,8 @@ steps:
python3 -m pip install ruamel.yaml
echo "--- Printing generated dynamic steps"
export MATRIX_OSES="$(buildkite-agent meta-data get matrix-os)"
export MATRIX_JDKS="$(buildkite-agent meta-data get matrix-jdk)"
export MATRIX_OSES="$(buildkite-agent meta-data get matrix-os --default=${DEFAULT_MATRIX_OS})"
export MATRIX_JDKS="$(buildkite-agent meta-data get matrix-jdk --default=${DEFAULT_MATRIX_JDK})"
set +eo pipefail
python3 .buildkite/scripts/jdk-matrix-tests/generate-steps.py >pipeline_steps.yml
if [[ $$? -ne 0 ]]; then
Expand Down

0 comments on commit 9f316a5

Please sign in to comment.