Skip to content

Commit

Permalink
Merge pull request kubernetes-retired#83 from BlaineEXE/semver-tag-pr…
Browse files Browse the repository at this point in the history
…oposal

allow cloudbuild to build git tags
  • Loading branch information
k8s-ci-robot authored Sep 14, 2023
2 parents 146101b + ee45c46 commit 6c05a79
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# GCloud build docs: https://cloud.google.com/cloud-build/docs/build-config
# Builds go to: https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/
# Builds go to https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/
# Build logs in https://testgrid.k8s.io/sig-storage-image-build
timeout: 3000s
options:
substitution_option: 'ALLOW_LOOSE'
Expand All @@ -19,10 +20,15 @@ steps:
args:
- buildx
- build
- --platform="linux/amd64,linux/arm64"
- --platform=linux/amd64,linux/arm64
- --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG}
# using _PULL_BASE_REF as a tag will often just build and overwrite the same 'master' tag,
# BUT! if the commit has a git tag, it will build that tag instead. this mechanism allows
# creating the semver-tagged images that will be auto-promoted to release
- --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_PULL_BASE_REF}
- --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest
- .
images:
- gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG}
- gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_PULL_BASE_REF}
- gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest

0 comments on commit 6c05a79

Please sign in to comment.