blob: 5d7f24737bb302481d2d18b5d685e07240e5d27e [file] [log] [blame]
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="cloudbuild_v1.html">Cloud Build API</a> . <a href="cloudbuild_v1.projects.html">projects</a> . <a href="cloudbuild_v1.projects.triggers.html">triggers</a></h1>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#create">create(projectId, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Creates a new `BuildTrigger`. This API is experimental.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070083<p class="toc_element">
84 <code><a href="#delete">delete(projectId, triggerId, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070086<p class="toc_element">
87 <code><a href="#get">get(projectId, triggerId, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Returns information about a `BuildTrigger`. This API is experimental.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070089<p class="toc_element">
Yoshi Automation Botb6971b02020-11-26 17:16:03 -080090 <code><a href="#list">list(projectId, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Lists existing `BuildTrigger`s. This API is experimental.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(projectId, triggerId, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#run">run(projectId, triggerId, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Runs a `BuildTrigger` at a particular source revision.</p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800101<p class="toc_element">
102 <code><a href="#webhook">webhook(projectId, trigger, body=None, secret=None, x__xgafv=None)</a></code></p>
103<p class="firstline">ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700104<h3>Method Details</h3>
105<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108</div>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700109
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700110<div class="method">
111 <code class="details" id="create">create(projectId, body=None, x__xgafv=None)</code>
112 <pre>Creates a new `BuildTrigger`. This API is experimental.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700113
114Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 projectId: string, Required. ID of the project for which to configure automatic builds. (required)
116 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700117 The object takes the form of:
118
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700119{ # Configuration for an automated build in response to source repository changes.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800120 &quot;build&quot;: { # A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. # Contents of the build template.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800121 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon successful completion of all build steps. # Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
122 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the Build resource&#x27;s results field. If any of the images fail to be pushed, the build is marked FAILURE.
123 &quot;A String&quot;,
124 ],
125 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. # A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account&#x27;s credentials. The location and generation of the uploaded objects will be stored in the Build resource&#x27;s results field. If any objects fail to be pushed, the build is marked FAILURE.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800126 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800127 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
128 &quot;A String&quot;,
129 ],
130 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
131 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
132 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800133 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800134 },
135 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800136 &quot;availableSecrets&quot;: { # Secrets and secret environment variables. # Secrets and secret environment variables.
137 &quot;inline&quot;: [ # Secrets encrypted with KMS key and the associated secret environment variable.
138 { # Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.
139 &quot;envMap&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
140 &quot;a_key&quot;: &quot;A String&quot;,
141 },
142 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*
143 },
144 ],
145 &quot;secretManager&quot;: [ # Secrets in Secret Manager and associated secret environment variable.
146 { # Pairs a secret environment variable with a SecretVersion in Secret Manager.
147 &quot;env&quot;: &quot;A String&quot;, # Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step.
148 &quot;versionName&quot;: &quot;A String&quot;, # Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*
149 },
150 ],
151 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800152 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800153 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800154 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build&#x27;s execution.
155 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
156 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the `Build` resource&#x27;s results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.
157 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800158 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800159 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
160 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
161 &quot;name&quot;: &quot;A String&quot;, # Output only. The &#x27;Build&#x27; name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800162 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800163 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT* &quot;disk free&quot;; 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 the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800164 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800165 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
166 &quot;A String&quot;,
167 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800168 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
169 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
170 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
171 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
172 &quot;secretEnv&quot;: [ # 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&#x27;s `Secret`. These variables will be available to all build steps in this build.
173 &quot;A String&quot;,
174 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800175 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
176 &quot;A String&quot;,
177 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800178 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800179 &quot;volumes&quot;: [ # 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 cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
180 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800181 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800182 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800183 },
184 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800185 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is in beta and is available only to restricted users.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800186 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800187 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
188 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.
189 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
190 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
191 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
192 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
193 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
194 },
195 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
196 &quot;A String&quot;,
197 ],
198 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
199 &quot;A String&quot;,
200 ],
201 &quot;images&quot;: [ # Container images that were built as a part of the build.
202 { # An image built by the pipeline.
203 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
204 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
205 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
206 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
207 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
208 },
209 },
210 ],
211 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
212 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800213 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
214 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` instead of using `kmsKeyName` with `secret`. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800215 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
216 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
217 &quot;a_key&quot;: &quot;A String&quot;,
218 },
219 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800220 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800221 &quot;serviceAccount&quot;: &quot;A String&quot;, # IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in beta.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800222 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
223 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source Repository.
224 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
225 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
226 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
227 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
228 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800229 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800230 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
231 &quot;a_key&quot;: &quot;A String&quot;,
232 },
233 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
234 },
235 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
236 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800237 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
238 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800239 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800240 },
241 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that some source was used for this build. # Output only. A permanent fixed identifier for source.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800242 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.
243 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
244 &quot;fileHash&quot;: [ # Collection of file hashes.
245 { # Container message for hash values.
246 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
247 &quot;value&quot;: &quot;A String&quot;, # The hash value.
248 },
249 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800250 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800251 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800252 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any revisions resolved.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800253 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800254 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
255 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
256 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800257 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800258 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800259 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
260 &quot;a_key&quot;: &quot;A String&quot;,
261 },
262 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
263 },
264 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any generations resolved.
265 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
266 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
267 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800268 },
269 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800270 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
271 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
272 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
273 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
274 { # A step in the build pipeline.
275 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started. If the image used to run the step&#x27;s container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
276 &quot;A String&quot;,
277 ],
278 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container. If this value is a relative path, it is relative to the build&#x27;s working directory. If this value is absolute, it may be outside the build&#x27;s working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step&#x27;s execution.
279 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint. If unset, the image&#x27;s default entrypoint is used.
280 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
281 &quot;A String&quot;,
282 ],
283 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.
284 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular build step. If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account&#x27;s credentials if necessary. The Docker daemon&#x27;s cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a later build step.
285 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s builder image only.
286 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
287 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800288 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800289 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`.
290 &quot;A String&quot;,
291 ],
292 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
293 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
294 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
295 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
296 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
297 },
298 &quot;volumes&quot;: [ # List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
299 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
300 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
301 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
302 },
303 ],
304 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.
305 &quot;A String&quot;,
306 ],
307 },
308 ],
309 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
310 &quot;a_key&quot;: &quot;A String&quot;,
311 },
312 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
313 &quot;A String&quot;,
314 ],
315 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.
316 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.
317 &quot;a_key&quot;: { # Start and end times for a build execution phase.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800318 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
319 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
320 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800321 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800322 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800323 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
324 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
325 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800326 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800327 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. This message is experimental. # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with `trigger_template`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800328 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800329 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800330 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is &quot;googlecloudplatform&quot;.
331 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull Requests. # filter to match changes in pull requests.
332 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
333 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to comment `/gcbrun`.
334 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
335 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800336 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
337 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
338 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the git_ref regex.
339 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
340 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800341 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800342 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
343 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;. If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.
344 &quot;A String&quot;,
345 ],
346 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.
347 &quot;A String&quot;,
348 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800349 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800350 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`.
351 &quot;a_key&quot;: &quot;A String&quot;,
352 },
353 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
354 &quot;A String&quot;,
355 ],
356 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. Mutually exclusive with `github`.
357 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
358 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
359 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
360 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
361 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800362 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800363 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
364 &quot;a_key&quot;: &quot;A String&quot;,
365 },
366 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
367 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800368}
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700369
370 x__xgafv: string, V1 error format.
371 Allowed values
372 1 - v1 error format
373 2 - v2 error format
374
375Returns:
376 An object of the form:
377
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700378 { # Configuration for an automated build in response to source repository changes.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800379 &quot;build&quot;: { # A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. # Contents of the build template.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800380 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon successful completion of all build steps. # Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
381 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the Build resource&#x27;s results field. If any of the images fail to be pushed, the build is marked FAILURE.
382 &quot;A String&quot;,
383 ],
384 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. # A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account&#x27;s credentials. The location and generation of the uploaded objects will be stored in the Build resource&#x27;s results field. If any objects fail to be pushed, the build is marked FAILURE.
385 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
386 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
387 &quot;A String&quot;,
388 ],
389 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
390 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
391 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
392 },
393 },
394 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800395 &quot;availableSecrets&quot;: { # Secrets and secret environment variables. # Secrets and secret environment variables.
396 &quot;inline&quot;: [ # Secrets encrypted with KMS key and the associated secret environment variable.
397 { # Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.
398 &quot;envMap&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
399 &quot;a_key&quot;: &quot;A String&quot;,
400 },
401 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*
402 },
403 ],
404 &quot;secretManager&quot;: [ # Secrets in Secret Manager and associated secret environment variable.
405 { # Pairs a secret environment variable with a SecretVersion in Secret Manager.
406 &quot;env&quot;: &quot;A String&quot;, # Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step.
407 &quot;versionName&quot;: &quot;A String&quot;, # Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*
408 },
409 ],
410 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800411 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
412 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
413 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build&#x27;s execution.
414 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
415 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the `Build` resource&#x27;s results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800416 &quot;A String&quot;,
417 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800418 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
419 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
420 &quot;name&quot;: &quot;A String&quot;, # Output only. The &#x27;Build&#x27; name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.
421 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
422 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT* &quot;disk free&quot;; 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 the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
423 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
424 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
425 &quot;A String&quot;,
426 ],
427 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
428 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
429 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
430 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
431 &quot;secretEnv&quot;: [ # 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&#x27;s `Secret`. These variables will be available to all build steps in this build.
432 &quot;A String&quot;,
433 ],
434 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
435 &quot;A String&quot;,
436 ],
437 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
438 &quot;volumes&quot;: [ # 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 cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
439 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
440 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
441 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
442 },
443 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800444 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is in beta and is available only to restricted users.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800445 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800446 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
447 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.
448 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
449 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
450 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
451 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
452 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
453 },
454 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
455 &quot;A String&quot;,
456 ],
457 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
458 &quot;A String&quot;,
459 ],
460 &quot;images&quot;: [ # Container images that were built as a part of the build.
461 { # An image built by the pipeline.
462 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
463 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
464 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
465 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
466 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
467 },
468 },
469 ],
470 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
471 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800472 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
473 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` instead of using `kmsKeyName` with `secret`. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800474 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
475 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
476 &quot;a_key&quot;: &quot;A String&quot;,
477 },
478 },
479 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800480 &quot;serviceAccount&quot;: &quot;A String&quot;, # IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in beta.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800481 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
482 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source Repository.
483 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
484 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
485 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
486 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
487 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800488 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800489 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
490 &quot;a_key&quot;: &quot;A String&quot;,
491 },
492 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
493 },
494 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
495 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
496 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
497 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
498 },
499 },
500 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that some source was used for this build. # Output only. A permanent fixed identifier for source.
501 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.
502 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
503 &quot;fileHash&quot;: [ # Collection of file hashes.
504 { # Container message for hash values.
505 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
506 &quot;value&quot;: &quot;A String&quot;, # The hash value.
507 },
508 ],
509 },
510 },
511 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any revisions resolved.
512 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
513 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
514 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
515 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
516 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800517 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800518 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
519 &quot;a_key&quot;: &quot;A String&quot;,
520 },
521 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
522 },
523 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any generations resolved.
524 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
525 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
526 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
527 },
528 },
529 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
530 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
531 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
532 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
533 { # A step in the build pipeline.
534 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started. If the image used to run the step&#x27;s container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
535 &quot;A String&quot;,
536 ],
537 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container. If this value is a relative path, it is relative to the build&#x27;s working directory. If this value is absolute, it may be outside the build&#x27;s working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step&#x27;s execution.
538 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint. If unset, the image&#x27;s default entrypoint is used.
539 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
540 &quot;A String&quot;,
541 ],
542 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.
543 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular build step. If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account&#x27;s credentials if necessary. The Docker daemon&#x27;s cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a later build step.
544 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s builder image only.
545 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
546 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
547 },
548 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`.
549 &quot;A String&quot;,
550 ],
551 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
552 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
553 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
554 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
555 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
556 },
557 &quot;volumes&quot;: [ # List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
558 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
559 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
560 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
561 },
562 ],
563 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.
564 &quot;A String&quot;,
565 ],
566 },
567 ],
568 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800569 &quot;a_key&quot;: &quot;A String&quot;,
570 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800571 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800572 &quot;A String&quot;,
573 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800574 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.
575 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.
576 &quot;a_key&quot;: { # Start and end times for a build execution phase.
577 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
578 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800579 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800580 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800581 },
582 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
583 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
584 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800585 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800586 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. This message is experimental. # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with `trigger_template`.
587 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
588 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
589 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is &quot;googlecloudplatform&quot;.
590 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull Requests. # filter to match changes in pull requests.
591 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
592 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to comment `/gcbrun`.
593 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800594 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800595 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
596 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
597 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the git_ref regex.
598 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
599 },
600 },
601 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
602 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;. If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.
603 &quot;A String&quot;,
604 ],
605 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.
606 &quot;A String&quot;,
607 ],
608 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character.
609 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`.
610 &quot;a_key&quot;: &quot;A String&quot;,
611 },
612 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
613 &quot;A String&quot;,
614 ],
615 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. Mutually exclusive with `github`.
616 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
617 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
618 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
619 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
620 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800621 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800622 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
623 &quot;a_key&quot;: &quot;A String&quot;,
624 },
625 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
626 },
627}</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700628</div>
629
630<div class="method">
631 <code class="details" id="delete">delete(projectId, triggerId, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700632 <pre>Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700633
634Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700635 projectId: string, Required. ID of the project that owns the trigger. (required)
636 triggerId: string, Required. ID of the `BuildTrigger` to delete. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700637 x__xgafv: string, V1 error format.
638 Allowed values
639 1 - v1 error format
640 2 - v2 error format
641
642Returns:
643 An object of the form:
644
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700645 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800646}</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700647</div>
648
649<div class="method">
650 <code class="details" id="get">get(projectId, triggerId, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700651 <pre>Returns information about a `BuildTrigger`. This API is experimental.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700652
653Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700654 projectId: string, Required. ID of the project that owns the trigger. (required)
655 triggerId: string, Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700656 x__xgafv: string, V1 error format.
657 Allowed values
658 1 - v1 error format
659 2 - v2 error format
660
661Returns:
662 An object of the form:
663
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700664 { # Configuration for an automated build in response to source repository changes.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800665 &quot;build&quot;: { # A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. # Contents of the build template.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800666 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon successful completion of all build steps. # Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
667 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the Build resource&#x27;s results field. If any of the images fail to be pushed, the build is marked FAILURE.
668 &quot;A String&quot;,
669 ],
670 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. # A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account&#x27;s credentials. The location and generation of the uploaded objects will be stored in the Build resource&#x27;s results field. If any objects fail to be pushed, the build is marked FAILURE.
671 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
672 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
673 &quot;A String&quot;,
674 ],
675 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
676 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
677 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
678 },
679 },
680 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800681 &quot;availableSecrets&quot;: { # Secrets and secret environment variables. # Secrets and secret environment variables.
682 &quot;inline&quot;: [ # Secrets encrypted with KMS key and the associated secret environment variable.
683 { # Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.
684 &quot;envMap&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
685 &quot;a_key&quot;: &quot;A String&quot;,
686 },
687 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*
688 },
689 ],
690 &quot;secretManager&quot;: [ # Secrets in Secret Manager and associated secret environment variable.
691 { # Pairs a secret environment variable with a SecretVersion in Secret Manager.
692 &quot;env&quot;: &quot;A String&quot;, # Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step.
693 &quot;versionName&quot;: &quot;A String&quot;, # Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*
694 },
695 ],
696 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800697 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
698 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
699 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build&#x27;s execution.
700 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
701 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the `Build` resource&#x27;s results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800702 &quot;A String&quot;,
703 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800704 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
705 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
706 &quot;name&quot;: &quot;A String&quot;, # Output only. The &#x27;Build&#x27; name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.
707 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
708 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT* &quot;disk free&quot;; 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 the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
709 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
710 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
711 &quot;A String&quot;,
712 ],
713 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
714 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
715 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
716 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
717 &quot;secretEnv&quot;: [ # 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&#x27;s `Secret`. These variables will be available to all build steps in this build.
718 &quot;A String&quot;,
719 ],
720 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
721 &quot;A String&quot;,
722 ],
723 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
724 &quot;volumes&quot;: [ # 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 cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
725 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
726 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
727 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
728 },
729 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800730 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is in beta and is available only to restricted users.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800731 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800732 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
733 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.
734 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
735 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
736 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
737 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
738 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
739 },
740 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
741 &quot;A String&quot;,
742 ],
743 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
744 &quot;A String&quot;,
745 ],
746 &quot;images&quot;: [ # Container images that were built as a part of the build.
747 { # An image built by the pipeline.
748 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
749 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
750 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
751 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
752 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
753 },
754 },
755 ],
756 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
757 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800758 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
759 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` instead of using `kmsKeyName` with `secret`. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800760 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
761 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
762 &quot;a_key&quot;: &quot;A String&quot;,
763 },
764 },
765 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800766 &quot;serviceAccount&quot;: &quot;A String&quot;, # IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in beta.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800767 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
768 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source Repository.
769 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
770 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
771 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
772 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
773 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800774 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800775 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
776 &quot;a_key&quot;: &quot;A String&quot;,
777 },
778 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
779 },
780 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
781 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
782 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
783 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
784 },
785 },
786 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that some source was used for this build. # Output only. A permanent fixed identifier for source.
787 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.
788 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
789 &quot;fileHash&quot;: [ # Collection of file hashes.
790 { # Container message for hash values.
791 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
792 &quot;value&quot;: &quot;A String&quot;, # The hash value.
793 },
794 ],
795 },
796 },
797 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any revisions resolved.
798 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
799 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
800 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
801 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
802 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800803 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800804 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
805 &quot;a_key&quot;: &quot;A String&quot;,
806 },
807 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
808 },
809 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any generations resolved.
810 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
811 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
812 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
813 },
814 },
815 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
816 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
817 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
818 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
819 { # A step in the build pipeline.
820 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started. If the image used to run the step&#x27;s container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
821 &quot;A String&quot;,
822 ],
823 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container. If this value is a relative path, it is relative to the build&#x27;s working directory. If this value is absolute, it may be outside the build&#x27;s working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step&#x27;s execution.
824 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint. If unset, the image&#x27;s default entrypoint is used.
825 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
826 &quot;A String&quot;,
827 ],
828 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.
829 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular build step. If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account&#x27;s credentials if necessary. The Docker daemon&#x27;s cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a later build step.
830 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s builder image only.
831 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
832 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
833 },
834 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`.
835 &quot;A String&quot;,
836 ],
837 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
838 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
839 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
840 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
841 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
842 },
843 &quot;volumes&quot;: [ # List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
844 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
845 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
846 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
847 },
848 ],
849 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.
850 &quot;A String&quot;,
851 ],
852 },
853 ],
854 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800855 &quot;a_key&quot;: &quot;A String&quot;,
856 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800857 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800858 &quot;A String&quot;,
859 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800860 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.
861 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.
862 &quot;a_key&quot;: { # Start and end times for a build execution phase.
863 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
864 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800865 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800866 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800867 },
868 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
869 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
870 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800871 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800872 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. This message is experimental. # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with `trigger_template`.
873 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
874 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
875 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is &quot;googlecloudplatform&quot;.
876 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull Requests. # filter to match changes in pull requests.
877 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
878 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to comment `/gcbrun`.
879 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800880 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800881 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
882 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
883 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the git_ref regex.
884 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
885 },
886 },
887 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
888 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;. If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.
889 &quot;A String&quot;,
890 ],
891 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.
892 &quot;A String&quot;,
893 ],
894 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character.
895 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`.
896 &quot;a_key&quot;: &quot;A String&quot;,
897 },
898 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
899 &quot;A String&quot;,
900 ],
901 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. Mutually exclusive with `github`.
902 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
903 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
904 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
905 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
906 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800907 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800908 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
909 &quot;a_key&quot;: &quot;A String&quot;,
910 },
911 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
912 },
913}</pre>
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800914</div>
915
916<div class="method">
917 <code class="details" id="list">list(projectId, pageSize=None, pageToken=None, x__xgafv=None)</code>
918 <pre>Lists existing `BuildTrigger`s. This API is experimental.
919
920Args:
921 projectId: string, Required. ID of the project for which to list BuildTriggers. (required)
922 pageSize: integer, Number of results to return in the list.
923 pageToken: string, Token to provide to skip to a particular spot in the list.
924 x__xgafv: string, V1 error format.
925 Allowed values
926 1 - v1 error format
927 2 - v2 error format
928
929Returns:
930 An object of the form:
931
932 { # Response containing existing `BuildTriggers`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800933 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to receive the next page of results.
934 &quot;triggers&quot;: [ # `BuildTriggers` for the project, sorted by `create_time` descending.
935 { # Configuration for an automated build in response to source repository changes.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800936 &quot;build&quot;: { # A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. # Contents of the build template.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800937 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon successful completion of all build steps. # Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
938 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the Build resource&#x27;s results field. If any of the images fail to be pushed, the build is marked FAILURE.
939 &quot;A String&quot;,
940 ],
941 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. # A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account&#x27;s credentials. The location and generation of the uploaded objects will be stored in the Build resource&#x27;s results field. If any objects fail to be pushed, the build is marked FAILURE.
942 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
943 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
944 &quot;A String&quot;,
945 ],
946 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
947 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
948 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
949 },
950 },
951 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800952 &quot;availableSecrets&quot;: { # Secrets and secret environment variables. # Secrets and secret environment variables.
953 &quot;inline&quot;: [ # Secrets encrypted with KMS key and the associated secret environment variable.
954 { # Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.
955 &quot;envMap&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
956 &quot;a_key&quot;: &quot;A String&quot;,
957 },
958 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*
959 },
960 ],
961 &quot;secretManager&quot;: [ # Secrets in Secret Manager and associated secret environment variable.
962 { # Pairs a secret environment variable with a SecretVersion in Secret Manager.
963 &quot;env&quot;: &quot;A String&quot;, # Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step.
964 &quot;versionName&quot;: &quot;A String&quot;, # Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*
965 },
966 ],
967 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800968 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
969 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
970 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build&#x27;s execution.
971 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
972 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the `Build` resource&#x27;s results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800973 &quot;A String&quot;,
974 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800975 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
976 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
977 &quot;name&quot;: &quot;A String&quot;, # Output only. The &#x27;Build&#x27; name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.
978 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
979 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT* &quot;disk free&quot;; 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 the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
980 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
981 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
982 &quot;A String&quot;,
983 ],
984 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
985 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
986 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
987 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
988 &quot;secretEnv&quot;: [ # 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&#x27;s `Secret`. These variables will be available to all build steps in this build.
989 &quot;A String&quot;,
990 ],
991 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
992 &quot;A String&quot;,
993 ],
994 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
995 &quot;volumes&quot;: [ # 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 cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
996 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
997 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
998 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
999 },
1000 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001001 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is in beta and is available only to restricted users.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001002 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001003 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
1004 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.
1005 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
1006 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
1007 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1008 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1009 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1010 },
1011 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
1012 &quot;A String&quot;,
1013 ],
1014 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
1015 &quot;A String&quot;,
1016 ],
1017 &quot;images&quot;: [ # Container images that were built as a part of the build.
1018 { # An image built by the pipeline.
1019 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
1020 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
1021 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1022 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1023 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1024 },
1025 },
1026 ],
1027 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1028 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001029 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
1030 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` instead of using `kmsKeyName` with `secret`. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001031 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
1032 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
1033 &quot;a_key&quot;: &quot;A String&quot;,
1034 },
1035 },
1036 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001037 &quot;serviceAccount&quot;: &quot;A String&quot;, # IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in beta.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001038 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
1039 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source Repository.
1040 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1041 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1042 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
1043 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
1044 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001045 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001046 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
1047 &quot;a_key&quot;: &quot;A String&quot;,
1048 },
1049 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1050 },
1051 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
1052 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1053 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
1054 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
1055 },
1056 },
1057 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that some source was used for this build. # Output only. A permanent fixed identifier for source.
1058 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.
1059 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
1060 &quot;fileHash&quot;: [ # Collection of file hashes.
1061 { # Container message for hash values.
1062 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
1063 &quot;value&quot;: &quot;A String&quot;, # The hash value.
1064 },
1065 ],
1066 },
1067 },
1068 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any revisions resolved.
1069 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1070 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1071 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
1072 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
1073 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001074 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001075 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
1076 &quot;a_key&quot;: &quot;A String&quot;,
1077 },
1078 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1079 },
1080 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any generations resolved.
1081 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1082 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
1083 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
1084 },
1085 },
1086 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
1087 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
1088 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
1089 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
1090 { # A step in the build pipeline.
1091 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started. If the image used to run the step&#x27;s container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
1092 &quot;A String&quot;,
1093 ],
1094 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container. If this value is a relative path, it is relative to the build&#x27;s working directory. If this value is absolute, it may be outside the build&#x27;s working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step&#x27;s execution.
1095 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint. If unset, the image&#x27;s default entrypoint is used.
1096 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
1097 &quot;A String&quot;,
1098 ],
1099 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.
1100 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular build step. If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account&#x27;s credentials if necessary. The Docker daemon&#x27;s cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a later build step.
1101 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s builder image only.
1102 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1103 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1104 },
1105 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`.
1106 &quot;A String&quot;,
1107 ],
1108 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
1109 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
1110 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1111 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1112 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1113 },
1114 &quot;volumes&quot;: [ # List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
1115 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
1116 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
1117 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
1118 },
1119 ],
1120 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.
1121 &quot;A String&quot;,
1122 ],
1123 },
1124 ],
1125 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001126 &quot;a_key&quot;: &quot;A String&quot;,
1127 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001128 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001129 &quot;A String&quot;,
1130 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001131 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.
1132 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.
1133 &quot;a_key&quot;: { # Start and end times for a build execution phase.
1134 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1135 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001136 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -08001137 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001138 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001139 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
1140 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
1141 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001142 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001143 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. This message is experimental. # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with `trigger_template`.
1144 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
1145 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
1146 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is &quot;googlecloudplatform&quot;.
1147 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull Requests. # filter to match changes in pull requests.
1148 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1149 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to comment `/gcbrun`.
1150 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
1151 },
1152 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
1153 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1154 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the git_ref regex.
1155 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1156 },
1157 },
1158 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
1159 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;. If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.
1160 &quot;A String&quot;,
1161 ],
1162 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.
1163 &quot;A String&quot;,
1164 ],
1165 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character.
1166 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`.
1167 &quot;a_key&quot;: &quot;A String&quot;,
1168 },
1169 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
1170 &quot;A String&quot;,
1171 ],
1172 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. Mutually exclusive with `github`.
1173 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1174 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1175 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
1176 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
1177 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001178 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001179 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
1180 &quot;a_key&quot;: &quot;A String&quot;,
1181 },
1182 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1183 },
1184 },
1185 ],
1186}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001187</div>
1188
1189<div class="method">
1190 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1191 <pre>Retrieves the next page of results.
1192
1193Args:
1194 previous_request: The request for the previous page. (required)
1195 previous_response: The response from the request for the previous page. (required)
1196
1197Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001198 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001199 page. Returns None if there are no more items in the collection.
1200 </pre>
1201</div>
1202
1203<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001204 <code class="details" id="patch">patch(projectId, triggerId, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001205 <pre>Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001206
1207Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001208 projectId: string, Required. ID of the project that owns the trigger. (required)
1209 triggerId: string, Required. ID of the `BuildTrigger` to update. (required)
1210 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001211 The object takes the form of:
1212
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001213{ # Configuration for an automated build in response to source repository changes.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001214 &quot;build&quot;: { # A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. # Contents of the build template.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001215 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon successful completion of all build steps. # Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
1216 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the Build resource&#x27;s results field. If any of the images fail to be pushed, the build is marked FAILURE.
1217 &quot;A String&quot;,
1218 ],
1219 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. # A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account&#x27;s credentials. The location and generation of the uploaded objects will be stored in the Build resource&#x27;s results field. If any objects fail to be pushed, the build is marked FAILURE.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001220 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001221 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
1222 &quot;A String&quot;,
1223 ],
1224 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1225 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1226 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001227 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001228 },
1229 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001230 &quot;availableSecrets&quot;: { # Secrets and secret environment variables. # Secrets and secret environment variables.
1231 &quot;inline&quot;: [ # Secrets encrypted with KMS key and the associated secret environment variable.
1232 { # Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.
1233 &quot;envMap&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
1234 &quot;a_key&quot;: &quot;A String&quot;,
1235 },
1236 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*
1237 },
1238 ],
1239 &quot;secretManager&quot;: [ # Secrets in Secret Manager and associated secret environment variable.
1240 { # Pairs a secret environment variable with a SecretVersion in Secret Manager.
1241 &quot;env&quot;: &quot;A String&quot;, # Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step.
1242 &quot;versionName&quot;: &quot;A String&quot;, # Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*
1243 },
1244 ],
1245 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001246 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001247 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001248 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build&#x27;s execution.
1249 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
1250 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the `Build` resource&#x27;s results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.
1251 &quot;A String&quot;,
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001252 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001253 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
1254 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1255 &quot;name&quot;: &quot;A String&quot;, # Output only. The &#x27;Build&#x27; name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001256 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001257 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT* &quot;disk free&quot;; 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 the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001258 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001259 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
1260 &quot;A String&quot;,
1261 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001262 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
1263 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
1264 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
1265 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
1266 &quot;secretEnv&quot;: [ # 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&#x27;s `Secret`. These variables will be available to all build steps in this build.
1267 &quot;A String&quot;,
1268 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001269 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
1270 &quot;A String&quot;,
1271 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001272 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001273 &quot;volumes&quot;: [ # 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 cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
1274 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001275 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001276 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001277 },
1278 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001279 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is in beta and is available only to restricted users.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001280 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001281 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
1282 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.
1283 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
1284 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
1285 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1286 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1287 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1288 },
1289 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
1290 &quot;A String&quot;,
1291 ],
1292 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
1293 &quot;A String&quot;,
1294 ],
1295 &quot;images&quot;: [ # Container images that were built as a part of the build.
1296 { # An image built by the pipeline.
1297 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
1298 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
1299 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1300 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1301 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1302 },
1303 },
1304 ],
1305 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1306 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001307 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
1308 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` instead of using `kmsKeyName` with `secret`. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001309 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
1310 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
1311 &quot;a_key&quot;: &quot;A String&quot;,
1312 },
1313 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001314 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001315 &quot;serviceAccount&quot;: &quot;A String&quot;, # IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in beta.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001316 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
1317 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source Repository.
1318 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1319 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1320 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
1321 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
1322 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001323 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001324 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
1325 &quot;a_key&quot;: &quot;A String&quot;,
1326 },
1327 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1328 },
1329 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
1330 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001331 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
1332 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001333 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001334 },
1335 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that some source was used for this build. # Output only. A permanent fixed identifier for source.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001336 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.
1337 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
1338 &quot;fileHash&quot;: [ # Collection of file hashes.
1339 { # Container message for hash values.
1340 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
1341 &quot;value&quot;: &quot;A String&quot;, # The hash value.
1342 },
1343 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001344 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001345 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001346 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any revisions resolved.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001347 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001348 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1349 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
1350 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001351 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001352 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001353 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
1354 &quot;a_key&quot;: &quot;A String&quot;,
1355 },
1356 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1357 },
1358 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any generations resolved.
1359 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1360 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
1361 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001362 },
1363 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001364 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
1365 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
1366 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
1367 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
1368 { # A step in the build pipeline.
1369 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started. If the image used to run the step&#x27;s container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
1370 &quot;A String&quot;,
1371 ],
1372 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container. If this value is a relative path, it is relative to the build&#x27;s working directory. If this value is absolute, it may be outside the build&#x27;s working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step&#x27;s execution.
1373 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint. If unset, the image&#x27;s default entrypoint is used.
1374 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
1375 &quot;A String&quot;,
1376 ],
1377 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.
1378 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular build step. If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account&#x27;s credentials if necessary. The Docker daemon&#x27;s cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a later build step.
1379 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s builder image only.
1380 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1381 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001382 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001383 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`.
1384 &quot;A String&quot;,
1385 ],
1386 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
1387 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
1388 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1389 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1390 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1391 },
1392 &quot;volumes&quot;: [ # List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
1393 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
1394 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
1395 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
1396 },
1397 ],
1398 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.
1399 &quot;A String&quot;,
1400 ],
1401 },
1402 ],
1403 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
1404 &quot;a_key&quot;: &quot;A String&quot;,
1405 },
1406 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
1407 &quot;A String&quot;,
1408 ],
1409 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.
1410 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.
1411 &quot;a_key&quot;: { # Start and end times for a build execution phase.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001412 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1413 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1414 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001415 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001416 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001417 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
1418 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
1419 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001420 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001421 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. This message is experimental. # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with `trigger_template`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001422 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001423 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001424 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is &quot;googlecloudplatform&quot;.
1425 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull Requests. # filter to match changes in pull requests.
1426 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1427 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to comment `/gcbrun`.
1428 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
1429 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001430 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
1431 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1432 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the git_ref regex.
1433 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1434 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001435 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001436 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
1437 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;. If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.
1438 &quot;A String&quot;,
1439 ],
1440 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.
1441 &quot;A String&quot;,
1442 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001443 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001444 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`.
1445 &quot;a_key&quot;: &quot;A String&quot;,
1446 },
1447 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
1448 &quot;A String&quot;,
1449 ],
1450 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. Mutually exclusive with `github`.
1451 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1452 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1453 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
1454 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
1455 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001456 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001457 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
1458 &quot;a_key&quot;: &quot;A String&quot;,
1459 },
1460 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1461 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001462}
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001463
1464 x__xgafv: string, V1 error format.
1465 Allowed values
1466 1 - v1 error format
1467 2 - v2 error format
1468
1469Returns:
1470 An object of the form:
1471
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001472 { # Configuration for an automated build in response to source repository changes.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001473 &quot;build&quot;: { # A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. # Contents of the build template.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001474 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon successful completion of all build steps. # Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
1475 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the Build resource&#x27;s results field. If any of the images fail to be pushed, the build is marked FAILURE.
1476 &quot;A String&quot;,
1477 ],
1478 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. # A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account&#x27;s credentials. The location and generation of the uploaded objects will be stored in the Build resource&#x27;s results field. If any objects fail to be pushed, the build is marked FAILURE.
1479 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
1480 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
1481 &quot;A String&quot;,
1482 ],
1483 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1484 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1485 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1486 },
1487 },
1488 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001489 &quot;availableSecrets&quot;: { # Secrets and secret environment variables. # Secrets and secret environment variables.
1490 &quot;inline&quot;: [ # Secrets encrypted with KMS key and the associated secret environment variable.
1491 { # Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.
1492 &quot;envMap&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
1493 &quot;a_key&quot;: &quot;A String&quot;,
1494 },
1495 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*
1496 },
1497 ],
1498 &quot;secretManager&quot;: [ # Secrets in Secret Manager and associated secret environment variable.
1499 { # Pairs a secret environment variable with a SecretVersion in Secret Manager.
1500 &quot;env&quot;: &quot;A String&quot;, # Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step.
1501 &quot;versionName&quot;: &quot;A String&quot;, # Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*
1502 },
1503 ],
1504 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001505 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
1506 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
1507 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build&#x27;s execution.
1508 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
1509 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the `Build` resource&#x27;s results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001510 &quot;A String&quot;,
1511 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001512 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
1513 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1514 &quot;name&quot;: &quot;A String&quot;, # Output only. The &#x27;Build&#x27; name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.
1515 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
1516 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT* &quot;disk free&quot;; 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 the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
1517 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
1518 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
1519 &quot;A String&quot;,
1520 ],
1521 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
1522 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
1523 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
1524 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
1525 &quot;secretEnv&quot;: [ # 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&#x27;s `Secret`. These variables will be available to all build steps in this build.
1526 &quot;A String&quot;,
1527 ],
1528 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
1529 &quot;A String&quot;,
1530 ],
1531 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
1532 &quot;volumes&quot;: [ # 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 cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
1533 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
1534 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
1535 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
1536 },
1537 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001538 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is in beta and is available only to restricted users.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001539 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001540 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
1541 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.
1542 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
1543 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
1544 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1545 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1546 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1547 },
1548 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
1549 &quot;A String&quot;,
1550 ],
1551 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
1552 &quot;A String&quot;,
1553 ],
1554 &quot;images&quot;: [ # Container images that were built as a part of the build.
1555 { # An image built by the pipeline.
1556 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
1557 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
1558 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1559 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1560 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1561 },
1562 },
1563 ],
1564 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1565 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001566 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
1567 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` instead of using `kmsKeyName` with `secret`. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001568 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
1569 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
1570 &quot;a_key&quot;: &quot;A String&quot;,
1571 },
1572 },
1573 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001574 &quot;serviceAccount&quot;: &quot;A String&quot;, # IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in beta.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001575 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
1576 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source Repository.
1577 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1578 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1579 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
1580 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
1581 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001582 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001583 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
1584 &quot;a_key&quot;: &quot;A String&quot;,
1585 },
1586 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1587 },
1588 &quot;storageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage.
1589 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1590 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
1591 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
1592 },
1593 },
1594 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that some source was used for this build. # Output only. A permanent fixed identifier for source.
1595 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.
1596 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
1597 &quot;fileHash&quot;: [ # Collection of file hashes.
1598 { # Container message for hash values.
1599 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
1600 &quot;value&quot;: &quot;A String&quot;, # The hash value.
1601 },
1602 ],
1603 },
1604 },
1605 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any revisions resolved.
1606 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1607 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1608 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
1609 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
1610 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001611 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001612 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
1613 &quot;a_key&quot;: &quot;A String&quot;,
1614 },
1615 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1616 },
1617 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any generations resolved.
1618 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1619 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
1620 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
1621 },
1622 },
1623 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
1624 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
1625 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
1626 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
1627 { # A step in the build pipeline.
1628 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started. If the image used to run the step&#x27;s container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
1629 &quot;A String&quot;,
1630 ],
1631 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container. If this value is a relative path, it is relative to the build&#x27;s working directory. If this value is absolute, it may be outside the build&#x27;s working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step&#x27;s execution.
1632 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint. If unset, the image&#x27;s default entrypoint is used.
1633 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
1634 &quot;A String&quot;,
1635 ],
1636 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.
1637 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular build step. If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account&#x27;s credentials if necessary. The Docker daemon&#x27;s cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a later build step.
1638 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s builder image only.
1639 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1640 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1641 },
1642 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`.
1643 &quot;A String&quot;,
1644 ],
1645 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
1646 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
1647 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1648 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1649 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1650 },
1651 &quot;volumes&quot;: [ # List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
1652 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
1653 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
1654 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
1655 },
1656 ],
1657 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.
1658 &quot;A String&quot;,
1659 ],
1660 },
1661 ],
1662 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001663 &quot;a_key&quot;: &quot;A String&quot;,
1664 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001665 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001666 &quot;A String&quot;,
1667 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001668 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.
1669 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.
1670 &quot;a_key&quot;: { # Start and end times for a build execution phase.
1671 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1672 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001673 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001674 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001675 },
1676 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the trigger was created.
1677 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of this trigger.
1678 &quot;disabled&quot;: True or False, # If true, the trigger will never automatically execute a build.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001679 &quot;filename&quot;: &quot;A String&quot;, # Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001680 &quot;github&quot;: { # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. This message is experimental. # GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with `trigger_template`.
1681 &quot;installationId&quot;: &quot;A String&quot;, # The installationID that emits the GitHub event.
1682 &quot;name&quot;: &quot;A String&quot;, # Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is &quot;cloud-builders&quot;.
1683 &quot;owner&quot;: &quot;A String&quot;, # Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is &quot;googlecloudplatform&quot;.
1684 &quot;pullRequest&quot;: { # PullRequestFilter contains filter properties for matching GitHub Pull Requests. # filter to match changes in pull requests.
1685 &quot;branch&quot;: &quot;A String&quot;, # Regex of branches to match. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1686 &quot;commentControl&quot;: &quot;A String&quot;, # Configure builds to run whether a repository owner or collaborator need to comment `/gcbrun`.
1687 &quot;invertRegex&quot;: True or False, # If true, branches that do NOT match the git_ref will trigger a build.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001688 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001689 &quot;push&quot;: { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags.
1690 &quot;branch&quot;: &quot;A String&quot;, # Regexes matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1691 &quot;invertRegex&quot;: True or False, # When true, only trigger a build if the revision regex does NOT match the git_ref regex.
1692 &quot;tag&quot;: &quot;A String&quot;, # Regexes matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1693 },
1694 },
1695 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the trigger.
1696 &quot;ignoredFiles&quot;: [ # ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for &quot;**&quot;. If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.
1697 &quot;A String&quot;,
1698 ],
1699 &quot;includedFiles&quot;: [ # If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.
1700 &quot;A String&quot;,
1701 ],
1702 &quot;name&quot;: &quot;A String&quot;, # User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character.
1703 &quot;substitutions&quot;: { # Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`.
1704 &quot;a_key&quot;: &quot;A String&quot;,
1705 },
1706 &quot;tags&quot;: [ # Tags for annotation of a `BuildTrigger`
1707 &quot;A String&quot;,
1708 ],
1709 &quot;triggerTemplate&quot;: { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. Mutually exclusive with `github`.
1710 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1711 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1712 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
1713 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
1714 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001715 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001716 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
1717 &quot;a_key&quot;: &quot;A String&quot;,
1718 },
1719 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
1720 },
1721}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001722</div>
1723
1724<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001725 <code class="details" id="run">run(projectId, triggerId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001726 <pre>Runs a `BuildTrigger` at a particular source revision.
1727
1728Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001729 projectId: string, Required. ID of the project. (required)
1730 triggerId: string, Required. ID of the trigger. (required)
1731 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001732 The object takes the form of:
1733
1734{ # Location of the source in a Google Cloud Source Repository.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001735 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -08001736 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1737 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
1738 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001739 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001740 &quot;repoName&quot;: &quot;A String&quot;, # Name of the Cloud Source Repository.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001741 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
1742 &quot;a_key&quot;: &quot;A String&quot;,
1743 },
1744 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001745}
1746
1747 x__xgafv: string, V1 error format.
1748 Allowed values
1749 1 - v1 error format
1750 2 - v2 error format
1751
1752Returns:
1753 An object of the form:
1754
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001755 { # This resource represents a long-running operation that is the result of a network API call.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001756 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
1757 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
1758 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1759 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1760 {
1761 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1762 },
1763 ],
1764 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
1765 },
1766 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
1767 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1768 },
1769 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
1770 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
1771 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1772 },
1773}</pre>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001774</div>
1775
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001776<div class="method">
1777 <code class="details" id="webhook">webhook(projectId, trigger, body=None, secret=None, x__xgafv=None)</code>
1778 <pre>ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.
1779
1780Args:
1781 projectId: string, Project in which the specified trigger lives (required)
1782 trigger: string, Name of the trigger to run the payload against (required)
1783 body: object, The request body.
1784 The object takes the form of:
1785
1786{ # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can&#x27;t be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
1787 &quot;contentType&quot;: &quot;A String&quot;, # The HTTP Content-Type header value specifying the content type of the body.
1788 &quot;data&quot;: &quot;A String&quot;, # The HTTP request/response body as raw binary.
1789 &quot;extensions&quot;: [ # Application specific response metadata. Must be set in the first response for streaming APIs.
1790 {
1791 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1792 },
1793 ],
1794}
1795
1796 secret: string, Secret token used for authorization if an OAuth token isn&#x27;t provided.
1797 x__xgafv: string, V1 error format.
1798 Allowed values
1799 1 - v1 error format
1800 2 - v2 error format
1801
1802Returns:
1803 An object of the form:
1804
1805 { # ReceiveTriggerWebhookResponse [Experimental] is the response object for the ReceiveTriggerWebhook method.
1806}</pre>
1807</div>
1808
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001809</body></html>