-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
451 lines (377 loc) · 19.8 KB
/
Makefile
File metadata and controls
451 lines (377 loc) · 19.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# ====================================================================================
# Setup Project
BASE_NAME := cloudfoundry
PROJECT_NAME := provider-$(BASE_NAME)
PROJECT_REPO := github.com/SAP/crossplane-$(PROJECT_NAME)
PLATFORMS ?= linux_amd64 linux_arm64
VERSION ?= $(shell git describe --tags --exact-match 2>/dev/null || git rev-parse HEAD)
$(info VERSION is $(VERSION))
# -include will silently skip missing files, which allows us
# to load those files with a target in the Makefile. If only
# "include" was used, the make command would fail and refuse
# to run a target until the include commands succeeded.
-include build/makelib/common.mk
# ====================================================================================
# Setup Output
-include build/makelib/output.mk
# ====================================================================================
# Setup Go
# Set a sane default so that the nprocs calculation below is less noisy on the initial
# loading of this file
NPROCS ?= 1
# each of our test suites starts a kube-apiserver and running many test suites in
# parallel can lead to high CPU utilization. by default we reduce the parallelism
# to half the number of CPU cores.
GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 )))
GO_REQUIRED_VERSION ?= 1.23
GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider $(GO_PROJECT)/cmd/exporter
GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION)
GO_SUBDIRS += cmd internal apis
GO111MODULE = on
GOLANGCILINT_VERSION ?= 2.10.1
-include build/makelib/golang.mk
# --out-format is deprecated with v2, replace with --output.checkstyle.path
ifeq ($(RUNNING_IN_CI),true)
GO_LINT_ARGS := --timeout 10m0s --output.checkstyle.path=$(GO_LINT_OUTPUT)/checkstyle.xml
endif
# kind-related versions
KIND_VERSION ?= v0.26.0
KIND_NODE_IMAGE_TAG ?= v1.32.0
# Setup Kubernetes tools
UP_VERSION = v0.31.0
UP_CHANNEL = stable
UPTEST_VERSION = v0.11.1
-include build/makelib/k8s_tools.mk
# ====================================================================================
# Setup Images
IMAGES = provider-cloudfoundry
-include build/makelib/imagelight.mk
# Import upgrade test environment variables from shell
export UPGRADE_TEST_FROM_TAG
export UPGRADE_TEST_TO_TAG
export UPGRADE_TEST_VERIFY_TIMEOUT
export UPGRADE_TEST_WAIT_FOR_PAUSE
export CF_EMAIL
export CF_USERNAME
export CF_PASSWORD
export CF_ENDPOINT
# NOTE(hasheddan): we ensure up is installed prior to running platform-specific
# build steps in parallel to avoid encountering an installation race condition.
build.init: $(UP)
# ====================================================================================
# Fallthrough
# run `make help` to see the targets and options
# We want submodules to be set up the first time `make` is run.
# We manage the build/ folder and its Makefiles as a submodule.
# The first time `make` is run, the includes of build/*.mk files will
# all fail, and this target will be run. The next time, the default as defined
# by the includes will be run instead.
fallthrough: submodules
@echo Initial setup complete. Running make again . . .
@make
# ====================================================================================
# Setup XPKG
# XPKG_REG_ORGS ?= xpkg.upbound.io/crossplane-contrib index.docker.io/crossplanecontrib
# NOTE(hasheddan): skip promoting on xpkg.upbound.io as channel tags are
# inferred.
# XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.upbound.io/crossplane-contrib
XPKGS ?= provider-cloudfoundry
XPKG_REG_ORGS ?= ghcr.io/sap/crossplane-provider-cloudfoundry/crossplane
-include build/makelib/xpkg.mk
# NOTE(hasheddan): we force image building to happen prior to xpkg build so that
# we ensure image is present in daemon.
xpkg.build.crossplane-provider-cloudfoundry: do.build.images
# NOTE: the build submodule currently overrides XDG_CACHE_HOME in order to
# force the Helm 3 to use the .work/helm directory. This causes Go on Linux
# machines to use that directory as the build cache as well. We should adjust
# this behavior in the build submodule because it is also causing Linux users
# to duplicate their build cache, but for now we just make it easier to identify
# its location in CI so that we cache between builds.
go.cachedir:
@go env GOCACHE
# ====================================================================================
# Targets
# Generate a coverage report for cobertura applying exclusions on
# - generated file
cobertura:
@cat $(GO_TEST_OUTPUT)/coverage.txt | \
grep -v zz_ | \
$(GOCOVER_COBERTURA) > $(GO_TEST_OUTPUT)/cobertura-coverage.xml
dev-debug: dev-clean $(KIND) $(KUBECTL) $(HELM3)
@$(INFO) Creating kind cluster
@$(KIND) create cluster --name=$(PROJECT_NAME)-dev
@$(KUBECTL) cluster-info --context kind-$(PROJECT_NAME)-dev
@$(INFO) Installing Crossplane
@$(HELM3) repo add crossplane-stable https://charts.crossplane.io/stable
@$(HELM3) repo update
@$(INFO) Installing Provider CloudFoundry CRDs
@$(KUBECTL) apply -R -f package/crds
@$(INFO) Creating crossplane-system namespace
@$(KUBECTL) create ns crossplane-system
@$(INFO) Creating provider config and secret
@$(KUBECTL) apply -R -f examples/providerconfig
dev-clean: $(KIND) $(KUBECTL)
@$(INFO) Creating kind cluster
@$(KIND) delete cluster --name=$(PROJECT_NAME)-dev
# Update the submodules, such as the common build scripts.
submodules:
@git submodule sync
@git submodule update --init --recursive
# This is for running out-of-cluster locally, and is for convenience. Running
# this make target will print out the command which was used. For more control,
# try running the binary directly with different arguments.
run: go.build
@$(INFO) Running Crossplane locally out-of-cluster . . .
@# To see other arguments that can be provided, run the command with --help instead
UPBOUND_CONTEXT="local" $(GO_OUT_DIR)/provider --debug
# ====================================================================================
# End to End Testing
# ====================================================================================
CROSSPLANE_NAMESPACE = upbound-system
-include build/makelib/local.xpkg.mk
CROSSPLANE_ARGS = '--enable-usages'
-include build/makelib/controlplane.mk
uptest: $(UPTEST) $(KUBECTL) $(KUTTL)
@$(INFO) running automated tests
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) $(UPTEST) e2e "${UPTEST_EXAMPLE_LIST}" --setup-script=cluster/test/setup.sh || $(FAIL)
@$(OK) running automated tests
local-deploy: build controlplane.up local.xpkg.deploy.provider.$(PROJECT_NAME)
@$(INFO) running locally built provider
@$(KUBECTL) wait provider.pkg $(PROJECT_NAME) --for condition=Healthy --timeout 5m
@$(KUBECTL) -n upbound-system wait --for=condition=Available deployment --all --timeout=5m
@$(OK) running locally built provider
e2e: local-deploy uptest
# Updated End to End Testing following BTP Provider
export E2E_REUSE_CLUSTER = $(KIND_CLUSTER_NAME)
export E2E_CLUSTER_NAME = $(KIND_CLUSTER_NAME)
.PHONY: test-acceptance
test-acceptance: local-deploy $(KUBECTL)
@echo "Creating crossplane-system namespace"
@$(KUBECTL) create namespace crossplane-system
@$(INFO) running integration tests
@$(INFO) Skipping long running tests
go test -v $(PROJECT_REPO)/test/e2e -tags=e2e -short -count=1 -test.v -timeout=15m -run '$(testFilter)' 2>&1 | tee test-output.log
@echo "===========Test Summary==========="
@grep -E "PASS|FAIL" test-output.log
@case `tail -n 1 test-output.log` in \
*FAIL*) echo "❌ Error: Test failed"; exit 1 ;; \
*) echo "✅ All tests passed"; $(OK) integration tests passed ;; \
esac
.PHONY: cobertura submodules fallthrough run crds.clean dev-debug dev-clean demo-cluster demo-install demo-clean demo-debug
# ====================================================================================
# Upgrade Tests
# ====================================================================================
# Upgrade test directory
UPGRADE_TEST_DIR := test/upgrade
UPGRADE_TEST_CRS_DIR := $(UPGRADE_TEST_DIR)/testdata/baseCrs
UPGRADE_TEST_CUSTOM_CRS_DIR := $(UPGRADE_TEST_DIR)/testdata/customCRs
UPGRADE_TEST_OUTPUT_LOG := test-upgrade-output.log
# If UPGRADE_TEST_CRS_TAG is not set, use UPGRADE_TEST_FROM_TAG as default
UPGRADE_TEST_CRS_TAG ?= $(UPGRADE_TEST_FROM_TAG)
# Test filter for running specific tests
UPGRADE_TEST_FILTER ?= .
.PHONY: check-upgrade-test-vars
check-upgrade-test-vars: ## Verify required upgrade test environment variables
@$(INFO) Checking required environment variables for upgrade tests are present
@test -n "$(UPGRADE_TEST_FROM_TAG)" || { echo "❌ Set UPGRADE_TEST_FROM_TAG"; exit 1; }
@test -n "$(UPGRADE_TEST_TO_TAG)" || { echo "❌ Set UPGRADE_TEST_TO_TAG"; exit 1; }
@$(OK) required upgrade test environment variables are set
.PHONY: build-upgrade-test-images
build-upgrade-test-images: ## Build local images if testing with 'local' tag
@if [ "$(UPGRADE_TEST_FROM_TAG)" == "local" ] || [ "$(UPGRADE_TEST_TO_TAG)" == "local" ]; then \
$(INFO) "Building local images (UPGRADE_TEST_FROM_TAG or UPGRADE_TEST_TO_TAG is \"local\")"; \
$(MAKE) build; \
$(OK) "Built local images: $(UUT_IMAGES)"; \
fi
.PHONY: test-upgrade-compile
test-upgrade-compile: ## Verify upgrade tests compile
@$(INFO) compiling upgrade tests
@cd $(UPGRADE_TEST_DIR) && go test -c -tags=upgrade -o /dev/null
@$(OK) upgrade tests compile successfully
# ====================================================================================
# Base Upgrade Tests (Standard Resource Verification)
# ====================================================================================
.PHONY: test-upgrade-base
test-upgrade-base: $(KIND) check-upgrade-test-vars build-upgrade-test-images ## Run upgrade tests (standard resource verification )
@$(INFO) running upgrade tests from $(UPGRADE_TEST_FROM_TAG) to $(UPGRADE_TEST_TO_TAG)
@cd $(UPGRADE_TEST_DIR) && go test -v -tags=upgrade -timeout=45m -run TestUpgradeProvider ./... 2>&1 | tee ../../$(UPGRADE_TEST_OUTPUT_LOG)
@echo "==========Base Upgrade Test Summary =========="
@grep -E "PASS|FAIL|ok " $(UPGRADE_TEST_OUTPUT_LOG) | tail -5
@case `tail -n 1 $(UPGRADE_TEST_OUTPUT_LOG)` in \
*FAIL*) echo "❌ Upgrade test failed"; exit 1 ;; \
*ok*) echo "✅ Upgrade tests passed"; $(OK) upgrade tests passed ;; \
*) echo "⚠️ Could not determine test result"; exit 1 ;; \
esac
# ====================================================================================
# Custom Upgrade Tests (External-Name Validation, etc.)
# ====================================================================================
.PHONY: test-upgrade-custom
test-upgrade-custom: $(KIND) check-upgrade-test-vars build-upgrade-test-images ## Run custom upgrade tests (external-name validation, etc.)
@$(INFO) running custom upgrade tests from $(UPGRADE_TEST_FROM_TAG) to $(UPGRADE_TEST_TO_TAG)
@$(INFO) test filter: $(UPGRADE_TEST_FILTER)
@cd $(UPGRADE_TEST_DIR) && go test -v -tags=upgrade -timeout=45m -run '$(UPGRADE_TEST_FILTER)' ./... 2>&1 | tee ../../$(UPGRADE_TEST_OUTPUT_LOG)
@echo "========== Custom Upgrade Test Summary =========="
@grep -E "PASS|FAIL|ok " $(UPGRADE_TEST_OUTPUT_LOG) | tail -5
@case `tail -n 1 $(UPGRADE_TEST_OUTPUT_LOG)` in \
*FAIL*) echo "❌ Custom upgrade test failed"; exit 1 ;; \
*ok*) echo "✅ Custom upgrade tests passed"; $(OK) custom upgrade tests passed ;; \
*) echo "⚠️ Could not determine test result"; exit 1 ;; \
esac
# ====================================================================================
# Combined: Run All Upgrade Tests
# ====================================================================================
.PHONY: test-upgrade
test-upgrade: $(KIND) check-upgrade-test-vars build-upgrade-test-images ## Run ALL upgrade tests (base + custom)
@$(INFO) running all upgrade tests from $(UPGRADE_TEST_FROM_TAG) to $(UPGRADE_TEST_TO_TAG)
@cd $(UPGRADE_TEST_DIR) && go test -v -tags=upgrade -timeout=45m ./... 2>&1 | tee ../../$(UPGRADE_TEST_OUTPUT_LOG)
@echo "========== Upgrade Test Summary =========="
@grep -E "PASS|FAIL|ok " $(UPGRADE_TEST_OUTPUT_LOG) | tail -5
@case `tail -n 1 $(UPGRADE_TEST_OUTPUT_LOG)` in \
*FAIL*) echo "❌ Upgrade test failed"; exit 1 ;; \
*ok*) echo "✅ Upgrade tests passed"; $(OK) upgrade tests passed ;; \
*) echo "⚠️ Could not determine test result"; exit 1 ;; \
esac
# ====================================================================================
# CR Preparation
# ====================================================================================
.PHONY: test-upgrade-prepare-crs
test-upgrade-prepare-crs: ## Prepare CRs from CRS_TAG version
@$(INFO) preparing CRs from $(UPGRADE_TEST_CRS_TAG)
@test -n "$(UPGRADE_TEST_CRS_TAG)" || { echo "❌ Set UPGRADE_TEST_CRS_TAG or UPGRADE_TEST_FROM_TAG"; exit 1; }
@if [ "$(UPGRADE_TEST_CRS_TAG)" = "local" ]; then \
$(OK) "Using local CRs from $(UPGRADE_TEST_CRS_DIR)/ (CRS_TAG is 'local')"; \
else \
$(INFO) "Checking out CRs from tag $(UPGRADE_TEST_CRS_TAG)"; \
rm -rf $(UPGRADE_TEST_CRS_DIR)/*; \
mkdir -p $(UPGRADE_TEST_CRS_DIR); \
if git ls-tree -r $(UPGRADE_TEST_CRS_TAG) --name-only | grep -q "^$(UPGRADE_TEST_CRS_DIR)/"; then \
$(INFO) "✅ Found $(UPGRADE_TEST_CRS_DIR)/ in $(UPGRADE_TEST_CRS_TAG)"; \
git archive $(UPGRADE_TEST_CRS_TAG) $(UPGRADE_TEST_CRS_DIR)/ | tar -x --strip-components=4 -C $(UPGRADE_TEST_CRS_DIR)/; \
$(OK) "Copied all CRs from $(UPGRADE_TEST_CRS_DIR)/"; \
else \
$(INFO) "⚠️ $(UPGRADE_TEST_CRS_DIR)/ not found, using hardcoded e2e paths"; \
git show $(UPGRADE_TEST_CRS_TAG):test/e2e/crs/orgspace/import.yaml > $(UPGRADE_TEST_CRS_DIR)/import.yaml 2>/dev/null || \
{ echo "❌ Could not find import.yaml in $(UPGRADE_TEST_CRS_TAG)"; exit 1; }; \
git show $(UPGRADE_TEST_CRS_TAG):test/e2e/crs/orgspace/space.yaml > $(UPGRADE_TEST_CRS_DIR)/space.yaml 2>/dev/null || \
{ echo "❌ Could not find space.yaml in $(UPGRADE_TEST_CRS_TAG)"; exit 1; }; \
$(OK) "Copied e2e CRs to $(UPGRADE_TEST_CRS_DIR)/"; \
fi; \
fi
# ====================================================================================
# Upgrade Tests with Version-Specific CRs
# ====================================================================================
.PHONY: test-upgrade-with-version-crs
test-upgrade-with-version-crs: $(KIND) check-upgrade-test-vars build-upgrade-test-images test-upgrade-prepare-crs ## Run upgrade tests with FROM version CRs
@$(INFO) running upgrade tests from $(UPGRADE_TEST_FROM_TAG) to $(UPGRADE_TEST_TO_TAG)
@cd $(UPGRADE_TEST_DIR) && go test -v -tags=upgrade -timeout=45m ./... 2>&1 | tee ../../$(UPGRADE_TEST_OUTPUT_LOG)
@echo "========== Upgrade Test Summary =========="
@grep -E "PASS|FAIL|ok " $(UPGRADE_TEST_OUTPUT_LOG) | tail -5
@case `tail -n 1 $(UPGRADE_TEST_OUTPUT_LOG)` in \
*FAIL*) echo "❌ Upgrade test failed"; exit 1; ;; \
*ok*) echo "✅ Upgrade tests passed"; $(OK) upgrade tests passed; ;; \
*) echo "⚠️ Could not determine test result"; exit 1; ;; \
esac
# ====================================================================================
# Debugging Support
# ====================================================================================
# TODO: Add test-upgrade-debug-base and test-upgrade-debug-custom variants
.PHONY: test-upgrade-debug
test-upgrade-debug: $(KIND) check-upgrade-test-vars build-upgrade-test-images test-upgrade-prepare-crs ## Run upgrade tests with debugger
@$(INFO) running upgrade tests with debugger
@cd $(UPGRADE_TEST_DIR) && dlv test -tags=upgrade . --listen=:2345 --headless=true --api-version=2 --build-flags="-tags=upgrade" -- -test.v -test.timeout 45m 2>&1 | tee ../../$(UPGRADE_TEST_OUTPUT_LOG)
@echo "========== Upgrade Test Summary =========="
@grep -E "PASS|FAIL|ok " $(UPGRADE_TEST_OUTPUT_LOG) | tail -5
# ====================================================================================
# Utility Targets
# ====================================================================================
.PHONY: test-upgrade-restore-crs
test-upgrade-restore-crs: ## Restore $(UPGRADE_TEST_CRS_DIR)/ to current version
@$(INFO) restoring $(UPGRADE_TEST_CRS_DIR)/
@git checkout $(UPGRADE_TEST_CRS_DIR)/
@$(OK) CRs restored
.PHONY: test-upgrade-clean
test-upgrade-clean: $(KIND) ## Clean upgrade test artifacts
@$(INFO) cleaning upgrade test artifacts
@$(KIND) get clusters 2>/dev/null | grep e2e | xargs -r -n1 $(KIND) delete cluster --name || true
@rm -rf $(UPGRADE_TEST_DIR)/logs/
@rm -f $(UPGRADE_TEST_OUTPUT_LOG)
@$(OK) cleanup complete
.PHONY: test-upgrade-help
test-upgrade-help: ## Show upgrade test usage examples
@$(INFO) ""
@$(INFO) "Upgrade Test Examples:"
@$(INFO) "======================"
@$(INFO) ""
@$(INFO) " 1. Run ALL upgrade tests (base + custom):"
@$(INFO) " export UPGRADE_TEST_FROM_TAG=v0.3.2"
@$(INFO) " export UPGRADE_TEST_TO_TAG=v0.4.0"
@$(INFO) " make test-upgrade"
@$(INFO) ""
@$(INFO) " 2. Run ONLY base upgrade tests:"
@$(INFO) " export UPGRADE_TEST_FROM_TAG=v0.3.2"
@$(INFO) " export UPGRADE_TEST_TO_TAG=v0.4.0"
@$(INFO) " make test-upgrade-base"
@$(INFO) ""
@$(INFO) " 3. Run ONLY custom upgrade tests:"
@$(INFO) " export UPGRADE_TEST_FROM_TAG=v0.3.2"
@$(INFO) " export UPGRADE_TEST_TO_TAG=v0.4.0"
@$(INFO) " make test-upgrade-custom"
@$(INFO) ""
@$(INFO) " 4. Run specific custom test:"
@$(INFO) " export UPGRADE_TEST_FROM_TAG=v0.3.2"
@$(INFO) " export UPGRADE_TEST_TO_TAG=v0.4.0"
@$(INFO) " export UPGRADE_TEST_FILTER='Test_Space_External_Name'"
@$(INFO) " make test-upgrade-custom"
@$(INFO) ""
@$(INFO) " 5. Test local changes (v0.3.2 -> your code):"
@$(INFO) " export UPGRADE_TEST_FROM_TAG=v0.3.2"
@$(INFO) " export UPGRADE_TEST_TO_TAG=local"
@$(INFO) " make test-upgrade"
@$(INFO) ""
@$(INFO) " 6. Clean up test artifacts:"
@$(INFO) " make test-upgrade-clean"
@$(INFO) ""
@$(INFO) " 7. Restore CRs after version checkout:"
@$(INFO) " make test-upgrade-restore-crs"
@$(INFO) ""
@$(INFO) "Required Environment Variables:"
@$(INFO) " CF_EMAIL, CF_USERNAME, CF_PASSWORD, CF_ENDPOINT"
@$(INFO) " UPGRADE_TEST_FROM_TAG, UPGRADE_TEST_TO_TAG"
@$(INFO) ""
@$(INFO) "Optional Environment Variables:"
@$(INFO) " UPGRADE_TEST_FILTER (default: '.' - runs all tests)"
@$(INFO) " UPGRADE_TEST_CRS_TAG (default: UPGRADE_TEST_FROM_TAG)"
@$(INFO) ""
@$(INFO) "Test Types:"
@$(INFO) "==========="
@$(INFO) " Base Tests: Standard resource verification (TestUpgradeProvider)"
@$(INFO) " Custom Tests: External-name validation (Test_Space_External_Name, etc.)"
@$(INFO) ""
# ====================================================================================
# Special Targets
define CROSSPLANE_MAKE_HELP
Crossplane Targets:
cobertura Generate a coverage report for cobertura applying exclusions on generated files.
submodules Update the submodules, such as the common build scripts.
run Run crossplane locally, out-of-cluster. Useful for development.
Upgrade Testing:
test-upgrade Run ALL upgrade tests (requires env vars, base + custom)
test-upgrade-base Run base upgrade tests only
test-upgrade-custom Run custom upgrade tests only (external-name validation, etc.)
test-upgrade-with-version-crs Run upgrade tests with auto CR checkout
test-upgrade-compile Verify upgrade tests compile
test-upgrade-debug Run upgrade tests with debugger
test-upgrade-prepare-crs Prepare CRs from CRS_TAG version
test-upgrade-restore-crs Restore test/upgrade/crs/ to current version
test-upgrade-clean Clean up upgrade test artifacts
test-upgrade-help Show detailed upgrade test usage
check-upgrade-test-vars Verify required environment variables
build-upgrade-test-images Build local images if needed
endef
# The reason CROSSPLANE_MAKE_HELP is used instead of CROSSPLANE_HELP is because the crossplane
# binary will try to use CROSSPLANE_HELP if it is set, and this is for something different.
export CROSSPLANE_MAKE_HELP
crossplane.help:
@echo "$$CROSSPLANE_MAKE_HELP"
help-special: crossplane.help
.PHONY: crossplane.help help-special