Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the time to run e2e tests #4535

Merged
merged 1 commit into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/run-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:-}

Expand Down
1 change: 1 addition & 0 deletions images/e2e/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN clean-install \
make \
wget \
python \
parallel \
pkg-config

ENV GOLANG_VERSION 1.13
Expand Down
2 changes: 1 addition & 1 deletion test/e2e-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
22 changes: 17 additions & 5 deletions test/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}

# 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}

# Preload images used in e2e tests
docker pull openresty/openresty:1.15.8.2-alpine

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
Expand Down