From 18b094355bf692d02963dd08c0e3bb951904f779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Mon, 9 Sep 2024 18:29:36 +0100 Subject: [PATCH] account for the 8.x in DRA publishing task the current DRA publishing task computes the branch from the version contained in the version.yml This is done by taking the major.minor and confirming that a branch exists with that name. However this pattern won't be applicable for 8.x, as that branch currently points to 8.16.0 and there is no 8.16 branch. This commit falls back to reading the buildkite injected BUILDKITE_BRANCH variable. --- .buildkite/scripts/dra/publish.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.buildkite/scripts/dra/publish.sh b/.buildkite/scripts/dra/publish.sh index 598da84bbb7..67c6ce895d9 100755 --- a/.buildkite/scripts/dra/publish.sh +++ b/.buildkite/scripts/dra/publish.sh @@ -15,8 +15,9 @@ RELEASE_VER=`cat versions.yml | sed -n 's/^logstash\:[[:space:]]\([[:digit:]]*\. if [ -n "$(git ls-remote --heads origin $RELEASE_VER)" ] ; then RELEASE_BRANCH=$RELEASE_VER else - RELEASE_BRANCH=main + RELEASE_BRANCH="${BUILDKITE_BRANCH:="main"}" fi +echo "RELEASE BRANCH: $RELEASE_BRANCH" if [ -n "$VERSION_QUALIFIER_OPT" ]; then # Qualifier is passed from CI as optional field and specify the version postfix