Skip to content

Commit 6355586

Browse files
committed
Update buildkite script to look for new logstash releases location
This commit updates the buildkite scripts to look in the `.ci` repo in the logstash-plugins org for the new location of logstash releases.
1 parent 6a03524 commit 6355586

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

.buildkite/scripts/build-pipeline/generate-steps.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from ruamel.yaml import YAML
88

9-
RELEASES_URL = "https://raw.githubusercontent.com/elastic/logstash/main/ci/logstash_releases.json"
9+
RELEASES_URL = "https://raw.githubusercontent.com/logstash-plugins/.ci/refs/heads/1.x/logstash-versions.yml"
1010
TEST_COMMAND: typing.final = ".buildkite/scripts/run_tests.sh"
1111

1212

@@ -69,7 +69,8 @@ def generate_steps_for_main_branch(versions) -> list:
6969
"steps": []}
7070

7171
response = call_url_with_retry(RELEASES_URL)
72-
versions_json: typing.final = response.json()
72+
yaml = YAML(typ='safe')
73+
versions_yaml: typing.final = yaml.load(response.text)
7374

7475
# Use BUILDKITE_SOURCE to figure out PR merge or schedule.
7576
# If PR merge, no need to run builds on all branches, target branch will be good
@@ -79,8 +80,8 @@ def generate_steps_for_main_branch(versions) -> list:
7980
# - manual kick off will be on PR or entire main branch, can be decided with BUILDKITE_BRANCH
8081
bk_source = os.getenv("BUILDKITE_SOURCE")
8182
bk_branch = os.getenv("BUILDKITE_BRANCH")
82-
steps = generate_steps_for_scheduler(versions_json) if (bk_source == "schedule" or bk_branch == "main") \
83-
else generate_steps_for_main_branch(versions_json)
83+
steps = generate_steps_for_scheduler(versions_yaml) if (bk_source == "schedule" or bk_branch == "main") \
84+
else generate_steps_for_main_branch(versions_yaml)
8485

8586
group_desc = f"Build steps"
8687
key_desc = "build-steps"

.buildkite/scripts/e2e-pipeline/generate-steps.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from requests.adapters import HTTPAdapter, Retry
66
from ruamel.yaml import YAML
77

8-
RELEASES_URL = "https://raw.githubusercontent.com/elastic/logstash/main/ci/logstash_releases.json"
8+
RELEASES_URL = "https://raw.githubusercontent.com/logstash-plugins/.ci/refs/heads/1.x/logstash-versions.yml"
99
TEST_COMMAND: typing.final = ".buildkite/scripts/run_e2e_tests.sh"
1010

1111

@@ -67,7 +67,8 @@ def generate_steps_for_main_branch(versions) -> list:
6767
"steps": []}
6868

6969
response = call_url_with_retry(RELEASES_URL)
70-
versions_json: typing.final = response.json()
70+
yaml = YAML(typ='safe')
71+
versions_yaml: typing.final = yaml.load(response.text)
7172

7273
# Use BUILDKITE_SOURCE to figure out PR merge or schedule.
7374
# If PR merge, no need to run builds on all branches, target branch will be good
@@ -77,8 +78,8 @@ def generate_steps_for_main_branch(versions) -> list:
7778
# - manual kick off will be on PR or entire main branch, can be decided with BUILDKITE_BRANCH
7879
bk_source = os.getenv("BUILDKITE_SOURCE")
7980
bk_branch = os.getenv("BUILDKITE_BRANCH")
80-
steps = generate_steps_for_scheduler(versions_json) if (bk_source == "schedule" or bk_branch == "main") \
81-
else generate_steps_for_main_branch(versions_json)
81+
steps = generate_steps_for_scheduler(versions_yaml) if (bk_source == "schedule" or bk_branch == "main") \
82+
else generate_steps_for_main_branch(versions_yaml)
8283

8384
group_desc = f"E2E steps"
8485
key_desc = "e2e-steps"

.buildkite/scripts/pull-request-pipeline/generate-steps.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from ruamel.yaml import YAML
88

9-
RELEASES_URL = "https://raw.githubusercontent.com/elastic/logstash/main/ci/logstash_releases.json"
9+
RELEASES_URL = "https://raw.githubusercontent.com/logstash-plugins/.ci/refs/heads/1.x/logstash-versions.yml"
1010
TEST_MATRIX_URL = "https://raw.githubusercontent.com/elastic/logstash-filter-elastic_integration/main/.buildkite/pull" \
1111
"-request-test-matrix.yml"
1212
TEST_COMMAND: typing.final = ".buildkite/scripts/run_tests.sh"
@@ -68,7 +68,8 @@ def make_matrix_version_key(branch: str) -> str:
6868

6969
steps = []
7070
response = call_url_with_retry(RELEASES_URL)
71-
versions_json = response.json()
71+
yaml = YAML(typ='safe')
72+
versions_yaml: typing.final = yaml.load(response.text)
7273

7374
matrix_map = call_url_with_retry(TEST_MATRIX_URL)
7475
matrix_map_yaml = YAML().load(matrix_map.text)
@@ -88,13 +89,13 @@ def make_matrix_version_key(branch: str) -> str:
8889
print(f"matrix_releases: {matrix_releases}")
8990
print(f"matrix_snapshots: {matrix_snapshots}")
9091
for matrix_release in matrix_releases:
91-
full_stack_version: typing.final = versions_json["releases"].get(matrix_release)
92+
full_stack_version: typing.final = versions_yaml["releases"].get(matrix_release)
9293
# noop, if they are declared in the matrix but not in the release
9394
if full_stack_version is not None:
9495
steps += generate_unit_and_integration_test_steps(full_stack_version, "false")
9596

9697
for matrix_snapshot in matrix_snapshots:
97-
full_stack_version: typing.final = versions_json["snapshots"].get(matrix_snapshot)
98+
full_stack_version: typing.final = versions_yaml["snapshots"].get(matrix_snapshot)
9899
# noop, if they are declared in the matrix but not in the snapshot
99100
if full_stack_version is not None:
100101
steps += generate_unit_and_integration_test_steps(full_stack_version, "true")

.buildkite/scripts/run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ else
66
git checkout "$TARGET_BRANCH"
77
fi
88

9-
mkdir -p .ci && curl -sL --retry 5 --retry-delay 5 https://github.com/logstash-plugins/.ci/archive/1.x.tar.gz | tar zxvf - --skip-old-files --strip-components=1 -C .ci --wildcards '*Dockerfile*' '*docker*' '*.sh' && .ci/docker-setup.sh && .ci/docker-run.sh
9+
mkdir -p .ci && curl -sL --retry 5 --retry-delay 5 https://github.com/logstash-plugins/.ci/archive/1.x.tar.gz | tar zxvf - --skip-old-files --strip-components=1 -C .ci --wildcards '*Dockerfile*' '*docker*' '*.sh' '*logstash-versions*' && .ci/docker-setup.sh && .ci/docker-run.sh

0 commit comments

Comments
 (0)