Skip to content

Commit

Permalink
chore(ci): change to use the starting point of the previous branch fo…
Browse files Browse the repository at this point in the history
…r old plugin compatibility test (#13536)

When a new minor version is just bumped, the tag x.x.0 doesn't exist
yet. So we change it to use the starting point of the previous branch
instead of the tag x.x.0 of the previous branch.
  • Loading branch information
catbro666 authored Aug 22, 2024
1 parent dfc6029 commit 5f68365
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,18 @@ jobs:
KONG_VERSION=$(bash scripts/grep-kong-version.sh)
major=$(echo "$KONG_VERSION" | cut -d. -f1)
minor=$(echo "$KONG_VERSION" | cut -d. -f2)
# if the minor version isn't 0, use the first release of the previous minor version;
# if the minor version isn't 0, use the first release or starting point of the previous minor branch;
# otherwise just leave it empty, so later the default branch or commit will be used.
if [ "$minor" -ne 0 ]; then
minor=$((minor - 1))
echo "ref=$major.$minor.0" >> $GITHUB_OUTPUT
git fetch origin master -t
if [ $(git tag -l "$major.$minor.0") ]; then
echo "ref=$major.$minor.0" >> $GITHUB_OUTPUT
else
git fetch origin release/$major.$minor.x
COMMIT_HASH=$(git merge-base origin/master origin/release/$major.$minor.x)
echo "ref=$COMMIT_HASH" >> $GITHUB_OUTPUT
fi
else
echo "ref=" >> $GITHUB_OUTPUT
fi
Expand Down

1 comment on commit 5f68365

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Bazel Build

Docker image available kong/kong:5f6836542dbdecba0089908ba3b6a9bda76e7c5d
Artifacts available https://github.com/Kong/kong/actions/runs/10504284814

Please sign in to comment.