2021-04-24 23:39:06 +00:00
|
|
|
MAKEFLAGS += --warn-undefined-variables
|
|
|
|
SHELL := /bin/bash
|
|
|
|
.SHELLFLAGS := -euo pipefail -c
|
|
|
|
|
2022-08-19 15:32:06 +00:00
|
|
|
KIND_IMG = "kindest/node:v1.24.2@sha256:1f0cee2282f43150b52dc7933183ed96abdcfc8d293f30ec07082495874876f1"
|
2022-11-23 20:25:19 +00:00
|
|
|
DOCKER_BUILD_ARGS ?=
|
2021-04-24 23:39:06 +00:00
|
|
|
|
2022-10-06 17:14:13 +00:00
|
|
|
export E2E_IMAGE_NAME ?= ghcr.io/external-secrets/external-secrets-e2e
|
2022-01-21 20:05:37 +00:00
|
|
|
export GINKGO_LABELS ?= !managed
|
2022-10-29 18:15:50 +00:00
|
|
|
export TEST_SUITES ?= provider generator flux argocd
|
2021-12-29 12:02:56 +00:00
|
|
|
|
2021-04-24 23:39:06 +00:00
|
|
|
start-kind: ## Start kind cluster
|
|
|
|
kind create cluster \
|
|
|
|
--name external-secrets \
|
|
|
|
--config kind.yaml \
|
|
|
|
--retain \
|
2021-08-04 13:18:56 +00:00
|
|
|
--image "$(KIND_IMG)"
|
2021-04-24 23:39:06 +00:00
|
|
|
|
|
|
|
test: e2e-image ## Run e2e tests against current kube context
|
|
|
|
$(MAKE) -C ../ docker.build \
|
2022-10-06 17:14:13 +00:00
|
|
|
IMAGE_NAME=$(IMAGE_NAME) \
|
2022-01-21 20:05:37 +00:00
|
|
|
VERSION=$(VERSION) \
|
2021-11-06 20:12:13 +00:00
|
|
|
ARCH=amd64 \
|
2022-11-23 20:25:19 +00:00
|
|
|
DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg TARGETARCH=amd64 --build-arg TARGETOS=linux"
|
2022-10-06 17:14:13 +00:00
|
|
|
kind load docker-image --name="external-secrets" $(IMAGE_NAME):$(VERSION)
|
|
|
|
kind load docker-image --name="external-secrets" $(E2E_IMAGE_NAME):$(VERSION)
|
2021-04-24 23:39:06 +00:00
|
|
|
./run.sh
|
|
|
|
|
2022-01-21 20:05:37 +00:00
|
|
|
test.managed: e2e-image ## Run e2e tests against current kube context
|
2021-12-29 12:02:56 +00:00
|
|
|
$(MAKE) -C ../ docker.build \
|
2022-01-21 20:05:37 +00:00
|
|
|
VERSION=$(VERSION) \
|
2021-12-29 12:02:56 +00:00
|
|
|
ARCH=amd64 \
|
2022-11-23 20:25:19 +00:00
|
|
|
DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg TARGETARCH=amd64 --build-arg TARGETOS=linux"
|
2021-12-29 12:02:56 +00:00
|
|
|
$(MAKE) -C ../ docker.push \
|
2022-01-21 20:05:37 +00:00
|
|
|
VERSION=$(VERSION)
|
2021-12-29 12:02:56 +00:00
|
|
|
$(MAKE) -C ../ docker.push \
|
2022-10-06 17:14:13 +00:00
|
|
|
IMAGE_NAME=$(E2E_IMAGE_NAME) \
|
2022-01-21 20:05:37 +00:00
|
|
|
VERSION=$(VERSION)
|
2021-12-29 12:02:56 +00:00
|
|
|
./run.sh
|
|
|
|
|
2021-04-24 23:39:06 +00:00
|
|
|
e2e-bin:
|
2022-05-23 14:14:21 +00:00
|
|
|
CGO_ENABLED=0 go run github.com/onsi/ginkgo/v2/ginkgo build ./suites/...
|
2021-04-24 23:39:06 +00:00
|
|
|
|
2023-06-15 09:54:18 +00:00
|
|
|
e2e-image:
|
2021-04-24 23:39:06 +00:00
|
|
|
-rm -rf ./k8s/deploy
|
|
|
|
mkdir -p k8s
|
|
|
|
$(MAKE) -C ../ helm.generate
|
|
|
|
cp -r ../deploy ./k8s
|
2023-06-15 09:54:18 +00:00
|
|
|
docker build $(DOCKER_BUILD_ARGS) -t $(E2E_IMAGE_NAME):$(VERSION) -f Dockerfile ..
|
2021-12-29 12:02:56 +00:00
|
|
|
|
2021-04-24 23:39:06 +00:00
|
|
|
stop-kind: ## Stop kind cluster
|
|
|
|
kind delete cluster \
|
|
|
|
--name external-secrets \
|
|
|
|
|
|
|
|
help: ## displays this help message
|
|
|
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_\/-]+:.*?## / {printf "\033[34m%-18s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
|
|
|
|
sort | \
|
|
|
|
grep -v '#'
|