Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Fix scheduled JDK matrix CI jobs #15623

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Contributor Author

@dliappis dliappis Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we discussed offline with @alexsapran who pointed out that another alternative for this would be to define it as env vars in the schedule branch section. In that case, the env vars here will always override any values in the schedule.

I think I prefer things as they are here, though, because we won't have different defaults per branch and will not need to define them in catalog-info.yaml and the source of truth for the defaults remains in the pipeline file.


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