github.com/GoogleContainerTools/skaffold/v2@v2.13.2/docs-v2/content/en/docs/builders/build-environments/cloud-build.md (about) 1 --- 2 title: "Google Cloud Build" 3 linkTitle: "Google Cloud Build" 4 weight: 30 5 --- 6 7 Skaffold supports building remotely with Google Cloud Build. 8 9 [Cloud Build](https://cloud.google.com/cloud-build/) is a 10 [Google Cloud Platform](https://cloud.google.com) service that executes 11 your builds using Google infrastructure. To get started with Cloud 12 Build, see [Cloud Build Quickstart](https://cloud.google.com/cloud-build/docs/quickstart-docker). 13 14 Skaffold automatically connects to Cloud Build and runs your builds 15 with it. After Cloud Build finishes building your artifacts, they are 16 saved to the specified remote registry, such as 17 [Google Container Registry](https://cloud.google.com/container-registry/). 18 19 Skaffold's Cloud Build process differs from the gcloud command 20 [`gcloud builds submit`](https://cloud.google.com/sdk/gcloud/reference/builds/submit). 21 Skaffold does the following: 22 * Creates a list of dependent files 23 * Uploads a tar file of the dependent files to Google Cloud Storage 24 * Submits the tar file to Cloud Build 25 * Generates a single-step `cloudbuild.yaml` 26 * Starts the build 27 28 Skaffold does not honor `.gitignore` or `.gcloudignore` exclusions. If you need to ignore files, use `.dockerignore`. 29 Any `cloudbuild.yaml` found will not be used in the build process. 30 31 ## Configuration 32 33 To use Cloud Build, add build type `googleCloudBuild` to the `build` 34 section of `skaffold.yaml`. 35 36 ```yaml 37 build: 38 googleCloudBuild: {} 39 ``` 40 41 The following options can optionally be configured: 42 43 {{< schema root="GoogleCloudBuild" >}} 44 45 ## Faster builds 46 47 By default, Cloud Build (invoked by Skaffold) builds all artifacts in parallel. Set `concurrency` to a non-zero 48 value to specify the maximum number of artifacts to build concurrently. Consider reducing `concurrency` if you 49 hit a quota restriction. 50 51 {{<alert title="Note">}} 52 When Skaffold builds artifacts in parallel, it still prints the build logs in sequence to make them easier to read. 53 {{</alert>}} 54 55 ## Restrictions 56 57 Skaffold currently supports the following [builder types]({{<relref "/docs/builders/builder-types">}}) 58 when building remotely with Cloud Build: 59 * [Docker]({{<relref "/docs/builders/builder-types/docker#dockerfile-remotely-with-google-cloud-build">}}) 60 * [Jib]({{<relref "/docs/builders/builder-types/jib#remotely-with-google-cloud-build">}})