From c26fb5ad5f17ba7a2d2d34197970b3741e07a181 Mon Sep 17 00:00:00 2001 From: ToMe25 <38815969+ToMe25@users.noreply.github.com> Date: Sat, 17 Apr 2021 10:13:47 +0200 Subject: [PATCH] Make acceptance use local docker image (#448) load the local docker image to the kind cluster instead of pushing it to dockerhub and pulling it from there --- Makefile | 3 ++- acceptance/checks.sh | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 96497f7f..85556a75 100644 --- a/Makefile +++ b/Makefile @@ -135,7 +135,7 @@ release/clean: rm -rf release .PHONY: acceptance -acceptance: release/clean docker-build docker-push release +acceptance: release/clean docker-build release ACCEPTANCE_TEST_SECRET_TYPE=token make acceptance/kind acceptance/setup acceptance/tests acceptance/teardown ACCEPTANCE_TEST_SECRET_TYPE=app make acceptance/kind acceptance/setup acceptance/tests acceptance/teardown ACCEPTANCE_TEST_DEPLOYMENT_TOOL=helm ACCEPTANCE_TEST_SECRET_TYPE=token make acceptance/kind acceptance/setup acceptance/tests acceptance/teardown @@ -143,6 +143,7 @@ acceptance: release/clean docker-build docker-push release acceptance/kind: kind create cluster --name acceptance + kind load docker-image ${NAME}:${VERSION} --name acceptance kubectl cluster-info --context kind-acceptance acceptance/setup: diff --git a/acceptance/checks.sh b/acceptance/checks.sh index 830f13f1..d6bb8e81 100755 --- a/acceptance/checks.sh +++ b/acceptance/checks.sh @@ -12,6 +12,9 @@ done echo Found runner ${runner_name}. +# Wait a bit to make sure the runner pod is created before looking for it. +sleep 2 + pod_name= while [ -z "${pod_name}" ]; do @@ -24,6 +27,6 @@ echo Found pod ${pod_name}. echo Waiting for pod ${runner_name} to become ready... 1>&2 -kubectl wait pod/${runner_name} --for condition=ready --timeout 180s +kubectl wait pod/${runner_name} --for condition=ready --timeout 270s echo All tests passed. 1>&2