Makefile 1.1 KB

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