From 719870fdcfeb7d2f8a48e183c3e7d13c3750fdac Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Fri, 26 Jun 2015 18:12:42 -0700 Subject: [PATCH] add publishing of latest-green.txt to jenkins e2e tests on success --- hack/jenkins/e2e.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hack/jenkins/e2e.sh b/hack/jenkins/e2e.sh index 1112d5a3bf6..a5c3332910d 100755 --- a/hack/jenkins/e2e.sh +++ b/hack/jenkins/e2e.sh @@ -338,7 +338,12 @@ fi # Jenkins will look at the junit*.xml files for test failures, so don't exit # with a nonzero error code if it was only tests that failed. if [[ "${E2E_TEST,,}" == "true" ]]; then - go run ./hack/e2e.go ${E2E_OPT} -v --test --test_args="${GINKGO_TEST_ARGS}" || true + go run ./hack/e2e.go ${E2E_OPT} -v --test --test_args="${GINKGO_TEST_ARGS}" && exitcode=0 || exitcode=$? + if [[ "${E2E_PUBLISH_GREEN_VERSION:-}" == "true" && ${exitcode} == 0 && -n ${githash:-} ]]; then + echo "publish githash to ci/latest-green.txt: ${githash}" + echo "${githash}" > ${WORKSPACE}/githash.txt + gsutil cp ${WORKSPACE}/githash.txt gs://kubernetes-release/ci/latest-green.txt + fi fi # TODO(zml): We have a bunch of legacy Jenkins configs that are