From 18e98ce3da782d7c13ce905119d60e03c65804b2 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Thu, 30 Jun 2022 18:15:01 +0100 Subject: [PATCH] move legacy targets to legacy.mk we don't _need_ to remove these and we can keep them around for longer, but we don't need them to be in files we actually use and edit. putting the targets in a separate file feels cleaner! Signed-off-by: Ashley Davis --- Makefile | 1 + make/ci.mk | 37 ------------------------------------- make/legacy.mk | 23 +++++++++++++++++++++++ make/tools.mk | 18 ------------------ 4 files changed, 24 insertions(+), 55 deletions(-) create mode 100644 make/legacy.mk diff --git a/Makefile b/Makefile index 6ebc8dd77..b622be30c 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,7 @@ include make/release.mk include make/manifests.mk include make/licenses.mk include make/e2e-setup.mk +include make/legacy.mk include make/help.mk .PHONY: clean diff --git a/make/ci.mk b/make/ci.mk index e9aeb4200..845ed6a2d 100644 --- a/make/ci.mk +++ b/make/ci.mk @@ -82,40 +82,3 @@ update-codegen: | k8s-codegen-tools $(DEPENDS_ON_GO) ## ## @category Development update-all: update-crds update-codegen update-licenses - -# The targets (verify_deps, verify_chart, verify_upgrade, and cluster) are -# temorary and exist to keep the compatibility with the following Prow jobs: -# -# pull-cert-manager-chart -# pull-cert-manager-deps -# pull-cert-manager-upgrade -# -# These targets should be removed as soon as the four above jobs and scripts are -# updated to use the "make" flow. -.PHONY: verify -verify: - $(warning "The 'verify' target is deprecated and will be removed soon. Please use instead 'ci-presubmit'") - bazel test //... - -.PHONY: verify_deps -verify_deps: - @# this target can be removed once we've removed the pull-cert-manager-deps test from presubmits - @# for now, just make it a no-op so the tests don't fail - $(warning "The 'verify_deps' target is deprecated, does nothing, and will be removed soon. This target is not useful anymore with the new make flow.") - @true - -# requires docker -.PHONY: verify_chart -verify_chart: - $(warning "The 'verify_chart' target is deprecated and will be removed soon. Please use instead 'verify-chart'.") - bazel build //deploy/charts/cert-manager - ./hack/verify-chart-version.sh bazel-bin/deploy/charts/cert-manager/cert-manager.tgz - -.PHONY: verify_upgrade -verify_upgrade: test-upgrade - $(warning "The 'verify_upgrade' target is deprecated and will be removed soon. Please use instead 'make test-upgrade'.") - -.PHONY: cluster -cluster: - $(warning "The 'cluster' target is deprecated and will be removed soon. Please use instead 'make e2e-setup-kind'.") - ./devel/ci-cluster.sh diff --git a/make/legacy.mk b/make/legacy.mk new file mode 100644 index 000000000..bdaddef27 --- /dev/null +++ b/make/legacy.mk @@ -0,0 +1,23 @@ +# Targets in this file are legacy holdovers from before the migration to make. +# They're preserved here in case they're used in some third party CI system or script, +# but are liable to being removed or broken without warning. + +.PHONY: verify +verify: ci-presubmit test + $(warning "The '$@' target is deprecated and may be removed. Use 'make $^' instead.") + +.PHONY: verify_deps +verify_deps: + $(warning "The '$@' target is deprecated and may be removed. This target is a no-op with the new make flow.") + +.PHONY: cluster +cluster: e2e-setup-kind + $(warning "The '$@' target is deprecated and may be removed. Use 'make $^' instead.") + +.PHONY: verify_chart +verify_chart: verify-chart + $(warning "The '$@' target is deprecated and may be removed. Use 'make $^' instead.") + +.PHONY: verify_upgrade +verify_upgrade: test-upgrade + $(warning "The '$@' target is deprecated and may be removed. Use 'make $^' instead.") diff --git a/make/tools.mk b/make/tools.mk index 4c18ba33c..e83f1aead 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -416,23 +416,6 @@ $(BINDIR)/downloaded/gatewayapi-v%: | $(BINDIR)/downloaded $(BINDIR)/tools $(BINDIR)/downloaded $(BINDIR)/downloaded/tools: @mkdir -p $@ -# The targets (verify_deps, verify_chart, verify_upgrade, and cluster) are -# temorary and exist to keep the compatibility with the following Prow jobs: -# -# pull-cert-manager-chart -# pull-cert-manager-deps -# pull-cert-manager-upgrade -# -# Until we have removed these Bazel-based targets, we must disable the check -# of the system tools since the Bazel targets don't rely on those, and the image -# -# eu.gcr.io/jetstack-build-infra-images/bazelbuild -# -# doesn't have these tools. -BAZEL_TARGET := $(filter verify verify_deps verify_chart verify_upgrade cluster,$(MAKECMDGOALS)) -ifneq ($(BAZEL_TARGET),) -$(warning Not checking whether the system tools are present since Bazel already takes care of that in the target $(MAKECMDGOALS). .) -else # Although we "vendor" most tools in $(BINDIR)/tools, we still require some binaries # to be available on the system. The vendor-go MAKECMDGOALS trick prevents the # check for the presence of Go when 'make vendor-go' is run. @@ -452,7 +435,6 @@ MISSING=$(shell (command -v curl >/dev/null || echo curl) \ ifneq ($(MISSING),) $(error Missing required tools: $(MISSING)) endif -endif .PHONY: update-kind-images update-kind-images: $(BINDIR)/tools/crane