Skip to content

Commit

Permalink
chore: added extra variables owlbot kokoro configs (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche authored Aug 23, 2022
1 parent 80a21f5 commit d167eda
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .kokoro/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .kokoro/common_env_vars.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .kokoro/continuous/node12/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .kokoro/release/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import synthtool as s
import synthtool.gcp as gcp
import synthtool.languages.node as node
Expand All @@ -24,3 +25,23 @@
templates = common_templates.node_library(source_location='build/src')
s.move(templates, excludes=[".github/auto-label.yaml"])
node.fix_hermetic()

# --------------------------------------------------------------------------
# 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}",
)

0 comments on commit d167eda

Please sign in to comment.