From f1dcc2bc0b49928cff2cf8056d1c08febbefdd00 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Mon, 24 Oct 2022 12:58:33 -0400 Subject: [PATCH] chore: add OwlBot as a required check (#891) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- .github/sync-repo-settings.yaml | 1 + .kokoro/build.sh | 18 +++++++++--------- owlbot.py | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index d95c4ac9b..cc1eb10e1 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -10,6 +10,7 @@ branchProtectionRules: - 'Kokoro' - 'cla/google' - 'Kokoro system-3.8' + - 'OwlBot Post Processor' - pattern: python2 requiresCodeOwnerReviews: true requiresStrictStatusChecks: true diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 8e9f1042c..ec58d54c1 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -24,15 +24,6 @@ cd "${PROJECT_ROOT}" # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 -# Debug: show build environment -env | grep KOKORO - -# Setup service account credentials. -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json - -# Setup project id. -export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json") - # Export variable to override api endpoint export API_ENDPOINT_OVERRIDE @@ -43,6 +34,15 @@ export API_VERSION_OVERRIDE export DUAL_REGION_LOC_1 export DUAL_REGION_LOC_2 +# Debug: show build environment +env | grep KOKORO + +# Setup service account credentials. +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json + +# Setup project id. +export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json") + # Remove old nox python3 -m pip uninstall --yes --quiet nox-automation diff --git a/owlbot.py b/owlbot.py index 6ad5e88ba..8d0b89d14 100644 --- a/owlbot.py +++ b/owlbot.py @@ -52,6 +52,21 @@ ], ) +s.replace( + ".kokoro/build.sh", + "export PYTHONUNBUFFERED=1", + """export PYTHONUNBUFFERED=1 + +# Export variable to override api endpoint +export API_ENDPOINT_OVERRIDE + +# Export variable to override api endpoint version +export API_VERSION_OVERRIDE + +# Export dual region locations +export DUAL_REGION_LOC_1 +export DUAL_REGION_LOC_2""") + python.py_samples(skip_readmes=True) s.shell.run(["nox", "-s", "blacken"], hide_output=False)