@@ -101,7 +101,7 @@ KUBE_APISERVER=$(TOOLS_BIN_DIR)/kube-apiserver
101101ETCD =$(TOOLS_BIN_DIR ) /etcd
102102
103103# Define Docker related variables. Releases should modify and double check these vars.
104- REGISTRY ?= registry.local/fake
104+ REGISTRY ?= gcr.io/ $( shell gcloud config get-value project)
105105STAGING_REGISTRY := gcr.io/k8s-staging-cluster-api-azure
106106PROD_REGISTRY := us.gcr.io/k8s-artifacts-prod/cluster-api-azure
107107IMAGE_NAME ?= cluster-api-azure-controller
@@ -172,9 +172,9 @@ test-cover: envs-test $(KUBECTL) $(KUBE_APISERVER) $(ETCD) ## Run tests with cod
172172test-e2e-run : generate-e2e-templates $(ENVSUBST ) $(KUBECTL ) $(GINKGO ) # # Run e2e tests
173173 $(ENVSUBST ) < $(E2E_CONF_FILE ) > $(E2E_CONF_FILE_ENVSUBST ) && \
174174 $(GINKGO) -v -trace -tags=e2e -focus="$(GINKGO_FOCUS)" -skip="$(GINKGO_SKIP)" -nodes=$(GINKGO_NODES) --noColor=$(GINKGO_NOCOLOR) $(GINKGO_ARGS) ./test/e2e -- \
175- -e2e.artifacts-folder="$(ARTIFACTS)" \
176- -e2e.config="$(E2E_CONF_FILE_ENVSUBST)" \
177- -e2e.skip-resource-cleanup=$(SKIP_CLEANUP) -e2e.use-existing-cluster=$(SKIP_CREATE_MGMT_CLUSTER) $(E2E_ARGS)
175+ -e2e.artifacts-folder="$(ARTIFACTS)" \
176+ -e2e.config="$(E2E_CONF_FILE_ENVSUBST)" \
177+ -e2e.skip-resource-cleanup=$(SKIP_CLEANUP) -e2e.use-existing-cluster=$(SKIP_CREATE_MGMT_CLUSTER) $(E2E_ARGS)
178178
179179.PHONY : test-e2e
180180test-e2e : # # Run e2e tests
@@ -454,6 +454,16 @@ release-binary: $(RELEASE_DIR)
454454 go build -a -ldflags ' $(LDFLAGS) -extldflags "-static"' \
455455 -o $(RELEASE_DIR ) /$(notdir $(RELEASE_BINARY ) ) -$(GOOS ) -$(GOARCH ) $(RELEASE_BINARY )
456456
457+ .PHONY : release-staging
458+ release-staging : # # Builds and push container images to the staging bucket.
459+ REGISTRY=$(STAGING_REGISTRY ) $(MAKE ) docker-build-all docker-push-all release-alias-tag
460+
461+ RELEASE_ALIAS_TAG =$(PULL_BASE_REF )
462+
463+ .PHONY : release-alias-tag
464+ release-alias-tag : # Adds the tag to the last build tag.
465+ gcloud container images add-tag $(CONTROLLER_IMG ) :$(TAG ) $(CONTROLLER_IMG ) :$(RELEASE_ALIAS_TAG )
466+
457467.PHONY : release-notes
458468release-notes : $(RELEASE_NOTES )
459469 $(RELEASE_NOTES ) --org $(GIT_ORG_NAME ) --repo $(GIT_REPO_NAME ) --branch $(RELEASE_BRANCH ) --start-rev $(PREVIOUS_TAG ) --end-rev $(RELEASE_TAG ) --output release-notes-$(RELEASE_TAG ) .md
0 commit comments