Skip to content

Commit

Permalink
ci(DRA): support 8.x branch (#14038) (#14046)
Browse files Browse the repository at this point in the history
(cherry picked from commit c4ec2f3)

Co-authored-by: Victor Martinez <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
mergify[bot] and v1v authored Sep 11, 2024
1 parent f27254d commit 8c184c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .buildkite/scripts/dra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ DRA_BRANCH="$BUILDKITE_BRANCH"
dra_command=collect
BRANCHES_URL=https://storage.googleapis.com/artifacts-api/snapshots/branches.json
curl -s "${BRANCHES_URL}" > active-branches.json
if ! grep -q "\"$BUILDKITE_BRANCH\"" active-branches.json ; then
# as long as `8.x` is not in the active branches, we will explicitly add the condition.
if [ "$BUILDKITE_BRANCH" == "8.x" ] || ! grep -q "\"$BUILDKITE_BRANCH\"" active-branches.json ; then
echo "--- :arrow_right: Release Manager only supports the current active branches, skipping"
echo "BUILDKITE_BRANCH=$BUILDKITE_BRANCH"
echo "BUILDKITE_COMMIT=$BUILDKITE_COMMIT"
Expand All @@ -51,6 +52,9 @@ if ! grep -q "\"$BUILDKITE_BRANCH\"" active-branches.json ; then
MAJOR_MINOR=${VERSION%.*}
if curl -s "https://storage.googleapis.com/artifacts-api/snapshots/main.json" | grep -q "$VERSION" ; then
DRA_BRANCH=main
elif [ "$BUILDKITE_BRANCH" == "8.x" ] ; then
# as long as `8.x` is not in the active branches, we will explicitly add the condition.
DRA_BRANCH=8.x
else
if curl -s "https://storage.googleapis.com/artifacts-api/snapshots/$MAJOR_MINOR.json" | grep -q "$VERSION" ; then
DRA_BRANCH="$MAJOR_MINOR"
Expand Down Expand Up @@ -98,6 +102,7 @@ dra() {
}

dra "snapshot" "$dra_command"
if [[ "${DRA_BRANCH}" != "main" ]]; then
if [[ "${DRA_BRANCH}" != "main" && "${DRA_BRANCH}" != "8.x" ]]; then
echo "DRA_BRANCH is neither 'main' nor '8.x'"
dra "staging" "$dra_command"
fi
2 changes: 1 addition & 1 deletion catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
build_pull_requests: true
build_tags: false
filter_enabled: true
filter_condition: build.branch == "main" || build.branch =~ /^[0-9]+\.[0-9]+$$/ || build.branch =~ /^feature\//
filter_condition: build.branch == "main" || build.branch == "8.x" || build.branch =~ /^[0-9]+\.[0-9]+$$/ || build.branch =~ /^feature\//
cancel_intermediate_builds: false
skip_intermediate_builds: false
teams:
Expand Down

0 comments on commit 8c184c5

Please sign in to comment.