Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. MAKEFLAGS += --warn-undefined-variables
  2. SHELL := /bin/bash
  3. .SHELLFLAGS := -euo pipefail -c
  4. IMG_TAG = test
  5. IMG = local/external-secrets-e2e:$(IMG_TAG)
  6. K8S_VERSION = "1.20.7"
  7. export FOCUS := $(FOCUS)
  8. start-kind: ## Start kind cluster
  9. kind create cluster \
  10. --name external-secrets \
  11. --config kind.yaml \
  12. --retain \
  13. --image "kindest/node:v$(K8S_VERSION)"
  14. test: e2e-image ## Run e2e tests against current kube context
  15. $(MAKE) -C ../ docker.build \
  16. IMAGE_REGISTRY=local/external-secrets \
  17. VERSION=$(IMG_TAG) \
  18. BUILD_ARGS="--build-arg ARCHS=amd64"
  19. kind load docker-image --name="external-secrets" local/external-secrets:$(IMG_TAG)
  20. kind load docker-image --name="external-secrets" $(IMG)
  21. ./run.sh
  22. e2e-bin:
  23. CGO_ENABLED=0 ginkgo build .
  24. e2e-image: e2e-bin
  25. -rm -rf ./k8s/deploy
  26. mkdir -p k8s
  27. $(MAKE) -C ../ helm.generate
  28. cp -r ../deploy ./k8s
  29. docker build -t $(IMG) .
  30. stop-kind: ## Stop kind cluster
  31. kind delete cluster \
  32. --name external-secrets \
  33. help: ## displays this help message
  34. @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_\/-]+:.*?## / {printf "\033[34m%-18s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
  35. sort | \
  36. grep -v '#'