为构建选择区域时,应主要考虑延迟时间和可用性。通常,您可以选择离您的 Cloud Build 用户最近的区域,但除此之外,您还应该考虑您的 build 可能集成的其他 Google Cloud 产品和服务的位置。跨多个位置使用服务可能会影响应用的延迟时间和价格。
Cloud Build 可在以下区域使用:
asia-east1
asia-east2
asia-northeast1
asia-northeast2
asia-northeast3
asia-south1
asia-south2
asia-southeast1
asia-southeast2
australia-southeast1
australia-southeast2
europe-central2
europe-north1
europe-west1
europe-west2
europe-west3
europe-west4
europe-west6
northamerica-northeast1
northamerica-northeast2
southamerica-east1
southamerica-west1
us-central1
us-east1
us-east4
us-west1
us-west2
us-west3
us-west4
选择区域
如需运行区域级 build,请在通过命令行启动 build 或创建构建触发器时指定相应的区域。
如需为您的专用池选择区域,请在创建专用池时指定区域。在某个区域内创建专用池后,您无法将其移至其他区域。在特定区域中创建专用池时,该池由 Google 管理,以便在该区域内的所有可用区以冗余方式提供。
如果与触发器关联的构建配置文件指定了专用池,则您为触发器选择的区域必须与专用池的区域相匹配。
如果您选择 global
作为构建触发器的区域,Cloud Build 会使用与触发器关联的构建配置文件中指定的区域运行构建。该区域可以是专用池的区域(如果您在构建配置文件中指定专用池);如果您没有指定专用池,则也可指定全局默认池。
某些项目的受限区域
根据项目使用情况,某些项目可能仅限在以下区域使用 Cloud Build:
us-central1
us-west2
europe-west1
asia-east1
australia-southeast1
southamerica-east1