From 3ad13293bc2477202351860113e89de577ae8b27 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Mon, 13 Mar 2017 18:08:26 -0700 Subject: [PATCH] Export patch files to artifacts --- hack/jenkins/verify-dockerized.sh | 3 +++ hack/verify-godeps.sh | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/hack/jenkins/verify-dockerized.sh b/hack/jenkins/verify-dockerized.sh index 8fef1dd7f7e15..b388c130eefa2 100755 --- a/hack/jenkins/verify-dockerized.sh +++ b/hack/jenkins/verify-dockerized.sh @@ -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 diff --git a/hack/verify-godeps.sh b/hack/verify-godeps.sh index 82a2a75a9bff9..4f8c60739fc1c 100755 --- a/hack/verify-godeps.sh +++ b/hack/verify-godeps.sh @@ -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