Commit 2302caf9 authored by Dr. Stefan Schimanski's avatar Dr. Stefan Schimanski

contrib/mesos/ci: clone conformance branch into subdir

In order to properly shutdown the docker-compose cluster, after the conformance test it is necessary to have the original version again. Running the conformance tests from a clone in subdir with the right branch given by CONFORMANCE_BRANCH is much easier.
parent ede8de7a
......@@ -31,19 +31,13 @@ TEST_ARGS="$@"
KUBE_ROOT=$(cd "$(dirname "${BASH_SOURCE}")/../../.." && pwd)
TEST_CMD="KUBECONFIG=~/.kube/config hack/conformance-test.sh"
if [ -n "${CONFORMANCE_BRANCH}" ]; then
# checkout CONFORMANCE_BRANCH, but leave the contrib/mesos/ci directory
# untouched.
# create a CONFORMANCE_BRANCH clone in a subdirectory
TEST_CMD="
git fetch https://github.com/kubernetes/kubernetes ${CONFORMANCE_BRANCH} &&
git checkout FETCH_HEAD -- . ':(exclude)contrib/mesos/ci/**' &&
git reset FETCH_HEAD &&
git clean -d -f -- . ':(exclude)contrib/mesos/ci/**' &&
git status &&
make all &&
"
else
TEST_CMD=""
git fetch https://github.com/kubernetes/kubernetes --tags -q ${CONFORMANCE_BRANCH} &&
git clone -s -b ${CONFORMANCE_BRANCH} . conformance &&
cd conformance && make all && ${TEST_CMD}"
fi
TEST_CMD+="KUBECONFIG=~/.kube/config hack/conformance-test.sh"
"${KUBE_ROOT}/contrib/mesos/ci/run-with-cluster.sh" ${TEST_CMD} ${TEST_ARGS}
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