Pass KOKORO_BUILD_ID to Docker

pull/13078/head
Matt Kwong 7 years ago
parent cfa38cc782
commit 827c6e90e2
  1. 3
      tools/internal_ci/linux/grpc_run_tests_matrix.sh
  2. 2
      tools/internal_ci/linux/pull_request/grpc_basictests_c_opt.cfg
  3. 1
      tools/run_tests/dockerize/build_docker_and_run_tests.sh
  4. 5
      tools/run_tests/python_utils/upload_test_results.py

@ -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" export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch"
fi fi
echo $KOKORO_BUILD_ID
# export KOKORO_BUILD_ID=$KOKORO_BUILD_ID
tools/run_tests/run_tests_matrix.py $RUN_TESTS_FLAGS || FAILED="true" tools/run_tests/run_tests_matrix.py $RUN_TESTS_FLAGS || FAILED="true"
# Reveal leftover processes that might be left behind by the build # Reveal leftover processes that might be left behind by the build

@ -26,5 +26,5 @@ action {
env_vars { env_vars {
key: "RUN_TESTS_FLAGS" 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"
} }

@ -66,6 +66,7 @@ docker run \
-e "BUILD_ID=$BUILD_ID" \ -e "BUILD_ID=$BUILD_ID" \
-e "BUILD_URL=$BUILD_URL" \ -e "BUILD_URL=$BUILD_URL" \
-e "JOB_BASE_NAME=$JOB_BASE_NAME" \ -e "JOB_BASE_NAME=$JOB_BASE_NAME" \
-e "KOKORO_BUILD_ID=$KOKORO_BUILD_ID" \
-e "KOKORO_BUILD_NUMBER=$KOKORO_BUILD_NUMBER" \ -e "KOKORO_BUILD_NUMBER=$KOKORO_BUILD_NUMBER" \
-e "KOKORO_BUILD_URL=$KOKORO_BUILD_URL" \ -e "KOKORO_BUILD_URL=$KOKORO_BUILD_URL" \
-e "KOKORO_JOB_NAME=$KOKORO_JOB_NAME" \ -e "KOKORO_JOB_NAME=$KOKORO_JOB_NAME" \

@ -72,7 +72,10 @@ def _get_build_metadata(test_results):
variables set by Jenkins/Kokoro. variables set by Jenkins/Kokoro.
""" """
build_id = os.getenv('BUILD_ID') or os.getenv('KOKORO_BUILD_NUMBER') 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') job_name = os.getenv('JOB_BASE_NAME') or os.getenv('KOKORO_JOB_NAME')
if build_id: if build_id:

Loading…
Cancel
Save