Merge pull request #43020 from cblecker/verify-artifacts

Automatic merge from submit-queue (batch tested with PRs 42998, 42902, 42959, 43020, 42948)

Export godep patch files to artifacts

**What this PR does / why we need it**:
If a godep patch file is created, and a `${WORKSPACE}/_artifacts` directory exists, copy the patch file out to it.

**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
```

cc: @fejta
This commit is contained in:
Kubernetes Submit Queue 2017-03-25 17:17:26 -07:00 committed by GitHub
commit 14c1c9cfd4
2 changed files with 13 additions and 0 deletions

View File

@ -31,6 +31,9 @@ retry() {
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
# Set artifacts directory
export ARTIFACTS_DIR=${WORKSPACE}/artifacts
retry go get github.com/tools/godep && godep version
export LOG_LEVEL=4

View File

@ -116,7 +116,12 @@ pushd "${KUBE_ROOT}" 2>&1 > /dev/null
echo "If you're seeing this locally, run the below command to fix your Godeps.json:"
echo "patch -p0 < godepdiff.patch"
echo "(The above output can be saved as godepdiff.patch if you're not running this locally)"
echo "(The patch file should also be exported as a build artifact if run through CI)"
KEEP_TMP=true
if [[ -f godepdiff.patch && -d "${ARTIFACTS_DIR:-}" ]]; then
echo "Copying patch to artifacts.."
cp godepdiff.patch "${ARTIFACTS_DIR:-}/"
fi
ret=1
fi
@ -128,7 +133,12 @@ pushd "${KUBE_ROOT}" 2>&1 > /dev/null
echo "If you're seeing this locally, run the below command to fix your directories:"
echo "patch -p0 < vendordiff.patch"
echo "(The above output can be saved as godepdiff.patch if you're not running this locally)"
echo "(The patch file should also be exported as a build artifact if run through CI)"
KEEP_TMP=true
if [[ -f vendordiff.patch && -d "${ARTIFACTS_DIR:-}" ]]; then
echo "Copying patch to artifacts.."
cp vendordiff.patch "${ARTIFACTS_DIR:-}/"
fi
ret=1
fi
popd 2>&1 > /dev/null