From 827c6e90e2abddcb394b9b9906b4b79cc08ca299 Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Wed, 20 Dec 2017 13:21:37 -0800 Subject: Pass KOKORO_BUILD_ID to Docker --- tools/run_tests/python_utils/upload_test_results.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/run_tests/python_utils') diff --git a/tools/run_tests/python_utils/upload_test_results.py b/tools/run_tests/python_utils/upload_test_results.py index 9eb8e2a862..a2dd1c66cf 100644 --- a/tools/run_tests/python_utils/upload_test_results.py +++ b/tools/run_tests/python_utils/upload_test_results.py @@ -72,7 +72,10 @@ def _get_build_metadata(test_results): variables set by Jenkins/Kokoro. """ build_id = os.getenv('BUILD_ID') or os.getenv('KOKORO_BUILD_NUMBER') - build_url = os.getenv('BUILD_URL') or os.getenv('KOKORO_BUILD_URL') + build_url = os.getenv('BUILD_URL') + if os.getenv('KOKORO_BUILD_ID'): + build_url = 'https://sponge.corp.google.com/invocation?id=%s' % os.getenv( + 'KOKORO_BUILD_ID') job_name = os.getenv('JOB_BASE_NAME') or os.getenv('KOKORO_JOB_NAME') if build_id: -- cgit v1.2.3