.
core.workflow(
name = "repo1",
origin = git.origin(
url = "https://<repo1-url>",
ref = "master",
submodules = 'RECURSIVE',
),
destination = git.destination(
url = "https://<gerrit-repo-url>",
fetch = "main",
push = "main",
),
destination_files = glob(["repo1/**"]),
authoring = authoring.pass_thru("Copybara <
copy...@example.com>"),
transformations = [
core.move("", "/repo1"),
],
)
java -Djavax.net.ssl.trustStore=<store file> -Djavax.net.ssl.trustStorePassword=<password> -jar ~/bin/copybara_deploy.jar migrate -v copy.bara.sky --force repo1
This copies repo1 under /repo1 directory of gerrit repo.
All files in submodule links are recursively copied.
I copy to /repo1 directory because my gerrit repo is monorepo and I copy many other repos in one gerrit repo.