In what region does cloud build execute its builds in?

Viewed 448

My organisation is based in the EU, and as such we have created all associated gcp-resources within the eu-region.

To speed up our builds, we maintain a dependency cache zip in a storage bucket, which we read from at the start of a build, and write to at the end of a build, depending on whether the dependencies have changed or not.

Now I wonder if we can expect builds to go faster, if we use a storage bucket located within a us-region, which brings me to my question:

In what region are cloud build builds executed in?

1 Answers

To check this, you can run this step:

  - name: 'gcr.io/cloud-builders/gcloud'
    entrypoint: 'bash'
    args:
      - -c
      - |
        curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/zone

For my project it's projects/751286965207/zones/us-central1-f

Not that is the same thing for all projects. In any case, a new feature is coming: worker-pool

The API is public but the project is in private preview. The principle is to have a pool of VM on which you can trigger Cloud Build jobs. Thanks to that, you will be able to define the region, but also, the connectivity to a private network (useful to deploy to a private GKE cluster for example) and to size your VM as you need. The counterpart, it should be more expensive.

Related