cloudbuild.json
Google Cloud Build configuration file
cloudbuild.jsoncloudbuild.yamlcloudbuild.yml*.cloudbuild.json*.cloudbuild.yaml*.cloudbuild.yml
Validate
Check your file against this schema
Opens the validator with this schema already loaded. Paste your
cloudbuild.json and it validates in your browser — nothing is uploaded.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
stepsrequired | array | Required. The operations to be performed on the workspace. |
logsBucket | string | Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logs_bucket}/log-${build_id}.txt. |
tags | array<string> | Tags for organizing and filtering builds. |
substitutions | object | Substitutions data for Build resource. |
images | array<string> | A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field |
options | object | Optional arguments to enable specific features of builds. |
options.automapSubstitutions | boolean | If set to true, automatically map all subsistutions and make them available as environment variables in a single step. If set to false, ignore substitutions for that step. Can be used for a build step or for an entire build. |
options.machineType | string | Compute Engine machine type on which to run the build. default: "UNSPECIFIED"one of: "E2_HIGHCPU_8", "E2_HIGHCPU_32", "E2_MEDIUM", "N1_HIGHCPU_8", "N1_HIGHCPU_32", "UNSPECIFIED" |
options.volumes | array | Global list of volumes to mount for ALL build steps. Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths |
options.logStreamingOption | string | Option to define build log streaming behavior to Google Cloud Storage. one of: "STREAM_DEFAULT", "STREAM_ON", "STREAM_OFF" |
options.pool | object | Set the value of this field to the resource name of the private pool to run the build. |
options.pool.namerequired | string | Required. The full resource name of the private pool of the form 'projects/$PRIVATEPOOL_PROJECT_ID/locations/$REGION/workerPools/$PRIVATEPOOL_ID'. |
options.env | array<string> | A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined both globally and in a build step, the variable will use the build step value. The elements are of the form |
options.logging | string | Option to specify the logging mode, which determines where the logs are stored. one of: "LOGGING_UNSPECIFI…, "LEGACY", "GCS_ONLY", "CLOUD_LOGGING_ONL…, "NONE" |
options.defaultLogsBucketBehavior | string | Configure Cloud Build to create a default logs bucket within your own project in the same region as your build. one of: "DEFAULT_LOGS_BUCK…, "REGIONAL_USER_OWN… |
options.requestedVerifyOption | string | Requested verifiability options. one of: "NOT_VERIFIED", "VERIFIED" |
options.substitutionOption | string | Option to specify behavior when there is an error in the substitution checks. one of: "MUST_MATCH", "ALLOW_LOOSE" |
options.dynamicSubstitutions | boolean | Use this option to explicitly enable or disable bash parameter expansion in substitutions. If your build is invoked by a trigger, the dynamicSubstitutions field is always set to true and does not need to be specified in your build config |
options.diskSizeGb | oneOf | Requested disk size for the VM that runs the build. Note that this is *NOT* "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for |
options.secretEnv | array<string> | A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build. |
options.sourceProvenanceHash | array<string> | Requested hash for SourceProvenance. |
artifacts | object | Artifacts produced by a build that should be uploaded upon successful completion of all build steps. |
artifacts.objects | object | Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. |
artifacts.objects.location | string | Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix. |
artifacts.objects.paths | array<string> | Path globs used to match files in the build's workspace. |
artifacts.goModules | array | Allows you to upload non-container Go modules to Go repositories in Artifact Registry. |
artifacts.mavenArtifacts | array | Allows you to upload non-container Java artifacts to Maven repositories in Artifact Registry. |
artifacts.pythonPackages | array | Allows you to upload Python packages to Artifact Registry. |
artifacts.npmPackages | array | Uploads your built NPM packages to supported repositories. |
timeout | string | Time limit for executing the build or particular build step. The timeout field of a build step specifies the amount of time the step is allowed to run, and the timeout field of a build specifies the amount of time the build is allowed to |
secrets | array | Secrets to decrypt using Cloud Key Management Service. |
serviceAccount | string | Use this field to specify the IAM service account to use at build time. |
queueTtl | string | Specifies the amount of time a build can be queued. If a build is in the queue for longer than the value set in queueTtl, the build expires and the build status is set to EXPIRED. default: "3600s" |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- Has 2 place(s) where keywords sit beside
$ref. Under draft-07 those keywords are silently ignored by every conforming validator — first at#/definitions/Artifacts/properties/objects. - Uses non-standard keywords that generic validators ignore:
annotations. - 66 properties, 97% carrying a description, max nesting depth 7.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$comment | JSON Schema Core, draft 2020-12 | §8.3 — Comments With "$comment" |
$id | JSON Schema Core, draft 2020-12 | §8.2.1 — The "$id" Keyword |
$ref | JSON Schema Core, draft 2020-12 | §8.2.3.1 — Direct References with "$ref" |
$schema | JSON Schema Core, draft 2020-12 | §8.1.1 — "$schema" |
additionalProperties | JSON Schema Core, draft 2020-12 | §10.3.2.3 — "additionalProperties" |
default | JSON Schema Validation, draft 2020-12 | §9.2 — "default" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
enum | JSON Schema Validation, draft 2020-12 | §6.1.2 — "enum" |
examples | JSON Schema Validation, draft 2020-12 | §9.5 — "examples" |
items | JSON Schema Core, draft 2020-12 | §10.3.1.2 — "items" |
pattern | JSON Schema Validation, draft 2020-12 | §6.3.3 — "pattern" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
required | JSON Schema Validation, draft 2020-12 | §6.5.3 — "required" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
Attribution
This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.