Skip to content

Commit 6029a88

Browse files
authored
Merge pull request #1651 from CecileRobertMichon/revert-make
Revert "Cleanup Makefile and remove obsolete targets"
2 parents 24d3e18 + 2f55093 commit 6029a88

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ KUBE_APISERVER=$(TOOLS_BIN_DIR)/kube-apiserver
101101
ETCD=$(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)
105105
STAGING_REGISTRY := gcr.io/k8s-staging-cluster-api-azure
106106
PROD_REGISTRY := us.gcr.io/k8s-artifacts-prod/cluster-api-azure
107107
IMAGE_NAME ?= cluster-api-azure-controller
@@ -172,9 +172,9 @@ test-cover: envs-test $(KUBECTL) $(KUBE_APISERVER) $(ETCD) ## Run tests with cod
172172
test-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
180180
test-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
458468
release-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

Comments
 (0)