Skip to content

Commit a3491e7

Browse files
committed
individually release/label each staging commit
1 parent 9b2a0ef commit a3491e7

4 files changed

+7
-7
lines changed

.github/workflows/build-package-staging.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
PKG: ${{ github.event.client_payload.package || github.event.inputs.package }}
2525
run: |
2626
git fetch --tags -f
27-
export VERSION_TAG=$(git tag | grep '^v20' | grep -v 'v2022\.09\.04' | sort | tail -1)-dirty
27+
export VERSION_TAG=$(git tag | grep '^v20' | sort | tail -1)-$(git rev-parse --short HEAD)
2828
export KURL_UTIL_IMAGE=replicated/kurl-util:${VERSION_TAG}
2929
3030
make dist/$PKG
@@ -44,7 +44,7 @@ jobs:
4444
CF_KURL_ZONE: ${{ secrets.CF_KURL_ZONE }}
4545
run: |
4646
git fetch --tags -f
47-
export VERSION_TAG=$(git tag | grep '^v20' | grep -v 'v2022\.09\.04' | sort | tail -1)-dirty
47+
export VERSION_TAG=$(git tag | grep '^v20' | sort | tail -1)-$(git rev-parse --short HEAD)
4848
4949
echo "purging s3-staging.kurl.sh/staging/${VERSION_TAG}/$PKG and s3-staging.kurl.sh/staging/$PKG"
5050
curl -X POST "https://api.cloudflare.com/client/v4/zones/$CF_KURL_ZONE/purge_cache" \

.github/workflows/cron-rebuild-packages-staging.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
name: Build image matrix
1515
run: |
1616
git fetch --tags -f
17-
export VERSION_TAG=$(git tag | grep '^v20' | grep -v 'v2022\.09\.04' | sort | tail -1)-dirty
17+
export VERSION_TAG=$(git tag | grep '^v20' | sort | tail -1)-$(git rev-parse --short HEAD)
1818
export KURL_UTIL_IMAGE=replicated/kurl-util:${VERSION_TAG}
1919
export KURL_BIN_UTILS_FILE=kurl-bin-utils-${VERSION_TAG}.tar.gz
2020
export KURL_BIN_UTILS_FILE_LATEST=kurl-bin-utils-latest.tar.gz
@@ -44,7 +44,7 @@ jobs:
4444
BATCH: ${{ matrix.batch }}
4545
run: |
4646
git fetch --tags -f
47-
export VERSION_TAG=$(git tag | grep '^v20' | grep -v 'v2022\.09\.04' | sort | tail -1)-dirty
47+
export VERSION_TAG=$(git tag | grep '^v20' | sort | tail -1)-$(git rev-parse --short HEAD)
4848
export KURL_UTIL_IMAGE=replicated/kurl-util:${VERSION_TAG}
4949
5050
failed_pkgs=

.github/workflows/deploy-staging.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- id: set-tag
2222
run: |
2323
git fetch --tags -f
24-
export VERSION_TAG=$(git tag | grep '^v20' | grep -v 'v2022\.09\.04' | sort | tail -1)-dirty
24+
export VERSION_TAG=$(git tag | grep '^v20' | sort | tail -1)-$(git rev-parse --short HEAD)
2525
echo "::set-output name=version_tag::${VERSION_TAG}"
2626
2727
kurl-util-image:

ARCHITECTURE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ Historical production releases are never removed from the object storage bucket.
193193
### Staging Workflow
194194

195195
Staging releases are triggered on merge to main.
196-
Staging release versions use the most current release version tag and append prerelease `-dirty`, for example v2022.04.19-0-dirty.
196+
Staging release versions use the most current release version tag and append the short commit sha `-abcdef0`, for example v2022.04.19-0-5af497c.
197197
Due to this versioning scheme, staging releases will overwrite the previous staging release if no production release occurred prior.
198198
This is intentional to optimize for storage costs.
199-
Staging releases are uploaded to the object storage bucket at prefix `staging`, for example https://kurl-sh.s3.amazonaws.com/staging/v2022.04.19-0-dirty/.
199+
Staging releases are uploaded to the object storage bucket at prefix `staging`, for example https://kurl-sh.s3.amazonaws.com/staging/v2022.04.19-0-5af497c/.
200200
Before building add-on packages, the workflow will first check if there were any changes made to the add-on since the previous staging release based on metadata included with the add-on package.
201201
If no changes were made, the package will be copied from the previous staging release to optimize for build times.
202202
If changes were made, the package will be built from source and uploaded.

0 commit comments

Comments
 (0)