1
1
# GCloud build docs: https://cloud.google.com/cloud-build/docs/build-config
2
- # Build console:
3
- # https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/objectstorage-controller
2
+ # Builds go to: https://console.cloud.google.com/gcr/images/k8s-staging-test-infra/global/
4
3
timeout : 3000s
5
4
options :
6
5
substitution_option : ' ALLOW_LOOSE'
@@ -10,19 +9,20 @@ substitutions:
10
9
# https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
11
10
# K8s provides custom substitutions _GIT_TAG and _PULL_BASE_REF:
12
11
# https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md#custom-substitutions
13
- _GIT_TAG : ' 12345'
14
- _PULL_BASE_REF : ' master'
12
+ _GIT_TAG : ' 12345' # e.g., vYYYYMMDD-hash, vYYYYMMDD-tag, or vYYYYMMDD-tag-n-ghash
13
+ _PULL_BASE_REF : ' master' # e.g., master or release-0.2 for a PR merge, or v0.2 for a tag
15
14
steps :
16
- # it is extremely unclear in GCR docs whether standard gcr.io/cloud-builders/docker builds allow
17
- # building multi-arch image manifests as 'docker buildx build' does; therefore, use make buildx
18
- # target to be certain multi-arch images are released
19
- - name : ' gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20230522-312425ae46'
20
- entrypoint : make
21
- args : ['buildx']
22
- env :
23
- - BUILDX_PLATFORMS='linux/amd64,linux/arm64'
24
- - IMAGE_TAG='gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG}'
25
- - BUILD_ARGS='--tag "gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest"'
15
+ # based on simple build example
16
+ # https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md
17
+ - name : gcr.io/cloud-builders/docker
18
+ # entrypoint: # docker by default
19
+ args :
20
+ - buildx
21
+ - build
22
+ - --platform="linux/amd64,linux/arm64"
23
+ - --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG}
24
+ - --tag=gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest
25
+ - .
26
26
images :
27
27
- gcr.io/k8s-staging-sig-storage/objectstorage-controller:${_GIT_TAG}
28
28
- gcr.io/k8s-staging-sig-storage/objectstorage-controller:latest
0 commit comments