From 4b8b811bfcd09adc7fd1a4577a973e7c5aff70fd Mon Sep 17 00:00:00 2001 From: Sam Darwin Date: Thu, 28 Aug 2025 17:01:15 -0600 Subject: [PATCH] Determine boostLatestRelease in GHA (#1904) --- .github/workflows/actions-gcp.yaml | 20 +++++++++++++++++++- kube/boost/values-cppal-dev-gke.yaml | 2 +- kube/boost/values-production-gke.yaml | 2 +- kube/boost/values-stage-gke.yaml | 2 +- kube/boost/values.yaml | 2 +- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/actions-gcp.yaml b/.github/workflows/actions-gcp.yaml index cd76ed98..9c7997ca 100644 --- a/.github/workflows/actions-gcp.yaml +++ b/.github/workflows/actions-gcp.yaml @@ -105,6 +105,24 @@ jobs: echo "FASTLY_SERVICE_ID_2=${{ secrets.FASTLY_SERVICE_ID_CPPAL_DEV_2 }}" >> "$GITHUB_ENV" fi + - name: Determine boost latest release + shell: bash + run: | + set -o pipefail + BOOST_REPOSITORY=https://github.com/boostorg/boost + BOOST_LATEST_RELEASE="master" + # https://stackoverflow.com/questions/10649814/get-last-git-tag-from-a-remote-repo-without-cloning + if multiple_tags=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='-v:refname' $BOOST_REPOSITORY | cut --delimiter='/' --fields=3 ); then + for item in ${multiple_tags}; do + if [[ ${item} =~ boost ]] && [[ ! ${item} =~ beta ]] && [[ ! ${item} =~ rc ]]; then + BOOST_LATEST_RELEASE=${item} + break + fi + done + fi + echo "Discovered BOOST_LATEST_RELEASE is ${BOOST_LATEST_RELEASE}" + echo "BOOST_LATEST_RELEASE=${BOOST_LATEST_RELEASE}" >> "$GITHUB_ENV" + - name: Git - Get Sources uses: actions/checkout@v4 with: @@ -190,7 +208,7 @@ jobs: set -xe TAG=${{ env.SHORT_SHA }} cd kube/boost - helm upgrade --install --create-namespace -n ${{ env.K8S_NAMESPACE }} -f values-${{ env.K8S_NAMESPACE }}-gke.yaml --timeout=3600s --set=Image=${DOCKER_IMAGE} --set-string ImageTag="${TAG}" ${{ env.HELM_RELEASE_NAME }} . + helm upgrade --install --create-namespace -n ${{ env.K8S_NAMESPACE }} -f values-${{ env.K8S_NAMESPACE }}-gke.yaml --timeout=3600s --set=Image=${DOCKER_IMAGE} --set-string boostLatestRelease=${{ env.BOOST_LATEST_RELEASE }} --set-string ImageTag="${TAG}" ${{ env.HELM_RELEASE_NAME }} . kubectl rollout status deployment/$DEPLOYMENT_NAME -n ${{ env.K8S_NAMESPACE }} kubectl get services -o wide -n ${{ env.K8S_NAMESPACE }} diff --git a/kube/boost/values-cppal-dev-gke.yaml b/kube/boost/values-cppal-dev-gke.yaml index fe76069b..5f1b2d1c 100644 --- a/kube/boost/values-cppal-dev-gke.yaml +++ b/kube/boost/values-cppal-dev-gke.yaml @@ -7,7 +7,7 @@ nginxImageTag: "1.21-alpine" deploymentEnvironment: &env dev clientMaxBodySize: 250m -boostLatestRelease: "boost-1.88.0" +boostLatestRelease: "master" replicaCount: "2" diff --git a/kube/boost/values-production-gke.yaml b/kube/boost/values-production-gke.yaml index 863e6441..44014f51 100644 --- a/kube/boost/values-production-gke.yaml +++ b/kube/boost/values-production-gke.yaml @@ -7,7 +7,7 @@ nginxImageTag: "1.21-alpine" deploymentEnvironment: &env production clientMaxBodySize: 250m -boostLatestRelease: "boost-1.88.0" +boostLatestRelease: "master" replicaCount: "2" diff --git a/kube/boost/values-stage-gke.yaml b/kube/boost/values-stage-gke.yaml index ca5f901c..424a7cdf 100644 --- a/kube/boost/values-stage-gke.yaml +++ b/kube/boost/values-stage-gke.yaml @@ -7,7 +7,7 @@ nginxImageTag: "1.21-alpine" deploymentEnvironment: &env stage clientMaxBodySize: 250m -boostLatestRelease: "boost-1.88.0" +boostLatestRelease: "master" replicaCount: "2" diff --git a/kube/boost/values.yaml b/kube/boost/values.yaml index 4e09a7ae..edee94a0 100644 --- a/kube/boost/values.yaml +++ b/kube/boost/values.yaml @@ -7,7 +7,7 @@ nginxImageTag: "1.21-alpine" deploymentEnvironment: &env dev clientMaxBodySize: 250m -boostLatestRelease: "boost-1.88.0" +boostLatestRelease: "master" replicaCount: "2"