From f701bee1e8b5e429611a75782b4ba8b71358ce64 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Tue, 11 Oct 2022 13:28:36 -0700 Subject: [PATCH] chore: added extra variables owlbot kokoro configs (#623) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: added extra variables owlbot kokoro configs * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-monitoring/owlbot.py | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/google-cloud-monitoring/owlbot.py b/packages/google-cloud-monitoring/owlbot.py index 57f66fb1889..dd988993bb6 100644 --- a/packages/google-cloud-monitoring/owlbot.py +++ b/packages/google-cloud-monitoring/owlbot.py @@ -14,6 +14,29 @@ """This script is used to synthesize generated parts of this library.""" +import synthtool as s import synthtool.languages.node as node +import os + node.owlbot_main(staging_excludes=["README.md", "package.json"]) + +# -------------------------------------------------------------------------- +# Modify test configs +# -------------------------------------------------------------------------- + +# add shared environment variables to test configs +s.move( + ".kokoro/common_env_vars.cfg", + ".kokoro/common.cfg", + merge=lambda src, dst, _, : f"{dst}\n{src}", +) +for path, subdirs, files in os.walk(f".kokoro/continuous"): + for name in files: + if name == "common.cfg": + file_path = os.path.join(path, name) + s.move( + ".kokoro/common_env_vars.cfg", + file_path, + merge=lambda src, dst, _, : f"{dst}\n{src}", + )