Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 4fd0a9e

Browse files
authored
Merge pull request #83 from BlaineEXE/semver-tag-proposal
allow cloudbuild to build git tags
2 parents a64cb2c + db642a3 commit 4fd0a9e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: container-object-storage-interface-controller/cloudbuild.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# GCloud build docs: https://cloud.google.com/cloud-build/docs/build-config
2-
# Builds go to: https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/
2+
# Builds go to https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/
3+
# Build logs in https://testgrid.k8s.io/sig-storage-image-build
34
timeout: 3000s
45
options:
56
substitution_option: 'ALLOW_LOOSE'
@@ -19,10 +20,15 @@ steps:
1920
args:
2021
- buildx
2122
- build
22-
- --platform="linux/amd64,linux/arm64"
23+
- --platform=linux/amd64,linux/arm64
2324
- --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG}
25+
# using _PULL_BASE_REF as a tag will often just build and overwrite the same 'master' tag,
26+
# BUT! if the commit has a git tag, it will build that tag instead. this mechanism allows
27+
# creating the semver-tagged images that will be auto-promoted to release
28+
- --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_PULL_BASE_REF}
2429
- --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest
2530
- .
2631
images:
2732
- gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG}
33+
- gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_PULL_BASE_REF}
2834
- gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest

0 commit comments

Comments
 (0)