Skip to content

Commit 43144b4

Browse files
committed
Use centralized source of truth for active branches
This commit simplifies the DRA process in Logstash by removing the need to maintain a separate file for the active branches, and instead rely on a centrally maintained file containing source of truth.
1 parent a847ef7 commit 43144b4

3 files changed

Lines changed: 6 additions & 32 deletions

File tree

.buildkite/scripts/common/trigger-pipeline-generate-steps.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set -eo pipefail
1212
# https://github.com/elastic/ingest-dev/issues/2664
1313
# *******************************************************
1414

15-
ACTIVE_BRANCHES_URL="https://raw.githubusercontent.com/elastic/logstash/main/ci/branches.json"
15+
ACTIVE_BRANCHES_URL="https://storage.googleapis.com/artifacts-api/snapshots/branches.json"
1616
EXCLUDE_BRANCHES_ARRAY=()
1717
BRANCHES=()
1818

@@ -63,7 +63,7 @@ exclude_branches_to_array
6363
set -u
6464
set +e
6565
# pull releaseable branches from $ACTIVE_BRANCHES_URL
66-
readarray -t ELIGIBLE_BRANCHES < <(curl --retry-all-errors --retry 5 --retry-delay 5 -fsSL $ACTIVE_BRANCHES_URL | jq -r '.branches[].branch')
66+
readarray -t ELIGIBLE_BRANCHES < <(curl --retry-all-errors --retry 5 --retry-delay 5 -fsSL $ACTIVE_BRANCHES_URL | jq -r '.branches[]')
6767
if [[ $? -ne 0 ]]; then
6868
echo "There was an error downloading or parsing the json output from [$ACTIVE_BRANCHES_URL]. Exiting."
6969
exit 1

.buildkite/scripts/snyk/resolve_stack_version.sh

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

77
set -e
88

9-
VERSION_URL="https://raw.githubusercontent.com/elastic/logstash/main/ci/branches.json"
9+
VERSION_URL="https://storage.googleapis.com/artifacts-api/snapshots/branches.json"
1010

1111
echo "Fetching versions from $VERSION_URL"
12-
VERSIONS=$(curl --silent $VERSION_URL)
13-
TARGET_BRANCHES=$(echo "$VERSIONS" | jq -r '.branches | map(.branch) | join(" ")')
14-
TARGET_BRANCHES=($TARGET_BRANCHES)
12+
readarray -t TARGET_BRANCHES < <(curl --retry-all-errors --retry 5 --retry-delay 5 -fsSL $VERSION_URL | jq -r '.branches[]')
13+
echo "${TARGET_BRANCHES[@]}"
14+

ci/branches.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)