Lines Matching +full:owlbot +full:- +full:py
7 # https://www.apache.org/licenses/LICENSE-2.0
34 "--api_shortname",
41 "--name-pretty",
45 help="The human-friendly name that appears in README.md"
48 "--product-docs",
55 "--api-description",
63 "--release-level",
67 help="A label that appears in repo-metadata.json. The first library "
71 "--transport",
75 help="A label that appears in repo-metadata.json"
77 @click.option("--language", type=str, default="java", show_default=True)
79 "--distribution-name",
82 "com.google.cloud:google-cloud-<api_shortname>"
85 "--api-id",
91 "--requires-billing",
99 "--destination-name",
103 "java-<api_shortname>"
106 "--proto-path",
116 "--cloud-api",
120 help="If true, the artifact ID of the library is 'google-cloud-'; "
121 "otherwise 'google-'"
124 "--group-id",
131 "--owlbot-image",
133 default="gcr.io/cloud-devrel-public-resources/owlbot-java",
135 help="The owlbot container image used in OwlBot.yaml"
138 "--library-type",
142 help="A label that appear in repo-metadata.json to tell how the library is "
146 "--googleapis-gen-url",
148 default="https://github.com/googleapis/googleapis-gen.git",
172 cloud_prefix = "cloud-" if cloud_api else ""
176 distribution_name = f"{group_id}:google-{cloud_prefix}{output_name}"
178 distribution_name_short = re.split(r"[:\/]", distribution_name)[-1]
205 "repo": f"googleapis/{language}-{output_name}",
206 "repo_short": f"{language}-{output_name}",
215 workdir = Path(f"{sys.path[0]}/../../java-{output_name}").resolve()
221 "require new-client.py invocation. "
222 "See go/yoshi-java-new-client#adding-a-new-service-version-by-owlbot."
226 # write .repo-metadata.json file
227 with open(workdir / ".repo-metadata.json", "w") as fp:
230 # create owlbot.py
232 template_name="owlbot.py.j2",
233 output_name=str(workdir / "owlbot.py"),
238 # In monorepo, .OwlBot.yaml needs to be in the directory of the module.
239 owlbot_yaml_location_from_module = ".OwlBot.yaml"
240 # create owlbot config
242 template_name="owlbot.yaml.monorepo.j2",
246 module_name=f"java-{output_name}",
250 # get the sha256 digets for the owlbot image
251 subprocess.check_call(["docker", "pull", "-q", owlbot_image])
254 ["docker", "inspect", "--format='{{index .RepoDigests 0}}", owlbot_image,],
255 encoding="utf-8",
258 .split("@")[-1]
261 user = subprocess.check_output(["id", "-u"], encoding="utf8").strip()
262 group = subprocess.check_output(["id", "-g"], encoding="utf8").strip()
264 # run owlbot copy
265 print("Cloning googleapis-gen...")
266 …subprocess.check_call(["git", "clone", "-q", googleapis_gen_url, "./gen/googleapis-gen"], cwd=work…
267 …subprocess.check_call(["docker", "pull", "gcr.io/cloud-devrel-public-resources/owlbot-cli:latest"])
271 "--rm",
272 "--user",
274 "-v",
276 "-v",
277 ""f"{workdir}""/gen/googleapis-gen:/googleapis-gen",
278 "-w",
280 "--env", "HOME=/tmp",
281 "gcr.io/cloud-devrel-public-resources/owlbot-cli:latest",
282 "copy-code",
283 "--source-repo=/googleapis-gen",
284 f"--config-file={owlbot_yaml_location_from_module}"
286 print("Running copy-code: " + str(copy_code_parameters))
293 print("Removing googleapis-gen...")
294 subprocess.check_call(["rm", "-fr", "gen"], cwd=workdir)
296 # Bringing owl-bot-staging from the new module's directory to the root
297 # directory so that owlbot-java can process them.
301 "owl-bot-staging",
308 print("Running the post-processor...")
313 "--rm",
314 "-v",
316 "--user",
379 f" $ git checkout -b new_module_java-{output_name}\n"
381 f" $ git commit -m 'feat: [{api_shortname}] new module for {api_shortname}'\n"
382 f" $ gh pr create --title 'feat: [{api_shortname}] new module for {api_shortname}'")