diff --git a/hack/godep-restore.sh b/hack/godep-restore.sh new file mode 100755 index 0000000000000..3870c1c4e96d8 --- /dev/null +++ b/hack/godep-restore.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Copyright 2017 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 + +KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +source "${KUBE_ROOT}/hack/lib/init.sh" +export GOPATH=${GOPATH}:${KUBE_ROOT}/staging +GODEP="${GODEP:-godep}" + +echo "Starting to download all kubernetes godeps. This takes a while" +"${GODEP}" restore "$@" +echo "Download finished" diff --git a/hack/jenkins/verify-dockerized.sh b/hack/jenkins/verify-dockerized.sh index 7b0f259c667d6..8fef1dd7f7e15 100755 --- a/hack/jenkins/verify-dockerized.sh +++ b/hack/jenkins/verify-dockerized.sh @@ -39,7 +39,7 @@ cd /go/src/k8s.io/kubernetes # hack/verify-client-go.sh requires all dependencies exist in the GOPATH. # the retry helps avoid flakes while keeping total time bounded. -godep restore || godep restore +./hack/godep-restore.sh || ./hack/godep-restore.sh ./hack/install-etcd.sh make verify diff --git a/hack/verify-godeps.sh b/hack/verify-godeps.sh index 391e5ff453ab6..07cd72f151854 100755 --- a/hack/verify-godeps.sh +++ b/hack/verify-godeps.sh @@ -99,6 +99,7 @@ pushd "${_kubetmp}" 2>&1 > /dev/null pin-godep 'v74' "${GODEP}" version + export GOPATH="${GOPATH}:${_kubetmp}/staging" # Fill out that nice clean place with the kube godeps echo "Starting to download all kubernetes godeps. This takes a while" "${GODEP}" restore