|
| 1 | +MAKEFLAGS += --no-print-directory |
| 2 | +ANSIBLE_STDOUT_CALLBACK ?= null # null silences all ansible output. Override this with default, minimal, oneline, etc. when debugging. |
| 3 | +ANSIBLE_RUN := ANSIBLE_STDOUT_CALLBACK=$(ANSIBLE_STDOUT_CALLBACK) ansible-playbook $(EXTRA_PLAYBOOK_OPTS) |
| 4 | +DOCS_URL := https://validatedpatterns.io/blog/2025-08-29-new-common-makefile-structure/ |
| 5 | + |
| 6 | +.PHONY: help |
| 7 | +help: ## Print this help message |
| 8 | + @echo "For a complete guide to these targets and the available overrides, please visit $(DOCS_URL)" |
| 9 | + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^(\s|[a-zA-Z_0-9-])+:.*?##/ { printf " \033[36m%-35s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) |
| 10 | + |
| 11 | +##@ Pattern Install Tasks |
| 12 | +.PHONY: show |
| 13 | +show: ## Shows the template that would be applied by the `make install` target |
| 14 | + @$(ANSIBLE_RUN) rhvp.cluster_utils.show |
| 15 | + |
| 16 | +.PHONY: operator-deploy |
| 17 | +operator-deploy operator-upgrade: ## Installs/updates the pattern on a cluster (DOES NOT load secrets) |
| 18 | + @$(ANSIBLE_RUN) rhvp.cluster_utils.operator_deploy |
| 19 | + |
| 20 | +.PHONY: install |
| 21 | +install: pattern-install ## Installs the pattern onto a cluster (Loads secrets as well if configured) |
| 22 | + |
| 23 | +.PHONY: uninstall ## Prints a notice that patterns cannot currently be uninstalled |
| 24 | +uninstall: |
| 25 | + @echo "Uninstall is not possible at the moment so this target is empty. We are working to implement it as well as we can." |
| 26 | + |
| 27 | +.PHONY: pattern-install |
| 28 | +pattern-install: |
| 29 | + @$(ANSIBLE_RUN) rhvp.cluster_utils.install |
| 30 | + |
| 31 | +.PHONY: load-secrets |
| 32 | +load-secrets: ## Loads secrets onto the cluster (unless explicitly disabled in values-global.yaml) |
| 33 | + @$(ANSIBLE_RUN) rhvp.cluster_utils.load_secrets |
| 34 | + |
| 35 | +##@ Validation Tasks |
| 36 | +.PHONY: validate-prereq |
| 37 | +validate-prereq: ## verify pre-requisites |
| 38 | + @$(ANSIBLE_RUN) rhvp.cluster_utils.validate_prereq |
| 39 | + |
| 40 | +.PHONY: validate-origin |
| 41 | +validate-origin: ## verify the git origin is available |
| 42 | + @$(ANSIBLE_RUN) rhvp.cluster_utils.validate_origin |
| 43 | + |
| 44 | +.PHONY: validate-cluster |
| 45 | +validate-cluster: ## Do some cluster validations before installing |
| 46 | + @$(ANSIBLE_RUN) rhvp.cluster_utils.validate_cluster |
| 47 | + |
| 48 | +.PHONY: validate-schema |
| 49 | +validate-schema: ## validates values files against schema in common/clustergroup |
| 50 | + @$(ANSIBLE_RUN) rhvp.cluster_utils.validate_schema |
| 51 | + |
| 52 | +.PHONY: argo-healthcheck |
| 53 | +argo-healthcheck: ## Checks if all argo applications are synced |
| 54 | + @$(ANSIBLE_RUN) rhvp.cluster_utils.argo_healthcheck |
0 commit comments