From 2b3daa3ff1daa16903d67e8ea2d4e4e11b51ad0e Mon Sep 17 00:00:00 2001 From: Tyler Bui-Palsulich <26876514+tbpg@users.noreply.github.com> Date: Mon, 10 Feb 2020 10:20:49 -0500 Subject: [PATCH] .kokoro: publish test log to Build Cop Bot (#2775) --- .kokoro/tests/run_tests.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.kokoro/tests/run_tests.sh b/.kokoro/tests/run_tests.sh index 1686ecd4305f..13dc27d70ad8 100755 --- a/.kokoro/tests/run_tests.sh +++ b/.kokoro/tests/run_tests.sh @@ -100,6 +100,31 @@ for file in **/requirements.txt; do nox -s "$RUN_TESTS_SESSION" EXIT=$? + # If this is a continuous build, send the test log to the Build Cop Bot. + # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop. + if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then + XML=$(base64 -w 0 sponge_log.xml) + + # See https://github.com/apps/build-cop-bot/installations/5943459. + MESSAGE=$(cat <