Modify Jenkins E2E to not fetch/unpack Kuberenetes, when deployment is

disabled,
This commit is contained in:
saadali 2015-05-08 14:36:44 -07:00
parent 0da12c1ba9
commit 94643ce6c9

View File

@ -97,10 +97,11 @@ export E2E_UP="${E2E_UP:-true}"
export E2E_TEST="${E2E_TEST:-true}" export E2E_TEST="${E2E_TEST:-true}"
export E2E_DOWN="${E2E_DOWN:-true}" export E2E_DOWN="${E2E_DOWN:-true}"
if [[ ${KUBE_RUN_FROM_OUTPUT:-} =~ ^[yY]$ ]]; then if [[ "${E2E_UP,,}" == "true" ]]; then
if [[ ${KUBE_RUN_FROM_OUTPUT:-} =~ ^[yY]$ ]]; then
echo "Found KUBE_RUN_FROM_OUTPUT=y; will use binaries from _output" echo "Found KUBE_RUN_FROM_OUTPUT=y; will use binaries from _output"
cp _output/release-tars/kubernetes*.tar.gz . cp _output/release-tars/kubernetes*.tar.gz .
else else
echo "Pulling binaries from GCS" echo "Pulling binaries from GCS"
if [[ $(find . | wc -l) != 1 ]]; then if [[ $(find . | wc -l) != 1 ]]; then
echo $PWD not empty, bailing! echo $PWD not empty, bailing!
@ -128,9 +129,9 @@ else
githash=$(gsutil cat gs://kubernetes-release/${bucket}/${version_file}.txt) githash=$(gsutil cat gs://kubernetes-release/${bucket}/${version_file}.txt)
gsutil -m cp gs://kubernetes-release/${bucket}/${githash}/kubernetes.tar.gz gs://kubernetes-release/${bucket}/${githash}/kubernetes-test.tar.gz . gsutil -m cp gs://kubernetes-release/${bucket}/${githash}/kubernetes.tar.gz gs://kubernetes-release/${bucket}/${githash}/kubernetes-test.tar.gz .
fi fi
if [[ ! "${CIRCLECI:-}" == "true" ]]; then if [[ ! "${CIRCLECI:-}" == "true" ]]; then
# Copy GCE keys so we don't keep cycling them. # Copy GCE keys so we don't keep cycling them.
# To set this up, you must know the <project>, <zone>, and <instance> that # To set this up, you must know the <project>, <zone>, and <instance> that
# on which your jenkins jobs are running. Then do: # on which your jenkins jobs are running. Then do:
@ -157,21 +158,23 @@ if [[ ! "${CIRCLECI:-}" == "true" ]]; then
cp /var/lib/jenkins/gce_keys/google_compute_engine ${WORKSPACE}/.ssh/ cp /var/lib/jenkins/gce_keys/google_compute_engine ${WORKSPACE}/.ssh/
cp /var/lib/jenkins/gce_keys/google_compute_engine.pub ${WORKSPACE}/.ssh/ cp /var/lib/jenkins/gce_keys/google_compute_engine.pub ${WORKSPACE}/.ssh/
fi fi
fi fi
md5sum kubernetes*.tar.gz md5sum kubernetes*.tar.gz
tar -xzf kubernetes.tar.gz tar -xzf kubernetes.tar.gz
tar -xzf kubernetes-test.tar.gz tar -xzf kubernetes-test.tar.gz
cd kubernetes
# Set by GKE-CI to change the CLUSTER_API_VERSION to the git version # Set by GKE-CI to change the CLUSTER_API_VERSION to the git version
if [[ ! -z ${E2E_SET_CLUSTER_API_VERSION:-} ]]; then if [[ ! -z ${E2E_SET_CLUSTER_API_VERSION:-} ]]; then
export CLUSTER_API_VERSION=$(echo ${githash} | cut -c 2-) export CLUSTER_API_VERSION=$(echo ${githash} | cut -c 2-)
elif [[ ${JENKINS_USE_RELEASE_TARS:-} =~ ^[yY]$ ]]; then elif [[ ${JENKINS_USE_RELEASE_TARS:-} =~ ^[yY]$ ]]; then
release=$(gsutil cat gs://kubernetes-release/release/${version_file}.txt | cut -c 2-) release=$(gsutil cat gs://kubernetes-release/release/${version_file}.txt | cut -c 2-)
export CLUSTER_API_VERSION=${release} export CLUSTER_API_VERSION=${release}
fi
fi fi
cd kubernetes
# Have cmd/e2e run by goe2e.sh generate JUnit report in ${WORKSPACE}/junit*.xml # Have cmd/e2e run by goe2e.sh generate JUnit report in ${WORKSPACE}/junit*.xml
export E2E_REPORT_DIR=${WORKSPACE} export E2E_REPORT_DIR=${WORKSPACE}