diff --git a/synthtool/gcp/common.py b/synthtool/gcp/common.py index 042a45538..322d8c552 100644 --- a/synthtool/gcp/common.py +++ b/synthtool/gcp/common.py @@ -262,6 +262,10 @@ def py_library(self, **kwargs) -> Path: if Path("docs/UPGRADING.md").exists(): kwargs["include_uprading_doc"] = True + # If the directory `google/cloud` exists, add kwargs to signal that the client library is for a Cloud API + if Path("google/cloud").exists(): + kwargs["is_google_cloud_api"] = True + # Assume the python-docs-samples Dockerfile is used for samples by default if "custom_samples_dockerfile" not in kwargs: kwargs["custom_samples_dockerfile"] = False diff --git a/synthtool/gcp/templates/python_library/.kokoro/docs/common.cfg b/synthtool/gcp/templates/python_library/.kokoro/docs/common.cfg index 0fa201bdf..c56387495 100644 --- a/synthtool/gcp/templates/python_library/.kokoro/docs/common.cfg +++ b/synthtool/gcp/templates/python_library/.kokoro/docs/common.cfg @@ -30,7 +30,14 @@ env_vars: { env_vars: { key: "V2_STAGING_BUCKET" +{%- if is_google_cloud_api %} + # Push google cloud library docs to the Cloud RAD bucket `docs-staging-v2` value: "docs-staging-v2" +{% else %} + # Push non-cloud library docs to `docs-staging-v2-staging` instead of the + # Cloud RAD bucket `docs-staging-v2` + value: "docs-staging-v2-staging" +{% endif -%} } # It will upload the docker image after successful builds.