File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ REGISTRY?=gcr.io/k8s-staging-cloud-provider-ibm
19
19
IMG? =ibm-powervs-block-csi-driver
20
20
TAG? =$(GIT_COMMIT )
21
21
LDFLAGS? ="-X ${PKG}/pkg/driver.driverVersion=${TAG} -X ${PKG}/pkg/driver.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/driver.buildDate=${BUILD_DATE} -s -w"
22
+ RELEASE_TAG ?= $(shell git describe --abbrev=0 2>/dev/null)
23
+ PULL_BASE_REF ?= $(RELEASE_TAG ) # PULL_BASE_REF will be provided by Prow
24
+ RELEASE_ALIAS_TAG ?= $(PULL_BASE_REF )
22
25
23
26
GO111MODULE =on
24
27
GOPROXY =direct
@@ -71,6 +74,17 @@ build-and-push-multi-arch: build-image-and-push-linux-amd64 build-image-and-push
71
74
docker manifest create --amend $(REGISTRY ) /$(IMG ) :$(TAG ) $(REGISTRY ) /$(IMG ) :$(TAG ) _linux_amd64 $(REGISTRY ) /$(IMG ) :$(TAG ) _linux_ppc64le
72
75
docker manifest push -p $(REGISTRY ) /$(IMG ) :$(TAG )
73
76
77
+ .PHONY : release-alias-tag
78
+ release-alias-tag : # Adds the tag to the last build tag.
79
+ docker pull $(REGISTRY ) /$(IMG ) :$(TAG )
80
+ docker tag $(REGISTRY ) /$(IMG ) :$(TAG ) $(REGISTRY ) /$(IMG ) :$(RELEASE_ALIAS_TAG )
81
+ docker push $(REGISTRY ) /$(IMG ) :$(RELEASE_ALIAS_TAG )
82
+
83
+ .PHONY : release-staging
84
+ release-staging : # # Builds and push container images to the staging image registry.
85
+ $(MAKE ) build-and-push-multi-arch
86
+ $(MAKE ) release-alias-tag
87
+
74
88
.PHONY : clean
75
89
clean :
76
90
rm -rf bin/*
Original file line number Diff line number Diff line change 15
15
- TAG=${_GIT_TAG}
16
16
- HOME=/root
17
17
args :
18
- - build-and-push-multi-arch
18
+ - release-staging
You can’t perform that action at this time.
0 commit comments