Bu Sun Kim | 65e33c0 | 2019-10-25 10:45:00 -0700 | [diff] [blame] | 1 | import synthtool as s |
| 2 | from synthtool import gcp |
| 3 | |
| 4 | common = gcp.CommonTemplates() |
| 5 | |
| 6 | # ---------------------------------------------------------------------------- |
| 7 | # Add templated files |
| 8 | # ---------------------------------------------------------------------------- |
| 9 | templated_files = common.py_library(unit_cov_level=100, cov_level=100) |
Tres Seaver | b76f151 | 2021-08-13 18:37:08 -0400 | [diff] [blame] | 10 | |
| 11 | |
Yoshi Automation Bot | 218a159 | 2020-07-06 13:59:22 -0700 | [diff] [blame] | 12 | s.move( |
| 13 | templated_files / ".kokoro", |
| 14 | excludes=[ |
Bu Sun Kim | 621f54b | 2021-01-22 13:43:41 -0700 | [diff] [blame] | 15 | "continuous/common.cfg", |
| 16 | "presubmit/common.cfg", |
| 17 | "build.sh", |
Yoshi Automation Bot | 218a159 | 2020-07-06 13:59:22 -0700 | [diff] [blame] | 18 | ], |
| 19 | ) # just move kokoro configs |
Tres Seaver | b76f151 | 2021-08-13 18:37:08 -0400 | [diff] [blame] | 20 | |
| 21 | |
| 22 | assert 1 == s.replace( |
| 23 | ".kokoro/docs/docs-presubmit.cfg", |
| 24 | 'value: "docs docfx"', |
| 25 | 'value: "docs"', |
| 26 | ) |
| 27 | |
Anthonios Partheniou | b86480e | 2021-08-25 12:41:18 -0400 | [diff] [blame^] | 28 | # 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 |
| 31 | assert 1 == s.replace(".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main") |
| 32 | |
Tres Seaver | b76f151 | 2021-08-13 18:37:08 -0400 | [diff] [blame] | 33 | s.shell.run(["nox", "-s", "blacken"], hide_output=False) |