| """Copybara config to auto import build_config protos to continuous-tests. |
| |
| Usage: |
| alias copybara='/google/data/ro/teams/copybara/copybara' |
| copybara catatester/proto/copy.bara.sky build_configs_import |
| """ |
| |
| git_origin = git.origin( |
| url = "https://eureka-internal.googlesource.com/builder/masters", |
| ref = "master", |
| ) |
| |
| origin_files = glob( |
| include = [ |
| "src/proto/build_config.proto", |
| "src/genfiles/build_config_pb2.py", |
| "configs/eureka/build_config.protoascii" |
| ], |
| exclude = [], |
| ) |
| |
| destination_files = glob( |
| include = [ |
| "catatester/proto/imported/build_config.proto", |
| "catatester/genfiles/build_config_pb2.py", |
| "catatester/configs/imported/build_config.protoascii"], |
| exclude = [], |
| ) |
| |
| core.workflow( |
| name = "build_configs_import", |
| origin = git_origin, |
| origin_files = origin_files, |
| destination = git.gerrit_destination( |
| url = "https://eureka-internal.googlesource.com/continuous-tests", |
| fetch = "master", |
| push_to_refs_for = "master", |
| ), |
| destination_files = destination_files, |
| authoring = authoring.pass_thru("Home EngProd <no-reply@google.com>"), |
| transformations = [ |
| core.move("src/proto/build_config.proto", "catatester/proto/imported/build_config.proto"), |
| core.move("src/genfiles/build_config_pb2.py", "catatester/genfiles/build_config_pb2.py"), |
| core.move( |
| "configs/eureka/build_config.protoascii", |
| "catatester/configs/imported/build_config.protoascii"), |
| metadata.squash_notes( |
| prefix = "Imports from eureka_internal:builder/masters.\n\n", |
| ), |
| ], |
| ) |