Commit 3e558def authored by Tim Leers's avatar Tim Leers Committed by Geoff Simmons

inline commands

parent ec13f4d6
stages:
- test
- build
- e2e
- test
test:
image: golang:1.11.6
......@@ -70,6 +70,7 @@ build:controller:
- docker push $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/$IMAGE:latest
integration:
needs: ["build:controller"]
stage: e2e
image: docker:19.03.8
services:
......@@ -97,6 +98,7 @@ integration:
# using varnish image with latest tag due to performance. if we are changing this image a lot, we need to improve this as can lead to pulling the incorrect image
- docker pull $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/varnish:latest
- docker tag $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/controller:$CI_COMMIT_SHA varnish-ingress/controller
- docker tag $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/varnish:latest varnish-ingress/ingress
- docker tag $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/varnish:latest varnish-ingress/varnish
- kind load docker-image varnish-ingress/varnish
- kind load docker-image varnish-ingress/controller
- test/e2e.sh
......@@ -4,13 +4,6 @@ function killforward {
kill $KUBEPID
}
failureCode() {
local code=${2:-500}
local status=$(curl --head --location --connect-timeout 5 --write-out %{http_code} --silent --output /dev/null localhost:${LOCALPORT})
[[ $status == ${code} ]] || [[ $status == 000 ]]
}
LOCALPORT=${LOCALPORT:-8888}
kubectl wait --timeout=2m pod -l app=varnish-ingress,example!=cli-args --for=delete
......@@ -22,11 +15,5 @@ kubectl port-forward svc/varnish-ingress ${LOCALPORT}:80 >/dev/null &
KUBEPID=$!
trap killforward EXIT
for ((n = 0; n < 20; n++)); do
if [[ failureCode ]] ; then
sleep 0.5
fi
break
done
sleep 1
varnishtest ${TESTOPTS} -Dlocalport=${LOCALPORT} cafe_cli-args.vtc
......@@ -4,12 +4,6 @@ function killforward {
kill $KUBEPID
}
failureCode() {
local code=${2:-500}
local status=$(curl --head --location --connect-timeout 5 --write-out %{http_code} --silent --output /dev/null localhost:${LOCALPORT})
[[ $status == ${code} ]] || [[ $status == 000 ]]
}
LOCALPORT=${LOCALPORT:-8888}
kubectl wait --timeout=2m pod -l app=varnish-ingress,example!=proxy --for=delete
......@@ -21,11 +15,5 @@ kubectl port-forward svc/varnish-ingress ${LOCALPORT}:80 >/dev/null &
KUBEPID=$!
trap killforward EXIT
for ((n = 0; n < 20; n++)); do
if [[ failureCode ]] ; then
sleep 0.5
fi
break
done
sleep 1
varnishtest ${TESTOPTS} -Dlocalport=${LOCALPORT} cafe_proxy.vtc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment