File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,7 @@ TAR_FILE ?= rootfs.tar
32
32
33
33
GOOS ?= $(shell go env GOOS)
34
34
GOPROXY ?= $(shell go env GOPROXY)
35
- GIT_VERSION := $(shell git describe --dirty --tags --match='v* ')
36
- VERSION ?= $(GIT_VERSION )
35
+ VERSION ?= $(shell git describe --dirty --tags --match='v* ')
37
36
GOARCH :=
38
37
GOFLAGS :=
39
38
TAGS :=
Original file line number Diff line number Diff line change @@ -9,16 +9,29 @@ options:
9
9
machineType : ' N1_HIGHCPU_8'
10
10
steps :
11
11
- name : gcr.io/k8s-testimages/gcb-docker-gcloud
12
- entrypoint : make
12
+ entrypoint : bash
13
13
env :
14
- - REGISTRY=gcr.io/$PROJECT_ID
15
- - VERSION=$_GIT_TAG
14
+ # Required because the default HOME is /builder/root but buildx is
15
+ # installed in /root/.docker. Not setting this results in docker not
16
+ # finding buildx during make.
17
+ - HOME=/root
16
18
args :
17
- - push-multiarch-images
19
+ - -c
20
+ - |
21
+ # Run the image's buildx entrypoint to initialise the build environment
22
+ # appropriately for the image before running make
23
+ /buildx-entrypoint version
24
+
25
+ make push-multiarch-images \
26
+ REGISTRY=gcr.io/$PROJECT_ID \
27
+ VERSION=$_SHORT_TAG
18
28
substitutions :
19
29
# _GIT_TAG will be filled with a git-based tag for the image, of the form
20
30
# vYYYYMMDD-hash, and can be used as a substitution
21
- _GIT_TAG : ' 12345'
31
+ _GIT_TAG : ' v99999999-v12345'
32
+ # Remove date prefix (first 10 characters) to create valid semver version:
33
+ # v20220510-v1.24.0-alpha.0-15-g09bd268 => v1.24.0-alpha.0-15-g09bd268
34
+ _SHORT_TAG : ' ${_GIT_TAG:10}'
22
35
# _PULL_BASE_REF will contain the ref that was pushed to to trigger this
23
36
# build - a branch like 'master' or 'release-0.2', or a tag like 'v0.2'.
24
37
_PULL_BASE_REF : ' master'
You can’t perform that action at this time.
0 commit comments