Improve the time to run e2e tests

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-09-05 11:46:53 -04:00
parent 38b985663c
commit 1433cde9e6
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
4 changed files with 21 additions and 8 deletions

View file

@ -30,7 +30,7 @@ function cleanup {
}
trap cleanup EXIT
E2E_IMAGE=quay.io/kubernetes-ingress-controller/e2e:v09042019-11ed7fc84
E2E_IMAGE=quay.io/kubernetes-ingress-controller/e2e:v09052019-38b985663
DOCKER_OPTS=${DOCKER_OPTS:-}

View file

@ -22,6 +22,7 @@ RUN clean-install \
make \
wget \
python \
parallel \
pkg-config
ENV GOLANG_VERSION 1.13

View file

@ -1,4 +1,4 @@
FROM quay.io/kubernetes-ingress-controller/e2e:v09042019-11ed7fc84 AS BASE
FROM quay.io/kubernetes-ingress-controller/e2e:v09052019-38b985663 AS BASE
FROM quay.io/kubernetes-ingress-controller/debian-base-amd64:0.1

View file

@ -25,6 +25,16 @@ set -o errexit
set -o nounset
set -o pipefail
if ! command -v parallel &> /dev/null; then
if [[ "$OSTYPE" == "linux-gnu" ]]; then
echo "Parallel is not installed. Use the package manager to install it"
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "Parallel is not installed. Install it running brew install parallel"
fi
exit 1
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export TAG=dev
@ -53,25 +63,27 @@ kubectl get nodes -o wide
kubectl config set-context kubernetes-admin@${KIND_CLUSTER_NAME}
echo "[dev-env] building container"
echo "
make -C ${DIR}/../../ build container
make -C ${DIR}/../../ e2e-test-image
make -C ${DIR}/../../images/fastcgi-helloserver/ build container
make -C ${DIR}/../../images/httpbin/ container
" | parallel --progress {}
# 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}
kind load docker-image --name="${KIND_CLUSTER_NAME}" ${REGISTRY}/fastcgi-helloserver:${TAG}
# Preload images used in e2e tests
docker pull openresty/openresty:1.15.8.2-alpine
echo "[dev-env] copying docker images to cluster..."
echo "
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}
kind load docker-image --name="${KIND_CLUSTER_NAME}" ${REGISTRY}/fastcgi-helloserver:${TAG}
kind load docker-image --name="${KIND_CLUSTER_NAME}" openresty/openresty:1.15.8.2-alpine
kind load docker-image --name="${KIND_CLUSTER_NAME}" ${REGISTRY}/httpbin:${TAG}
" | parallel --progress
echo "[dev-env] running e2e tests..."
make -C ${DIR}/../../ e2e-test