Customizing your build workers
By default, Cloud Build runs its builds in a Google-managed hosted environment with access to the public internet. The builds are executed as Linux containers on workers that are virtual machines (VMs) allocated for that specific build. At the time of writing, Cloud Build uses an e2-standard-2
machine with 2 vCPUs and 8 GB memory as the default worker.
In the sections that follow, we’ll show you how to choose a custom machine type for your build workers and how to use private worker pools.
Custom machine types
You can customize the machine type using the machineType
option in the build config file. At the time of writing, in addition to the default machine type, you can select one of the additional high-CPU machine types listed on the page available here: https://cloud.google.com/build/docs/api/reference/rest/v1/projects.builds#machinetype.
Custom machine types have more CPU power, but they take longer to provision compared to the default...