Refactor scripts to run e2e tests
This commit is contained in:
parent
7be1dccea7
commit
be2792c5f9
6 changed files with 68 additions and 129 deletions
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
ginkgo build ./test/e2e
|
||||
|
|
@ -14,33 +14,15 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if ! [ -z $DEBUG ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
declare -a mandatory
|
||||
mandatory=(
|
||||
PKG
|
||||
ARCH
|
||||
GIT_COMMIT
|
||||
REPO_INFO
|
||||
TAG
|
||||
HOME
|
||||
)
|
||||
|
||||
missing=false
|
||||
for var in ${mandatory[@]}; do
|
||||
if [[ -z "${!var+x}" ]]; then
|
||||
echo "Environment variable $var must be set"
|
||||
missing=true
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$missing" = true ];then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
E2E_IMAGE=quay.io/kubernetes-ingress-controller/e2e:v05062019-b4f2880ee
|
||||
E2E_IMAGE=quay.io/kubernetes-ingress-controller/e2e:v05122019-7b3f69a3ba
|
||||
|
||||
DOCKER_OPTS=${DOCKER_OPTS:-""}
|
||||
|
||||
|
|
@ -51,8 +33,7 @@ PKG=${PKG:-""}
|
|||
ARCH=${ARCH:-""}
|
||||
GIT_COMMIT=${GIT_COMMIT:-""}
|
||||
TAG=${TAG:-"0.0"}
|
||||
HOME=${HOME:-/root}
|
||||
GOARCH=${GOARCH}
|
||||
GOARCH=${GOARCH:-""}
|
||||
GOBUILD_FLAGS=${GOBUILD_FLAGS:-"-v"}
|
||||
PWD=${PWD}
|
||||
BUSTED_ARGS=${BUSTED_ARGS:-""}
|
||||
|
|
@ -74,6 +55,7 @@ docker run \
|
|||
-v ${PWD}:/go/src/${PKG} \
|
||||
-v ${PWD}/.gocache:${HOME}/.cache/go-build \
|
||||
-v ${PWD}/bin/${ARCH}:/go/bin/linux_${ARCH} \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
${MINIKUBE_VOLUME} \
|
||||
-w /go/src/${PKG} \
|
||||
--env-file .env \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue