Skip to content

Commit 5861496

Browse files
committed
Determine boostLatestRelease in GHA
1 parent 4b9284e commit 5861496

File tree

5 files changed

+23
-5
lines changed

5 files changed

+23
-5
lines changed

.github/workflows/actions-gcp.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,24 @@ jobs:
105105
echo "FASTLY_SERVICE_ID_2=${{ secrets.FASTLY_SERVICE_ID_CPPAL_DEV_2 }}" >> "$GITHUB_ENV"
106106
fi
107107
108+
- name: Determine boost latest release
109+
shell: bash
110+
run: |
111+
set -o pipefail
112+
BOOST_REPOSITORY=https://github.com/boostorg/boost
113+
BOOST_LATEST_RELEASE="master"
114+
# https://stackoverflow.com/questions/10649814/get-last-git-tag-from-a-remote-repo-without-cloning
115+
if multiple_tags=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='-v:refname' $BOOST_REPOSITORY | cut --delimiter='/' --fields=3 ); then
116+
for item in ${multiple_tags}; do
117+
if [[ ${item} =~ boost ]] && [[ ! ${item} =~ beta ]] && [[ ! ${item} =~ rc ]]; then
118+
BOOST_LATEST_RELEASE=${item}
119+
break
120+
fi
121+
done
122+
fi
123+
echo "Discovered BOOST_LATEST_RELEASE is ${BOOST_LATEST_RELEASE}"
124+
echo "BOOST_LATEST_RELEASE=${BOOST_LATEST_RELEASE}" >> "$GITHUB_ENV"
125+
108126
- name: Git - Get Sources
109127
uses: actions/checkout@v4
110128
with:
@@ -190,7 +208,7 @@ jobs:
190208
set -xe
191209
TAG=${{ env.SHORT_SHA }}
192210
cd kube/boost
193-
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 }} .
211+
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 }} .
194212
kubectl rollout status deployment/$DEPLOYMENT_NAME -n ${{ env.K8S_NAMESPACE }}
195213
kubectl get services -o wide -n ${{ env.K8S_NAMESPACE }}
196214

kube/boost/values-cppal-dev-gke.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ nginxImageTag: "1.21-alpine"
77

88
deploymentEnvironment: &env dev
99
clientMaxBodySize: 250m
10-
boostLatestRelease: "boost-1.88.0"
10+
boostLatestRelease: "master"
1111

1212
replicaCount: "2"
1313

kube/boost/values-production-gke.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ nginxImageTag: "1.21-alpine"
77

88
deploymentEnvironment: &env production
99
clientMaxBodySize: 250m
10-
boostLatestRelease: "boost-1.88.0"
10+
boostLatestRelease: "master"
1111

1212
replicaCount: "2"
1313

kube/boost/values-stage-gke.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ nginxImageTag: "1.21-alpine"
77

88
deploymentEnvironment: &env stage
99
clientMaxBodySize: 250m
10-
boostLatestRelease: "boost-1.88.0"
10+
boostLatestRelease: "master"
1111

1212
replicaCount: "2"
1313

kube/boost/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ nginxImageTag: "1.21-alpine"
77

88
deploymentEnvironment: &env dev
99
clientMaxBodySize: 250m
10-
boostLatestRelease: "boost-1.88.0"
10+
boostLatestRelease: "master"
1111

1212
replicaCount: "2"
1313

0 commit comments

Comments
 (0)