Fix scripts to be able to run tests in docker

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-07-09 09:24:52 -04:00
parent 28cc3bb5e2
commit d5c7fa8cfb
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
8 changed files with 45 additions and 41 deletions

View file

@ -1,9 +1,7 @@
IMAGE=nginx-ingress-controller:e2e
.PHONY: all container getbins clean
.PHONY: all
all: container
.PHONY: container
container:
make -C ../../ e2e-test-binary
@ -12,8 +10,9 @@ container:
cp -r ../../deploy/cloud-generic .
cp -r ../../deploy/cluster-wide .
docker build -t $(IMAGE) .
docker build -t nginx-ingress-controller:e2e .
.PHONY: clean
clean:
rm -rf _cache e2e.test kubectl cluster ginkgo
docker rmi -f $(IMAGE) || true
docker rmi -f nginx-ingress-controller:e2e || true

View file

@ -56,6 +56,9 @@ echo "[dev-env] building container"
make -C ${DIR}/../../ build container
make -C ${DIR}/../../ e2e-test-image
# Remove after https://github.com/kubernetes/ingress-nginx/pull/4271 is merged
docker tag ${REGISTRY}/nginx-ingress-controller-${ARCH}:${TAG} ${REGISTRY}/nginx-ingress-controller:${TAG}
echo "[dev-env] copying docker images to cluster..."
kind load docker-image --name="${KIND_CLUSTER_NAME}" nginx-ingress-controller:e2e
kind load docker-image --name="${KIND_CLUSTER_NAME}" ${REGISTRY}/nginx-ingress-controller:${TAG}