Merge pull request #48653 from cblecker/verify-godep-fix

Automatic merge from submit-queue (batch tested with PRs 47040, 48597, 48608, 48653)

Fix godep verify to use godep restore script

**What this PR does / why we need it**:
A bug was introduced in #48615. `hack/verify-godeps.sh` only downloads and compares if godeps have changed, so it wasn't caught on the original PR. However, when it does run (e.g. https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/48630/pull-kubernetes-verify/38350/) it fails because the godep-save script now doesn't permit a compex GOPATH. verify-godeps.sh actually sets one because it restores godeps not using the `hack/godep-restore.sh` script.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @sttts
/priority failing-test
pull/6/head
Kubernetes Submit Queue 2017-07-08 15:33:28 -07:00 committed by GitHub
commit 5ca03d674e
1 changed files with 4 additions and 8 deletions

View File

@ -48,7 +48,8 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
readonly branch=${1:-${KUBE_VERIFY_GIT_BRANCH:-master}} readonly branch=${1:-${KUBE_VERIFY_GIT_BRANCH:-master}}
if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \ if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'Godeps/' && \ ! kube::util::has_changes_against_upstream_branch "${branch}" 'Godeps/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'vendor/'; then ! kube::util::has_changes_against_upstream_branch "${branch}" 'vendor/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/'; then
exit 0 exit 0
fi fi
@ -85,13 +86,8 @@ _kubetmp="${_kubetmp}/kubernetes"
export GOPATH="${_tmpdir}" export GOPATH="${_tmpdir}"
pushd "${_kubetmp}" 2>&1 > /dev/null pushd "${_kubetmp}" 2>&1 > /dev/null
kube::util::ensure_godep_version v79 # Restore the Godeps into our temp directory
hack/godep-restore.sh
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
echo "Download finished"
# Destroy deps in the copy of the kube tree # Destroy deps in the copy of the kube tree
rm -rf ./Godeps ./vendor rm -rf ./Godeps ./vendor