1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00
external-secrets/e2e/Makefile

58 lines
1.8 KiB
Makefile
Raw Normal View History

2021-04-24 23:39:06 +00:00
MAKEFLAGS += --warn-undefined-variables
SHELL := /bin/bash
.SHELLFLAGS := -euo pipefail -c
KIND_IMG = "kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6"
BUILD_ARGS ?=
2021-04-24 23:39:06 +00:00
export E2E_IMAGE_REGISTRY ?= ghcr.io/external-secrets/external-secrets-e2e
export GINKGO_LABELS ?= !managed
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 \
IMAGE_REGISTRY=$(IMAGE_REGISTRY) \
VERSION=$(VERSION) \
ARCH=amd64 \
2021-11-10 12:54:45 +00:00
BUILD_ARGS="${BUILD_ARGS} --build-arg TARGETARCH=amd64 --build-arg TARGETOS=linux"
kind load docker-image --name="external-secrets" $(IMAGE_REGISTRY):$(VERSION)
kind load docker-image --name="external-secrets" $(E2E_IMAGE_REGISTRY):$(VERSION)
2021-04-24 23:39:06 +00:00
./run.sh
test.managed: e2e-image ## Run e2e tests against current kube context
2021-12-29 12:02:56 +00:00
$(MAKE) -C ../ docker.build \
VERSION=$(VERSION) \
2021-12-29 12:02:56 +00:00
ARCH=amd64 \
BUILD_ARGS="${BUILD_ARGS} --build-arg TARGETARCH=amd64 --build-arg TARGETOS=linux"
$(MAKE) -C ../ docker.push \
VERSION=$(VERSION)
2021-12-29 12:02:56 +00:00
$(MAKE) -C ../ docker.push \
IMAGE_REGISTRY=$(E2E_IMAGE_REGISTRY) \
VERSION=$(VERSION)
2021-12-29 12:02:56 +00:00
./run.sh
2021-04-24 23:39:06 +00:00
e2e-bin:
CGO_ENABLED=0 go run github.com/onsi/ginkgo/v2/ginkgo build .
2021-04-24 23:39:06 +00:00
e2e-image: e2e-bin
-rm -rf ./k8s/deploy
mkdir -p k8s
$(MAKE) -C ../ helm.generate
cp -r ../deploy ./k8s
docker build $(BUILD_ARGS) -t $(E2E_IMAGE_REGISTRY):$(VERSION) .
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 '#'