From ede8de7aba1b524d7a24696dc5edc88db5f00d09 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Fri, 27 Nov 2015 12:51:00 +0100 Subject: [PATCH 1/2] contrib/mesos/ci: call kube-down.sh from correct dir --- contrib/mesos/ci/run-with-cluster.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/mesos/ci/run-with-cluster.sh b/contrib/mesos/ci/run-with-cluster.sh index 761b709fb31..afe8295d26a 100755 --- a/contrib/mesos/ci/run-with-cluster.sh +++ b/contrib/mesos/ci/run-with-cluster.sh @@ -81,6 +81,6 @@ exec docker run \ trap 'timeout 5m ./cluster/kube-down.sh' EXIT && \ ./cluster/kube-down.sh && \ ./cluster/kube-up.sh && \ - trap 'test \$? != 0 && export MESOS_DOCKER_DUMP_LOGS=true; timeout 5m ./cluster/kube-down.sh' EXIT && \ + trap \"test \\\$? != 0 && export MESOS_DOCKER_DUMP_LOGS=true; cd \${PWD} && timeout 5m ./cluster/kube-down.sh\" EXIT && \ ${RUN_CMD} " From 2302caf970c9ee0f3719cbaa23dc42442386e47e Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Fri, 27 Nov 2015 11:20:38 +0100 Subject: [PATCH 2/2] 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. --- contrib/mesos/ci/test-conformance.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/contrib/mesos/ci/test-conformance.sh b/contrib/mesos/ci/test-conformance.sh index 2e67bbf59dc..5e1fc7839e3 100755 --- a/contrib/mesos/ci/test-conformance.sh +++ b/contrib/mesos/ci/test-conformance.sh @@ -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}