Skip to content

Commit f1dcc2b

Browse files
chore: add OwlBot as a required check (#891)
* chore: add OwlBot as a required check * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add replacement in owlbot.py to customize .kokoro/build.sh Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 7dfeb62 commit f1dcc2b

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

.github/sync-repo-settings.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ branchProtectionRules:
1010
- 'Kokoro'
1111
- 'cla/google'
1212
- 'Kokoro system-3.8'
13+
- 'OwlBot Post Processor'
1314
- pattern: python2
1415
requiresCodeOwnerReviews: true
1516
requiresStrictStatusChecks: true

.kokoro/build.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@ cd "${PROJECT_ROOT}"
2424
# Disable buffering, so that the logs stream through.
2525
export PYTHONUNBUFFERED=1
2626

27-
# Debug: show build environment
28-
env | grep KOKORO
29-
30-
# Setup service account credentials.
31-
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
32-
33-
# Setup project id.
34-
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
35-
3627
# Export variable to override api endpoint
3728
export API_ENDPOINT_OVERRIDE
3829

@@ -43,6 +34,15 @@ export API_VERSION_OVERRIDE
4334
export DUAL_REGION_LOC_1
4435
export DUAL_REGION_LOC_2
4536

37+
# Debug: show build environment
38+
env | grep KOKORO
39+
40+
# Setup service account credentials.
41+
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
42+
43+
# Setup project id.
44+
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
45+
4646
# Remove old nox
4747
python3 -m pip uninstall --yes --quiet nox-automation
4848

owlbot.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@
5252
],
5353
)
5454

55+
s.replace(
56+
".kokoro/build.sh",
57+
"export PYTHONUNBUFFERED=1",
58+
"""export PYTHONUNBUFFERED=1
59+
60+
# Export variable to override api endpoint
61+
export API_ENDPOINT_OVERRIDE
62+
63+
# Export variable to override api endpoint version
64+
export API_VERSION_OVERRIDE
65+
66+
# Export dual region locations
67+
export DUAL_REGION_LOC_1
68+
export DUAL_REGION_LOC_2""")
69+
5570
python.py_samples(skip_readmes=True)
5671

5772
s.shell.run(["nox", "-s", "blacken"], hide_output=False)

0 commit comments

Comments
 (0)