Skip to content

Commit

Permalink
Make kubeadm job friendlier for local execution.
Browse files Browse the repository at this point in the history
This lets users gracefully invoke the job's Docker image with mounted
volumes for the necessary repositories (instead of cloning them).
Previously, they would have to comment out these "git clone" lines and
rebuild the image or encounter an error because the directories already
existed.
  • Loading branch information
pipejakob committed Mar 8, 2017
1 parent 15eb756 commit 1eb3500
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions images/ci-kubernetes-e2e-kubeadm/runner
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ set -o errexit
set -o nounset
set -o pipefail

git clone https://github.com/kubernetes/test-infra
git clone https://github.com/kubernetes/kubernetes-anywhere
if [ ! -e test-infra ]; then
git clone https://github.com/kubernetes/test-infra
fi

if [ ! -e kubernetes-anywhere ]; then
git clone https://github.com/kubernetes/kubernetes-anywhere
fi

# This is required until https://github.com/kubernetes/kubernetes-anywhere/issues/332
# is implemented.
ln -s "${GOOGLE_APPLICATION_CREDENTIALS}" kubernetes-anywhere/phase1/gce/account.json
if [ ! -e kubernetes-anywhere/phase1/gce/account.json ]; then
ln -s "${GOOGLE_APPLICATION_CREDENTIALS}" kubernetes-anywhere/phase1/gce/account.json
fi

./test-infra/jenkins/bootstrap.py \
--repo="k8s.io/${REPO_NAME}" \
Expand Down

0 comments on commit 1eb3500

Please sign in to comment.