aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Matt Kwong <mattkwong@google.com>2017-12-20 13:21:37 -0800
committerGravatar Matt Kwong <mattkwong@google.com>2017-12-20 16:05:35 -0800
commit827c6e90e2abddcb394b9b9906b4b79cc08ca299 (patch)
tree6b578eceb247a62bed88968f2065c7694a2f89a4 /tools
parentcfa38cc7825f4d3fe0fc324fe4f9b5b53b3ce217 (diff)
Pass KOKORO_BUILD_ID to Docker
Diffstat (limited to 'tools')
-rwxr-xr-xtools/internal_ci/linux/grpc_run_tests_matrix.sh3
-rw-r--r--tools/internal_ci/linux/pull_request/grpc_basictests_c_opt.cfg2
-rwxr-xr-xtools/run_tests/dockerize/build_docker_and_run_tests.sh1
-rw-r--r--tools/run_tests/python_utils/upload_test_results.py5
4 files changed, 6 insertions, 5 deletions
diff --git a/tools/internal_ci/linux/grpc_run_tests_matrix.sh b/tools/internal_ci/linux/grpc_run_tests_matrix.sh
index 21cc1ed196..1018708f96 100755
--- a/tools/internal_ci/linux/grpc_run_tests_matrix.sh
+++ b/tools/internal_ci/linux/grpc_run_tests_matrix.sh
@@ -27,9 +27,6 @@ if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; the
export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch"
fi
-echo $KOKORO_BUILD_ID
-# export KOKORO_BUILD_ID=$KOKORO_BUILD_ID
-
tools/run_tests/run_tests_matrix.py $RUN_TESTS_FLAGS || FAILED="true"
# Reveal leftover processes that might be left behind by the build
diff --git a/tools/internal_ci/linux/pull_request/grpc_basictests_c_opt.cfg b/tools/internal_ci/linux/pull_request/grpc_basictests_c_opt.cfg
index c1ff5a2e11..9e0b724b2e 100644
--- a/tools/internal_ci/linux/pull_request/grpc_basictests_c_opt.cfg
+++ b/tools/internal_ci/linux/pull_request/grpc_basictests_c_opt.cfg
@@ -26,5 +26,5 @@ action {
env_vars {
key: "RUN_TESTS_FLAGS"
- value: "-f basictests linux c opt --inner_jobs 16 -j 1 --internal_ci --max_time=3600 --bq_result_table tmp2"
+ value: "-f basictests linux c opt --inner_jobs 16 -j 1 --internal_ci --max_time=3600"
}
diff --git a/tools/run_tests/dockerize/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh
index 06a5dae6a5..32de3fa977 100755
--- a/tools/run_tests/dockerize/build_docker_and_run_tests.sh
+++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh
@@ -66,6 +66,7 @@ docker run \
-e "BUILD_ID=$BUILD_ID" \
-e "BUILD_URL=$BUILD_URL" \
-e "JOB_BASE_NAME=$JOB_BASE_NAME" \
+ -e "KOKORO_BUILD_ID=$KOKORO_BUILD_ID" \
-e "KOKORO_BUILD_NUMBER=$KOKORO_BUILD_NUMBER" \
-e "KOKORO_BUILD_URL=$KOKORO_BUILD_URL" \
-e "KOKORO_JOB_NAME=$KOKORO_JOB_NAME" \
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: