blob: 61cf1281a5cfb6ddfce7e3cd50f90c2f8d9a6011 [file] [log] [blame]
Bu Sun Kim65e33c02019-10-25 10:45:00 -07001import synthtool as s
2from synthtool import gcp
3
4common = gcp.CommonTemplates()
5
6# ----------------------------------------------------------------------------
7# Add templated files
8# ----------------------------------------------------------------------------
9templated_files = common.py_library(unit_cov_level=100, cov_level=100)
Tres Seaverb76f1512021-08-13 18:37:08 -040010
11
Yoshi Automation Bot218a1592020-07-06 13:59:22 -070012s.move(
13 templated_files / ".kokoro",
14 excludes=[
Bu Sun Kim621f54b2021-01-22 13:43:41 -070015 "continuous/common.cfg",
16 "presubmit/common.cfg",
17 "build.sh",
Yoshi Automation Bot218a1592020-07-06 13:59:22 -070018 ],
19) # just move kokoro configs
Tres Seaverb76f1512021-08-13 18:37:08 -040020
21
22assert 1 == s.replace(
23 ".kokoro/docs/docs-presubmit.cfg",
24 'value: "docs docfx"',
25 'value: "docs"',
26)
27
Anthonios Parthenioub86480e2021-08-25 12:41:18 -040028# Remove the replacement below once https://github.com/googleapis/synthtool/pull/1188 is merged
29
30# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files
31assert 1 == s.replace(".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main")
32
Tres Seaverb76f1512021-08-13 18:37:08 -040033s.shell.run(["nox", "-s", "blacken"], hide_output=False)