Skip to content

Commit

Permalink
Merge pull request #4535 from aledbf/speedup
Browse files Browse the repository at this point in the history
Improve the time to run e2e tests
  • Loading branch information
k8s-ci-robot committed Sep 5, 2019
2 parents 38b9856 + 1433cde commit eac8dec
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
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

0 comments on commit eac8dec

Please sign in to comment.