Skip to content

Commit 64f6245

Browse files
author
Takashi Matsuo
authored
testing: set and use REPORT_TO_BUILD_COP_BOT (#3822)
fixes #3821 This PR needs an internal Kokoro config change.
1 parent d7a5e61 commit 64f6245

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

.kokoro/python2.7/periodic.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
2020
value: "github/python-docs-samples/.kokoro/tests/run_tests.sh"
2121
}
22+
23+
env_vars: {
24+
key: "REPORT_TO_BUILD_COP_BOT"
25+
value: "True"
26+
}

.kokoro/python3.6/periodic.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
2020
value: "github/python-docs-samples/.kokoro/tests/run_tests.sh"
2121
}
22+
23+
env_vars: {
24+
key: "REPORT_TO_BUILD_COP_BOT"
25+
value: "True"
26+
}

.kokoro/python3.7/periodic.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
2020
value: "github/python-docs-samples/.kokoro/tests/run_tests.sh"
2121
}
22+
23+
env_vars: {
24+
key: "REPORT_TO_BUILD_COP_BOT"
25+
value: "True"
26+
}

.kokoro/python3.8/periodic.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
2020
value: "github/python-docs-samples/.kokoro/tests/run_tests.sh"
2121
}
22+
23+
env_vars: {
24+
key: "REPORT_TO_BUILD_COP_BOT"
25+
value: "True"
26+
}

.kokoro/tests/run_tests.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ for file in **/requirements.txt; do
104104
nox -s "$RUN_TESTS_SESSION"
105105
EXIT=$?
106106

107-
# If this is a periodic build, send the test log to the Build Cop Bot.
108-
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop.
109-
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
107+
# If REPORT_TO_BUILD_COP_BOT is set to "True", send the test log
108+
# to the Build Cop Bot.
109+
# See:
110+
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop.
111+
if [[ "${REPORT_TO_BUILD_COP_BOT:-}" == "True" ]]; then
110112
chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop
111113
$KOKORO_GFILE_DIR/linux_amd64/buildcop
112114
fi

0 commit comments

Comments
 (0)