blob: 48eefbe9efc44486c0fc7239a10ca23893d82462 [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -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.builds.html">builds</a></h1>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#cancel">cancel(projectId, id, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Cancels a build in progress.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070080<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>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070082<p class="firstline">Starts a build with the specified configuration.</p>
83<p class="toc_element">
84 <code><a href="#get">get(projectId, id, x__xgafv=None)</a></code></p>
85<p class="firstline">Returns information about a previously requested build.</p>
86<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(projectId, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070088<p class="firstline">Lists previously requested builds.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
93 <code><a href="#retry">retry(projectId, id, body=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Creates a new build based on the specified build.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070095<h3>Method Details</h3>
96<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097 <code class="details" id="cancel">cancel(projectId, id, body=None, x__xgafv=None)</code>
98 <pre>Cancels a build in progress.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070099
100Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700101 projectId: string, Required. ID of the project. (required)
102 id: string, Required. ID of the build. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700104 The object takes the form of:
105
106{ # Request to cancel an ongoing build.
107 }
108
109 x__xgafv: string, V1 error format.
110 Allowed values
111 1 - v1 error format
112 2 - v2 error format
113
114Returns:
115 An object of the form:
116
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 { # A build resource in the Cloud Build API.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700118 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 # At a high level, a `Build` describes where to find source code, how to build
120 # it (for example, the builder image to run on the source), and where to store
121 # the built artifacts.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700122 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 # Fields can include the following variables, which will be expanded when the
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700124 # build is created:
125 #
126 # - $PROJECT_ID: the project ID of the build.
127 # - $BUILD_ID: the autogenerated ID of the build.
128 # - $REPO_NAME: the source repository name specified by RepoSource.
129 # - $BRANCH_NAME: the branch name specified by RepoSource.
130 # - $TAG_NAME: the tag name specified by RepoSource.
131 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
132 # resolved from the specified branch or tag.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
Bu Sun Kim65020912020-05-20 12:08:20 -0700134 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 # steps.
136 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 # The images are pushed using the builder service account&#x27;s credentials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140 # results field.
141 #
142 # If any of the images fail to be pushed, the build status is marked
143 # `FAILURE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
147 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
148 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
Dan O'Mearadd494642020-05-01 07:42:23 -0700149 # than this value, the build will expire and the build status will be
150 # `EXPIRED`.
151 #
152 # The TTL starts ticking from create_time.
Bu Sun Kim65020912020-05-20 12:08:20 -0700153 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700154 #
155 # The difference between finish_time and start_time is the duration of the
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 # build&#x27;s execution.
157 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
158 &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.
159 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
160 # omitted, the latest generation will be used.
161 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
162 # [Bucket Name
163 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
164 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700165 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 # This object must be a gzipped archive file (`.tar.gz`) containing source to
167 # build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700168 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 &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
170 # Repository.
171 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
172 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
173 # Should only be used with RunBuildTrigger
174 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700175 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700176 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
177 # regex.
178 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
181 # absolute path, this value is ignored for that step&#x27;s execution.
182 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700183 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 # The syntax of the regular expressions accepted is the syntax accepted by
185 # RE2 and described at https://github.com/google/re2/wiki/Syntax
186 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700188 # The syntax of the regular expressions accepted is the syntax accepted by
189 # RE2 and described at https://github.com/google/re2/wiki/Syntax
190 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
191 # project ID requesting the build is assumed.
192 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700193 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700194 },
195 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
196 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
Dan O'Mearadd494642020-05-01 07:42:23 -0700197 # Format: projects/{project}/workerPools/{workerPool}
198 #
199 # This field is experimental.
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 # build steps in this build. If a variable is defined in both globally and in
202 # a build step, the variable will use the build step value.
203 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
205 # being given the value &quot;VALUE&quot;.
206 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700207 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines where the logs are
209 # stored.
210 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
211 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
212 # checks.
213 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
214 # &quot;disk free&quot;; some of the space will be used by the operating system and
Dan O'Mearadd494642020-05-01 07:42:23 -0700215 # build utilities. Also note that this is the minimum disk size that will be
216 # allocated for the build -- the build may run with a larger disk than
217 # requested. At present, the maximum disk size is 1000GB; builds that request
218 # more than the maximum are rejected with an error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
220 &quot;A String&quot;,
221 ],
222 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
223 # Key Management Service crypto key. These values must be specified in the
224 # build&#x27;s `Secret`. These variables will be available to all build steps
225 # in this build.
226 &quot;A String&quot;,
227 ],
228 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229 #
230 # Each volume is created as an empty volume prior to starting the build
231 # process. Upon completion of the build, volumes and their contents are
232 # discarded. Global volume names and paths cannot conflict with the volumes
233 # defined a build step.
234 #
235 # Using a global volume in a build with only one step is not valid as
236 # it is indicative of a build request with an incorrect configuration.
237 { # Volume describes a Docker container volume which is mounted into build steps
238 # in order to persist files across build step execution.
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700240 #
241 # Paths must be absolute and cannot conflict with other volume paths on the
242 # same build step or with certain reserved volume paths.
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244 #
245 # Volume names must be unique per build step and must be valid names for
246 # Docker volumes. Each named volume must be used by at least two build steps.
247 },
248 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700249 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
250 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
251 # Storage.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
254 # granularity. If this amount of time elapses, work on the build will cease
255 # and the build status will be `TIMEOUT`.
256 #
257 # Default time is ten minutes.
258 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
259 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
260 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
261 # successful completion of all build steps.
262 # successful completion of all build steps.
263 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
264 # completion of all build steps.
265 #
266 # Files in the workspace matching specified paths globs will be uploaded to
267 # the specified Cloud Storage location using the builder service account&#x27;s
268 # credentials.
269 #
270 # The location and generation of the uploaded objects will be stored in the
271 # Build resource&#x27;s results field.
272 #
273 # If any objects fail to be pushed, the build is marked FAILURE.
274 # completion of all build steps.
275 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
276 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
277 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
278 },
279 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
280 &quot;A String&quot;,
281 ],
282 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
283 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
284 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
285 #
286 # Files in the workspace matching any path pattern will be uploaded to
287 # Cloud Storage with this location as a prefix.
288 },
289 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
290 # steps.
291 #
292 # The images will be pushed using the builder service account&#x27;s credentials.
293 #
294 # The digests of the pushed images will be stored in the Build resource&#x27;s
295 # results field.
296 #
297 # If any of the images fail to be pushed, the build is marked FAILURE.
298 &quot;A String&quot;,
299 ],
300 },
301 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
302 { # Pairs a set of secret environment variables containing encrypted
303 # values with the Cloud KMS key to use to decrypt the value.
304 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
305 #
306 # Secret environment variables must be unique across all of a build&#x27;s
307 # secrets, and must be used by at least one build step. Values can be at most
308 # 64 KB in size. There can be at most 100 secret values across all of a
309 # build&#x27;s secrets.
310 &quot;a_key&quot;: &quot;A String&quot;,
311 },
312 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
313 },
314 ],
315 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
316 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
317 # indices.
318 &quot;A String&quot;,
319 ],
320 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
321 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
322 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
323 },
324 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
325 # corresponding to build step indices.
326 #
327 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
328 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
329 # Only the first 4KB of data is stored.
330 &quot;A String&quot;,
331 ],
332 &quot;images&quot;: [ # Container images that were built as a part of the build.
333 { # An image built by the pipeline.
334 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
335 # presented to `docker push`.
336 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
337 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
338 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
339 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
340 },
341 },
342 ],
343 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
344 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
345 },
346 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
347 # [Bucket Name
348 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
349 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
350 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
351 { # A step in the build pipeline.
352 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
353 # If unset, the image&#x27;s default entrypoint is used.
354 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
355 #
356 # Each volume is created as an empty volume prior to execution of the
357 # build step. Upon completion of the build, volumes and their contents are
358 # discarded.
359 #
360 # Using a named volume in only one step is not valid as it is indicative
361 # of a build request with an incorrect configuration.
362 { # Volume describes a Docker container volume which is mounted into build steps
363 # in order to persist files across build step execution.
364 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
365 #
366 # Paths must be absolute and cannot conflict with other volume paths on the
367 # same build step or with certain reserved volume paths.
368 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
369 #
370 # Volume names must be unique per build step and must be valid names for
371 # Docker volumes. Each named volume must be used by at least two build steps.
372 },
373 ],
374 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
375 #
376 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
377 # are used as arguments to that entrypoint. If the image does not define
378 # an entrypoint, the first element in args is used as the entrypoint,
379 # and the remainder will be used as arguments.
380 &quot;A String&quot;,
381 ],
382 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
383 # only updated on build completion; step status is not updated in real-time
384 # as the build progresses.
385 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
386 # time limit and will be allowed to continue to run until either it completes
387 # or the build itself times out.
388 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
389 # builder image only.
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 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
394 # build step.
395 #
396 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
397 # will be run directly. If not, the host will attempt to pull the image
398 # first, using the builder service account&#x27;s credentials if necessary.
399 #
400 # The Docker daemon&#x27;s cache will already have the latest versions of all of
401 # the officially supported build steps
402 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
403 # The Docker daemon will also have cached many of the layers for some popular
404 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
405 # attempt to use them.
406 #
407 # If you built an image in a previous build step, it will be stored in the
408 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
409 # later build step.
410 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
411 # reference this build step as a dependency.
412 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
413 # Management Service crypto key. These values must be specified in the
414 # build&#x27;s `Secret`.
415 &quot;A String&quot;,
416 ],
417 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
418 #
419 # If this value is a relative path, it is relative to the build&#x27;s working
420 # directory. If this value is absolute, it may be outside the build&#x27;s working
421 # directory, in which case the contents of the path may not be persisted
422 # across build step executions, unless a `volume` for that path is specified.
423 #
424 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
425 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
426 # the step&#x27;s execution.
427 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
428 #
429 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
430 # being given the value &quot;VALUE&quot;.
431 &quot;A String&quot;,
432 ],
433 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
434 # This build step will not start until all the build steps in `wait_for`
435 # have completed successfully. If `wait_for` is empty, this build step will
436 # start when all previous build steps in the `Build.Steps` list have
437 # completed successfully.
438 &quot;A String&quot;,
439 ],
440 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
441 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
442 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
443 },
444 },
445 ],
446 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
447 # was triggered automatically.
448 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
449 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
450 &quot;A String&quot;,
451 ],
452 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
453 &quot;a_key&quot;: &quot;A String&quot;,
454 },
455 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
456 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
457 # are:
458 #
459 # * BUILD: time to execute all build steps
460 # * PUSH: time to push all specified images.
461 # * FETCHSOURCE: time to fetch source.
462 #
463 # If the build does not specify source or images,
464 # these keys will not be included.
465 &quot;a_key&quot;: { # Start and end times for a build execution phase.
466 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
467 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
468 },
469 },
470 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
471 # some source was used for this build.
472 &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
473 # revisions resolved.
474 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
475 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
476 # Should only be used with RunBuildTrigger
477 &quot;a_key&quot;: &quot;A String&quot;,
478 },
479 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
480 # regex.
481 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
482 #
483 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
484 # absolute path, this value is ignored for that step&#x27;s execution.
485 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
486 #
487 # The syntax of the regular expressions accepted is the syntax accepted by
488 # RE2 and described at https://github.com/google/re2/wiki/Syntax
489 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
490 #
491 # The syntax of the regular expressions accepted is the syntax accepted by
492 # RE2 and described at https://github.com/google/re2/wiki/Syntax
493 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
494 # project ID requesting the build is assumed.
495 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
496 },
497 &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
498 # generations resolved.
499 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
500 # omitted, the latest generation will be used.
501 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
502 # [Bucket Name
503 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
504 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
505 #
506 # This object must be a gzipped archive file (`.tar.gz`) containing source to
507 # build.
508 },
509 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
510 # the original source integrity was maintained in the build. Note that
511 # `FileHashes` will only be populated if `BuildOptions` has requested a
512 # `SourceProvenanceHash`.
513 #
514 # The keys to this map are file paths used as build source and the values
515 # contain the hash values for those files.
516 #
517 # If the build source came in a single package such as a gzipped tarfile
518 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
519 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
520 # SourceProvenance messages to verify integrity of source input to the build.
521 &quot;fileHash&quot;: [ # Collection of file hashes.
522 { # Container message for hash values.
523 &quot;value&quot;: &quot;A String&quot;, # The hash value.
524 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
525 },
526 ],
527 },
528 },
529 },
530 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700531 }</pre>
532</div>
533
534<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700535 <code class="details" id="create">create(projectId, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 <pre>Starts a build with the specified configuration.
537
538This method returns a long-running `Operation`, which includes the build
539ID. Pass the build ID to `GetBuild` to determine the build status (such as
540`SUCCESS` or `FAILURE`).
541
542Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700543 projectId: string, Required. ID of the project. (required)
544 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 The object takes the form of:
546
547{ # A build resource in the Cloud Build API.
548 #
549 # At a high level, a `Build` describes where to find source code, how to build
550 # it (for example, the builder image to run on the source), and where to store
551 # the built artifacts.
552 #
553 # Fields can include the following variables, which will be expanded when the
554 # build is created:
555 #
556 # - $PROJECT_ID: the project ID of the build.
557 # - $BUILD_ID: the autogenerated ID of the build.
558 # - $REPO_NAME: the source repository name specified by RepoSource.
559 # - $BRANCH_NAME: the branch name specified by RepoSource.
560 # - $TAG_NAME: the tag name specified by RepoSource.
561 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
562 # resolved from the specified branch or tag.
563 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 # steps.
566 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700567 # The images are pushed using the builder service account&#x27;s credentials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700568 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700569 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700570 # results field.
571 #
572 # If any of the images fail to be pushed, the build status is marked
573 # `FAILURE`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700574 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700575 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700576 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
577 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
578 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 # than this value, the build will expire and the build status will be
580 # `EXPIRED`.
581 #
582 # The TTL starts ticking from create_time.
Bu Sun Kim65020912020-05-20 12:08:20 -0700583 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700584 #
585 # The difference between finish_time and start_time is the duration of the
Bu Sun Kim65020912020-05-20 12:08:20 -0700586 # build&#x27;s execution.
587 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
588 &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.
589 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
590 # omitted, the latest generation will be used.
591 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
592 # [Bucket Name
593 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
594 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700595 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 # This object must be a gzipped archive file (`.tar.gz`) containing source to
597 # build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700598 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 &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
600 # Repository.
601 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
602 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
603 # Should only be used with RunBuildTrigger
604 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700605 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700606 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
607 # regex.
608 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
611 # absolute path, this value is ignored for that step&#x27;s execution.
612 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700613 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700614 # The syntax of the regular expressions accepted is the syntax accepted by
615 # RE2 and described at https://github.com/google/re2/wiki/Syntax
616 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700617 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 # The syntax of the regular expressions accepted is the syntax accepted by
619 # RE2 and described at https://github.com/google/re2/wiki/Syntax
620 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
621 # project ID requesting the build is assumed.
622 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700623 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 },
625 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
626 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
Dan O'Mearadd494642020-05-01 07:42:23 -0700627 # Format: projects/{project}/workerPools/{workerPool}
628 #
629 # This field is experimental.
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 # build steps in this build. If a variable is defined in both globally and in
632 # a build step, the variable will use the build step value.
633 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700634 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
635 # being given the value &quot;VALUE&quot;.
636 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700637 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700638 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines where the logs are
639 # stored.
640 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
641 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
642 # checks.
643 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
644 # &quot;disk free&quot;; some of the space will be used by the operating system and
Dan O'Mearadd494642020-05-01 07:42:23 -0700645 # build utilities. Also note that this is the minimum disk size that will be
646 # allocated for the build -- the build may run with a larger disk than
647 # requested. At present, the maximum disk size is 1000GB; builds that request
648 # more than the maximum are rejected with an error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700649 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
650 &quot;A String&quot;,
651 ],
652 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
653 # Key Management Service crypto key. These values must be specified in the
654 # build&#x27;s `Secret`. These variables will be available to all build steps
655 # in this build.
656 &quot;A String&quot;,
657 ],
658 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700659 #
660 # Each volume is created as an empty volume prior to starting the build
661 # process. Upon completion of the build, volumes and their contents are
662 # discarded. Global volume names and paths cannot conflict with the volumes
663 # defined a build step.
664 #
665 # Using a global volume in a build with only one step is not valid as
666 # it is indicative of a build request with an incorrect configuration.
667 { # Volume describes a Docker container volume which is mounted into build steps
668 # in order to persist files across build step execution.
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 #
671 # Paths must be absolute and cannot conflict with other volume paths on the
672 # same build step or with certain reserved volume paths.
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 #
675 # Volume names must be unique per build step and must be valid names for
676 # Docker volumes. Each named volume must be used by at least two build steps.
677 },
678 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
680 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
681 # Storage.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700683 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
684 # granularity. If this amount of time elapses, work on the build will cease
685 # and the build status will be `TIMEOUT`.
686 #
687 # Default time is ten minutes.
688 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
689 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
690 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
691 # successful completion of all build steps.
692 # successful completion of all build steps.
693 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
694 # completion of all build steps.
695 #
696 # Files in the workspace matching specified paths globs will be uploaded to
697 # the specified Cloud Storage location using the builder service account&#x27;s
698 # credentials.
699 #
700 # The location and generation of the uploaded objects will be stored in the
701 # Build resource&#x27;s results field.
702 #
703 # If any objects fail to be pushed, the build is marked FAILURE.
704 # completion of all build steps.
705 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
706 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
707 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
708 },
709 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
710 &quot;A String&quot;,
711 ],
712 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
713 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
714 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
715 #
716 # Files in the workspace matching any path pattern will be uploaded to
717 # Cloud Storage with this location as a prefix.
718 },
719 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
720 # steps.
721 #
722 # The images will be pushed using the builder service account&#x27;s credentials.
723 #
724 # The digests of the pushed images will be stored in the Build resource&#x27;s
725 # results field.
726 #
727 # If any of the images fail to be pushed, the build is marked FAILURE.
728 &quot;A String&quot;,
729 ],
730 },
731 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
732 { # Pairs a set of secret environment variables containing encrypted
733 # values with the Cloud KMS key to use to decrypt the value.
734 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
735 #
736 # Secret environment variables must be unique across all of a build&#x27;s
737 # secrets, and must be used by at least one build step. Values can be at most
738 # 64 KB in size. There can be at most 100 secret values across all of a
739 # build&#x27;s secrets.
740 &quot;a_key&quot;: &quot;A String&quot;,
741 },
742 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
743 },
744 ],
745 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
746 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
747 # indices.
748 &quot;A String&quot;,
749 ],
750 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
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 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
755 # corresponding to build step indices.
756 #
757 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
758 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
759 # Only the first 4KB of data is stored.
760 &quot;A String&quot;,
761 ],
762 &quot;images&quot;: [ # Container images that were built as a part of the build.
763 { # An image built by the pipeline.
764 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
765 # presented to `docker push`.
766 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
767 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
768 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
769 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
770 },
771 },
772 ],
773 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
774 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
775 },
776 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
777 # [Bucket Name
778 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
779 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
780 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
781 { # A step in the build pipeline.
782 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
783 # If unset, the image&#x27;s default entrypoint is used.
784 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
785 #
786 # Each volume is created as an empty volume prior to execution of the
787 # build step. Upon completion of the build, volumes and their contents are
788 # discarded.
789 #
790 # Using a named volume in only one step is not valid as it is indicative
791 # of a build request with an incorrect configuration.
792 { # Volume describes a Docker container volume which is mounted into build steps
793 # in order to persist files across build step execution.
794 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
795 #
796 # Paths must be absolute and cannot conflict with other volume paths on the
797 # same build step or with certain reserved volume paths.
798 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
799 #
800 # Volume names must be unique per build step and must be valid names for
801 # Docker volumes. Each named volume must be used by at least two build steps.
802 },
803 ],
804 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
805 #
806 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
807 # are used as arguments to that entrypoint. If the image does not define
808 # an entrypoint, the first element in args is used as the entrypoint,
809 # and the remainder will be used as arguments.
810 &quot;A String&quot;,
811 ],
812 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
813 # only updated on build completion; step status is not updated in real-time
814 # as the build progresses.
815 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
816 # time limit and will be allowed to continue to run until either it completes
817 # or the build itself times out.
818 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
819 # builder image only.
820 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
821 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
822 },
823 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
824 # build step.
825 #
826 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
827 # will be run directly. If not, the host will attempt to pull the image
828 # first, using the builder service account&#x27;s credentials if necessary.
829 #
830 # The Docker daemon&#x27;s cache will already have the latest versions of all of
831 # the officially supported build steps
832 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
833 # The Docker daemon will also have cached many of the layers for some popular
834 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
835 # attempt to use them.
836 #
837 # If you built an image in a previous build step, it will be stored in the
838 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
839 # later build step.
840 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
841 # reference this build step as a dependency.
842 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
843 # Management Service crypto key. These values must be specified in the
844 # build&#x27;s `Secret`.
845 &quot;A String&quot;,
846 ],
847 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
848 #
849 # If this value is a relative path, it is relative to the build&#x27;s working
850 # directory. If this value is absolute, it may be outside the build&#x27;s working
851 # directory, in which case the contents of the path may not be persisted
852 # across build step executions, unless a `volume` for that path is specified.
853 #
854 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
855 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
856 # the step&#x27;s execution.
857 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
858 #
859 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
860 # being given the value &quot;VALUE&quot;.
861 &quot;A String&quot;,
862 ],
863 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
864 # This build step will not start until all the build steps in `wait_for`
865 # have completed successfully. If `wait_for` is empty, this build step will
866 # start when all previous build steps in the `Build.Steps` list have
867 # completed successfully.
868 &quot;A String&quot;,
869 ],
870 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
871 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
872 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
873 },
874 },
875 ],
876 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
877 # was triggered automatically.
878 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
879 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
880 &quot;A String&quot;,
881 ],
882 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
883 &quot;a_key&quot;: &quot;A String&quot;,
884 },
885 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
886 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
887 # are:
888 #
889 # * BUILD: time to execute all build steps
890 # * PUSH: time to push all specified images.
891 # * FETCHSOURCE: time to fetch source.
892 #
893 # If the build does not specify source or images,
894 # these keys will not be included.
895 &quot;a_key&quot;: { # Start and end times for a build execution phase.
896 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
897 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
898 },
899 },
900 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
901 # some source was used for this build.
902 &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
903 # revisions resolved.
904 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
905 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
906 # Should only be used with RunBuildTrigger
907 &quot;a_key&quot;: &quot;A String&quot;,
908 },
909 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
910 # regex.
911 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
912 #
913 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
914 # absolute path, this value is ignored for that step&#x27;s execution.
915 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
916 #
917 # The syntax of the regular expressions accepted is the syntax accepted by
918 # RE2 and described at https://github.com/google/re2/wiki/Syntax
919 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
920 #
921 # The syntax of the regular expressions accepted is the syntax accepted by
922 # RE2 and described at https://github.com/google/re2/wiki/Syntax
923 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
924 # project ID requesting the build is assumed.
925 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
926 },
927 &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
928 # generations resolved.
929 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
930 # omitted, the latest generation will be used.
931 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
932 # [Bucket Name
933 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
934 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
935 #
936 # This object must be a gzipped archive file (`.tar.gz`) containing source to
937 # build.
938 },
939 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
940 # the original source integrity was maintained in the build. Note that
941 # `FileHashes` will only be populated if `BuildOptions` has requested a
942 # `SourceProvenanceHash`.
943 #
944 # The keys to this map are file paths used as build source and the values
945 # contain the hash values for those files.
946 #
947 # If the build source came in a single package such as a gzipped tarfile
948 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
949 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
950 # SourceProvenance messages to verify integrity of source input to the build.
951 &quot;fileHash&quot;: [ # Collection of file hashes.
952 { # Container message for hash values.
953 &quot;value&quot;: &quot;A String&quot;, # The hash value.
954 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
955 },
956 ],
957 },
958 },
959 },
960 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700961}
962
963 x__xgafv: string, V1 error format.
964 Allowed values
965 1 - v1 error format
966 2 - v2 error format
967
968Returns:
969 An object of the form:
970
971 { # This resource represents a long-running operation that is the result of a
972 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700974 # If `true`, the operation is completed, and either `error` or `response` is
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400975 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700976 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400977 # method returns no data on success, such as `Delete`, the response is
978 # `google.protobuf.Empty`. If the original method is standard
979 # `Get`/`Create`/`Update`, the response should be the resource. For other
980 # methods, the response should have the type `XxxResponse`, where `Xxx`
981 # is the original method name. For example, if the original method name
982 # is `TakeSnapshot()`, the inferred response type is
983 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700984 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400985 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400987 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700988 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700989 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
990 # different programming environments, including REST APIs and RPC APIs. It is
991 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
992 # three pieces of data: error code, error message, and error details.
993 #
994 # You can find out more about this error model and how to work with it in the
995 # [API Design Guide](https://cloud.google.com/apis/design/errors).
996 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
997 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
998 # user-facing error message should be localized and sent in the
999 # google.rpc.Status.details field, or localized by the client.
1000 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1001 # message types for APIs to use.
1002 {
1003 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1004 },
1005 ],
1006 },
1007 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1008 # contains progress information and common metadata such as create time.
1009 # Some services might not provide such metadata. Any method that returns a
1010 # long-running operation should document the metadata type, if any.
1011 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1012 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001013 }</pre>
1014</div>
1015
1016<div class="method">
1017 <code class="details" id="get">get(projectId, id, x__xgafv=None)</code>
1018 <pre>Returns information about a previously requested build.
1019
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001020The `Build` that is returned includes its status (such as `SUCCESS`,
1021`FAILURE`, or `WORKING`), and timing information.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001022
1023Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001024 projectId: string, Required. ID of the project. (required)
1025 id: string, Required. ID of the build. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001026 x__xgafv: string, V1 error format.
1027 Allowed values
1028 1 - v1 error format
1029 2 - v2 error format
1030
1031Returns:
1032 An object of the form:
1033
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001034 { # A build resource in the Cloud Build API.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001035 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001036 # At a high level, a `Build` describes where to find source code, how to build
1037 # it (for example, the builder image to run on the source), and where to store
1038 # the built artifacts.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001039 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001040 # Fields can include the following variables, which will be expanded when the
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001041 # build is created:
1042 #
1043 # - $PROJECT_ID: the project ID of the build.
1044 # - $BUILD_ID: the autogenerated ID of the build.
1045 # - $REPO_NAME: the source repository name specified by RepoSource.
1046 # - $BRANCH_NAME: the branch name specified by RepoSource.
1047 # - $TAG_NAME: the tag name specified by RepoSource.
1048 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1049 # resolved from the specified branch or tag.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001050 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
Bu Sun Kim65020912020-05-20 12:08:20 -07001051 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 # steps.
1053 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001054 # The images are pushed using the builder service account&#x27;s credentials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001055 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001056 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001057 # results field.
1058 #
1059 # If any of the images fail to be pushed, the build status is marked
1060 # `FAILURE`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001061 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001062 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001063 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
1064 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
1065 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
Dan O'Mearadd494642020-05-01 07:42:23 -07001066 # than this value, the build will expire and the build status will be
1067 # `EXPIRED`.
1068 #
1069 # The TTL starts ticking from create_time.
Bu Sun Kim65020912020-05-20 12:08:20 -07001070 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001071 #
1072 # The difference between finish_time and start_time is the duration of the
Bu Sun Kim65020912020-05-20 12:08:20 -07001073 # build&#x27;s execution.
1074 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
1075 &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.
1076 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1077 # omitted, the latest generation will be used.
1078 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1079 # [Bucket Name
1080 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1081 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001082 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001083 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1084 # build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001085 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001086 &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
1087 # Repository.
1088 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1089 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1090 # Should only be used with RunBuildTrigger
1091 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001092 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001093 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1094 # regex.
1095 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001096 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001097 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1098 # absolute path, this value is ignored for that step&#x27;s execution.
1099 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001100 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001101 # The syntax of the regular expressions accepted is the syntax accepted by
1102 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1103 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001104 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001105 # The syntax of the regular expressions accepted is the syntax accepted by
1106 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1107 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1108 # project ID requesting the build is assumed.
1109 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001110 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001111 },
1112 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
1113 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
Dan O'Mearadd494642020-05-01 07:42:23 -07001114 # Format: projects/{project}/workerPools/{workerPool}
1115 #
1116 # This field is experimental.
Bu Sun Kim65020912020-05-20 12:08:20 -07001117 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
Dan O'Mearadd494642020-05-01 07:42:23 -07001118 # build steps in this build. If a variable is defined in both globally and in
1119 # a build step, the variable will use the build step value.
1120 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001121 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1122 # being given the value &quot;VALUE&quot;.
1123 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001124 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001125 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines where the logs are
1126 # stored.
1127 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
1128 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
1129 # checks.
1130 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
1131 # &quot;disk free&quot;; some of the space will be used by the operating system and
Dan O'Mearadd494642020-05-01 07:42:23 -07001132 # build utilities. Also note that this is the minimum disk size that will be
1133 # allocated for the build -- the build may run with a larger disk than
1134 # requested. At present, the maximum disk size is 1000GB; builds that request
1135 # more than the maximum are rejected with an error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001136 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
1137 &quot;A String&quot;,
1138 ],
1139 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
1140 # Key Management Service crypto key. These values must be specified in the
1141 # build&#x27;s `Secret`. These variables will be available to all build steps
1142 # in this build.
1143 &quot;A String&quot;,
1144 ],
1145 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001146 #
1147 # Each volume is created as an empty volume prior to starting the build
1148 # process. Upon completion of the build, volumes and their contents are
1149 # discarded. Global volume names and paths cannot conflict with the volumes
1150 # defined a build step.
1151 #
1152 # Using a global volume in a build with only one step is not valid as
1153 # it is indicative of a build request with an incorrect configuration.
1154 { # Volume describes a Docker container volume which is mounted into build steps
1155 # in order to persist files across build step execution.
Bu Sun Kim65020912020-05-20 12:08:20 -07001156 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001157 #
1158 # Paths must be absolute and cannot conflict with other volume paths on the
1159 # same build step or with certain reserved volume paths.
Bu Sun Kim65020912020-05-20 12:08:20 -07001160 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001161 #
1162 # Volume names must be unique per build step and must be valid names for
1163 # Docker volumes. Each named volume must be used by at least two build steps.
1164 },
1165 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001166 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
1167 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
1168 # Storage.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001169 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001170 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
1171 # granularity. If this amount of time elapses, work on the build will cease
1172 # and the build status will be `TIMEOUT`.
1173 #
1174 # Default time is ten minutes.
1175 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
1176 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
1177 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
1178 # successful completion of all build steps.
1179 # successful completion of all build steps.
1180 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
1181 # completion of all build steps.
1182 #
1183 # Files in the workspace matching specified paths globs will be uploaded to
1184 # the specified Cloud Storage location using the builder service account&#x27;s
1185 # credentials.
1186 #
1187 # The location and generation of the uploaded objects will be stored in the
1188 # Build resource&#x27;s results field.
1189 #
1190 # If any objects fail to be pushed, the build is marked FAILURE.
1191 # completion of all build steps.
1192 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1193 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1194 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1195 },
1196 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
1197 &quot;A String&quot;,
1198 ],
1199 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
1200 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
1201 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1202 #
1203 # Files in the workspace matching any path pattern will be uploaded to
1204 # Cloud Storage with this location as a prefix.
1205 },
1206 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
1207 # steps.
1208 #
1209 # The images will be pushed using the builder service account&#x27;s credentials.
1210 #
1211 # The digests of the pushed images will be stored in the Build resource&#x27;s
1212 # results field.
1213 #
1214 # If any of the images fail to be pushed, the build is marked FAILURE.
1215 &quot;A String&quot;,
1216 ],
1217 },
1218 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
1219 { # Pairs a set of secret environment variables containing encrypted
1220 # values with the Cloud KMS key to use to decrypt the value.
1221 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
1222 #
1223 # Secret environment variables must be unique across all of a build&#x27;s
1224 # secrets, and must be used by at least one build step. Values can be at most
1225 # 64 KB in size. There can be at most 100 secret values across all of a
1226 # build&#x27;s secrets.
1227 &quot;a_key&quot;: &quot;A String&quot;,
1228 },
1229 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
1230 },
1231 ],
1232 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
1233 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
1234 # indices.
1235 &quot;A String&quot;,
1236 ],
1237 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1238 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1239 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1240 },
1241 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
1242 # corresponding to build step indices.
1243 #
1244 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
1245 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
1246 # Only the first 4KB of data is stored.
1247 &quot;A String&quot;,
1248 ],
1249 &quot;images&quot;: [ # Container images that were built as a part of the build.
1250 { # An image built by the pipeline.
1251 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
1252 # presented to `docker push`.
1253 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
1254 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1255 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1256 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1257 },
1258 },
1259 ],
1260 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1261 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
1262 },
1263 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
1264 # [Bucket Name
1265 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1266 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1267 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
1268 { # A step in the build pipeline.
1269 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
1270 # If unset, the image&#x27;s default entrypoint is used.
1271 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
1272 #
1273 # Each volume is created as an empty volume prior to execution of the
1274 # build step. Upon completion of the build, volumes and their contents are
1275 # discarded.
1276 #
1277 # Using a named volume in only one step is not valid as it is indicative
1278 # of a build request with an incorrect configuration.
1279 { # Volume describes a Docker container volume which is mounted into build steps
1280 # in order to persist files across build step execution.
1281 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
1282 #
1283 # Paths must be absolute and cannot conflict with other volume paths on the
1284 # same build step or with certain reserved volume paths.
1285 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
1286 #
1287 # Volume names must be unique per build step and must be valid names for
1288 # Docker volumes. Each named volume must be used by at least two build steps.
1289 },
1290 ],
1291 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
1292 #
1293 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
1294 # are used as arguments to that entrypoint. If the image does not define
1295 # an entrypoint, the first element in args is used as the entrypoint,
1296 # and the remainder will be used as arguments.
1297 &quot;A String&quot;,
1298 ],
1299 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
1300 # only updated on build completion; step status is not updated in real-time
1301 # as the build progresses.
1302 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
1303 # time limit and will be allowed to continue to run until either it completes
1304 # or the build itself times out.
1305 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
1306 # builder image only.
1307 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1308 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1309 },
1310 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
1311 # build step.
1312 #
1313 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
1314 # will be run directly. If not, the host will attempt to pull the image
1315 # first, using the builder service account&#x27;s credentials if necessary.
1316 #
1317 # The Docker daemon&#x27;s cache will already have the latest versions of all of
1318 # the officially supported build steps
1319 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1320 # The Docker daemon will also have cached many of the layers for some popular
1321 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
1322 # attempt to use them.
1323 #
1324 # If you built an image in a previous build step, it will be stored in the
1325 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
1326 # later build step.
1327 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
1328 # reference this build step as a dependency.
1329 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
1330 # Management Service crypto key. These values must be specified in the
1331 # build&#x27;s `Secret`.
1332 &quot;A String&quot;,
1333 ],
1334 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
1335 #
1336 # If this value is a relative path, it is relative to the build&#x27;s working
1337 # directory. If this value is absolute, it may be outside the build&#x27;s working
1338 # directory, in which case the contents of the path may not be persisted
1339 # across build step executions, unless a `volume` for that path is specified.
1340 #
1341 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
1342 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
1343 # the step&#x27;s execution.
1344 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
1345 #
1346 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1347 # being given the value &quot;VALUE&quot;.
1348 &quot;A String&quot;,
1349 ],
1350 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
1351 # This build step will not start until all the build steps in `wait_for`
1352 # have completed successfully. If `wait_for` is empty, this build step will
1353 # start when all previous build steps in the `Build.Steps` list have
1354 # completed successfully.
1355 &quot;A String&quot;,
1356 ],
1357 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1358 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1359 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1360 },
1361 },
1362 ],
1363 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
1364 # was triggered automatically.
1365 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
1366 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
1367 &quot;A String&quot;,
1368 ],
1369 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
1370 &quot;a_key&quot;: &quot;A String&quot;,
1371 },
1372 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
1373 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
1374 # are:
1375 #
1376 # * BUILD: time to execute all build steps
1377 # * PUSH: time to push all specified images.
1378 # * FETCHSOURCE: time to fetch source.
1379 #
1380 # If the build does not specify source or images,
1381 # these keys will not be included.
1382 &quot;a_key&quot;: { # Start and end times for a build execution phase.
1383 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1384 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1385 },
1386 },
1387 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
1388 # some source was used for this build.
1389 &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
1390 # revisions resolved.
1391 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1392 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1393 # Should only be used with RunBuildTrigger
1394 &quot;a_key&quot;: &quot;A String&quot;,
1395 },
1396 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1397 # regex.
1398 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
1399 #
1400 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1401 # absolute path, this value is ignored for that step&#x27;s execution.
1402 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1403 #
1404 # The syntax of the regular expressions accepted is the syntax accepted by
1405 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1406 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
1407 #
1408 # The syntax of the regular expressions accepted is the syntax accepted by
1409 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1410 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1411 # project ID requesting the build is assumed.
1412 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1413 },
1414 &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
1415 # generations resolved.
1416 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1417 # omitted, the latest generation will be used.
1418 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1419 # [Bucket Name
1420 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1421 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
1422 #
1423 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1424 # build.
1425 },
1426 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
1427 # the original source integrity was maintained in the build. Note that
1428 # `FileHashes` will only be populated if `BuildOptions` has requested a
1429 # `SourceProvenanceHash`.
1430 #
1431 # The keys to this map are file paths used as build source and the values
1432 # contain the hash values for those files.
1433 #
1434 # If the build source came in a single package such as a gzipped tarfile
1435 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
1436 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
1437 # SourceProvenance messages to verify integrity of source input to the build.
1438 &quot;fileHash&quot;: [ # Collection of file hashes.
1439 { # Container message for hash values.
1440 &quot;value&quot;: &quot;A String&quot;, # The hash value.
1441 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
1442 },
1443 ],
1444 },
1445 },
1446 },
1447 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001448 }</pre>
1449</div>
1450
1451<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001452 <code class="details" id="list">list(projectId, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001453 <pre>Lists previously requested builds.
1454
1455Previously requested builds may still be in-progress, or may have finished
1456successfully or unsuccessfully.
1457
1458Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001459 projectId: string, Required. ID of the project. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07001460 filter: string, The raw filter text to constrain the results.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001461 pageToken: string, Token to provide to skip to a particular spot in the list.
Bu Sun Kim65020912020-05-20 12:08:20 -07001462 pageSize: integer, Number of results to return in the list.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001463 x__xgafv: string, V1 error format.
1464 Allowed values
1465 1 - v1 error format
1466 2 - v2 error format
1467
1468Returns:
1469 An object of the form:
1470
1471 { # Response including listed builds.
Bu Sun Kim65020912020-05-20 12:08:20 -07001472 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to receive the next page of results.
1473 &quot;builds&quot;: [ # Builds will be sorted by `create_time`, descending.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001474 { # A build resource in the Cloud Build API.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001475 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001476 # At a high level, a `Build` describes where to find source code, how to build
1477 # it (for example, the builder image to run on the source), and where to store
1478 # the built artifacts.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001479 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001480 # Fields can include the following variables, which will be expanded when the
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001481 # build is created:
1482 #
1483 # - $PROJECT_ID: the project ID of the build.
1484 # - $BUILD_ID: the autogenerated ID of the build.
1485 # - $REPO_NAME: the source repository name specified by RepoSource.
1486 # - $BRANCH_NAME: the branch name specified by RepoSource.
1487 # - $TAG_NAME: the tag name specified by RepoSource.
1488 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1489 # resolved from the specified branch or tag.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001490 # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
Bu Sun Kim65020912020-05-20 12:08:20 -07001491 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 # steps.
1493 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001494 # The images are pushed using the builder service account&#x27;s credentials.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001495 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001496 # The digests of the pushed images will be stored in the `Build` resource&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001497 # results field.
1498 #
1499 # If any of the images fail to be pushed, the build status is marked
1500 # `FAILURE`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001501 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001502 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001503 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
1504 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
1505 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer
Dan O'Mearadd494642020-05-01 07:42:23 -07001506 # than this value, the build will expire and the build status will be
1507 # `EXPIRED`.
1508 #
1509 # The TTL starts ticking from create_time.
Bu Sun Kim65020912020-05-20 12:08:20 -07001510 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001511 #
1512 # The difference between finish_time and start_time is the duration of the
Bu Sun Kim65020912020-05-20 12:08:20 -07001513 # build&#x27;s execution.
1514 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
1515 &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.
1516 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1517 # omitted, the latest generation will be used.
1518 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1519 # [Bucket Name
1520 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1521 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001522 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001523 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1524 # build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001525 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001526 &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
1527 # Repository.
1528 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1529 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1530 # Should only be used with RunBuildTrigger
1531 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001532 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001533 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1534 # regex.
1535 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001536 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001537 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1538 # absolute path, this value is ignored for that step&#x27;s execution.
1539 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001540 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001541 # The syntax of the regular expressions accepted is the syntax accepted by
1542 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1543 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001544 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001545 # The syntax of the regular expressions accepted is the syntax accepted by
1546 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1547 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1548 # project ID requesting the build is assumed.
1549 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001550 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001551 },
1552 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
1553 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build.
Dan O'Mearadd494642020-05-01 07:42:23 -07001554 # Format: projects/{project}/workerPools/{workerPool}
1555 #
1556 # This field is experimental.
Bu Sun Kim65020912020-05-20 12:08:20 -07001557 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all
Dan O'Mearadd494642020-05-01 07:42:23 -07001558 # build steps in this build. If a variable is defined in both globally and in
1559 # a build step, the variable will use the build step value.
1560 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001561 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1562 # being given the value &quot;VALUE&quot;.
1563 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001564 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001565 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines where the logs are
1566 # stored.
1567 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
1568 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution
1569 # checks.
1570 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT*
1571 # &quot;disk free&quot;; some of the space will be used by the operating system and
Dan O'Mearadd494642020-05-01 07:42:23 -07001572 # build utilities. Also note that this is the minimum disk size that will be
1573 # allocated for the build -- the build may run with a larger disk than
1574 # requested. At present, the maximum disk size is 1000GB; builds that request
1575 # more than the maximum are rejected with an error.
Bu Sun Kim65020912020-05-20 12:08:20 -07001576 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
1577 &quot;A String&quot;,
1578 ],
1579 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud
1580 # Key Management Service crypto key. These values must be specified in the
1581 # build&#x27;s `Secret`. These variables will be available to all build steps
1582 # in this build.
1583 &quot;A String&quot;,
1584 ],
1585 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001586 #
1587 # Each volume is created as an empty volume prior to starting the build
1588 # process. Upon completion of the build, volumes and their contents are
1589 # discarded. Global volume names and paths cannot conflict with the volumes
1590 # defined a build step.
1591 #
1592 # Using a global volume in a build with only one step is not valid as
1593 # it is indicative of a build request with an incorrect configuration.
1594 { # Volume describes a Docker container volume which is mounted into build steps
1595 # in order to persist files across build step execution.
Bu Sun Kim65020912020-05-20 12:08:20 -07001596 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001597 #
1598 # Paths must be absolute and cannot conflict with other volume paths on the
1599 # same build step or with certain reserved volume paths.
Bu Sun Kim65020912020-05-20 12:08:20 -07001600 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001601 #
1602 # Volume names must be unique per build step and must be valid names for
1603 # Docker volumes. Each named volume must be used by at least two build steps.
1604 },
1605 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001606 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
1607 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud
1608 # Storage.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001609 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001610 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second
1611 # granularity. If this amount of time elapses, work on the build will cease
1612 # and the build status will be `TIMEOUT`.
1613 #
1614 # Default time is ten minutes.
1615 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
1616 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
1617 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon
1618 # successful completion of all build steps.
1619 # successful completion of all build steps.
1620 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful
1621 # completion of all build steps.
1622 #
1623 # Files in the workspace matching specified paths globs will be uploaded to
1624 # the specified Cloud Storage location using the builder service account&#x27;s
1625 # credentials.
1626 #
1627 # The location and generation of the uploaded objects will be stored in the
1628 # Build resource&#x27;s results field.
1629 #
1630 # If any objects fail to be pushed, the build is marked FAILURE.
1631 # completion of all build steps.
1632 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
1633 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1634 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1635 },
1636 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
1637 &quot;A String&quot;,
1638 ],
1639 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form
1640 # &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name
1641 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1642 #
1643 # Files in the workspace matching any path pattern will be uploaded to
1644 # Cloud Storage with this location as a prefix.
1645 },
1646 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build
1647 # steps.
1648 #
1649 # The images will be pushed using the builder service account&#x27;s credentials.
1650 #
1651 # The digests of the pushed images will be stored in the Build resource&#x27;s
1652 # results field.
1653 #
1654 # If any of the images fail to be pushed, the build is marked FAILURE.
1655 &quot;A String&quot;,
1656 ],
1657 },
1658 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
1659 { # Pairs a set of secret environment variables containing encrypted
1660 # values with the Cloud KMS key to use to decrypt the value.
1661 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value.
1662 #
1663 # Secret environment variables must be unique across all of a build&#x27;s
1664 # secrets, and must be used by at least one build step. Values can be at most
1665 # 64 KB in size. There can be at most 100 secret values across all of a
1666 # build&#x27;s secrets.
1667 &quot;a_key&quot;: &quot;A String&quot;,
1668 },
1669 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
1670 },
1671 ],
1672 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
1673 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step
1674 # indices.
1675 &quot;A String&quot;,
1676 ],
1677 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
1678 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1679 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1680 },
1681 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order
1682 # corresponding to build step indices.
1683 #
1684 # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
1685 # can produce this output by writing to `$BUILDER_OUTPUT/output`.
1686 # Only the first 4KB of data is stored.
1687 &quot;A String&quot;,
1688 ],
1689 &quot;images&quot;: [ # Container images that were built as a part of the build.
1690 { # An image built by the pipeline.
1691 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as
1692 # presented to `docker push`.
1693 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
1694 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
1695 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1696 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1697 },
1698 },
1699 ],
1700 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1701 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
1702 },
1703 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see
1704 # [Bucket Name
1705 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1706 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1707 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
1708 { # A step in the build pipeline.
1709 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint.
1710 # If unset, the image&#x27;s default entrypoint is used.
1711 &quot;volumes&quot;: [ # List of volumes to mount into the build step.
1712 #
1713 # Each volume is created as an empty volume prior to execution of the
1714 # build step. Upon completion of the build, volumes and their contents are
1715 # discarded.
1716 #
1717 # Using a named volume in only one step is not valid as it is indicative
1718 # of a build request with an incorrect configuration.
1719 { # Volume describes a Docker container volume which is mounted into build steps
1720 # in order to persist files across build step execution.
1721 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume.
1722 #
1723 # Paths must be absolute and cannot conflict with other volume paths on the
1724 # same build step or with certain reserved volume paths.
1725 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount.
1726 #
1727 # Volume names must be unique per build step and must be valid names for
1728 # Docker volumes. Each named volume must be used by at least two build steps.
1729 },
1730 ],
1731 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started.
1732 #
1733 # If the image used to run the step&#x27;s container has an entrypoint, the `args`
1734 # are used as arguments to that entrypoint. If the image does not define
1735 # an entrypoint, the first element in args is used as the entrypoint,
1736 # and the remainder will be used as arguments.
1737 &quot;A String&quot;,
1738 ],
1739 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is
1740 # only updated on build completion; step status is not updated in real-time
1741 # as the build progresses.
1742 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no
1743 # time limit and will be allowed to continue to run until either it completes
1744 # or the build itself times out.
1745 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s
1746 # builder image only.
1747 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1748 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1749 },
1750 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular
1751 # build step.
1752 #
1753 # If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it
1754 # will be run directly. If not, the host will attempt to pull the image
1755 # first, using the builder service account&#x27;s credentials if necessary.
1756 #
1757 # The Docker daemon&#x27;s cache will already have the latest versions of all of
1758 # the officially supported build steps
1759 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1760 # The Docker daemon will also have cached many of the layers for some popular
1761 # images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you
1762 # attempt to use them.
1763 #
1764 # If you built an image in a previous build step, it will be stored in the
1765 # host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a
1766 # later build step.
1767 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to
1768 # reference this build step as a dependency.
1769 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key
1770 # Management Service crypto key. These values must be specified in the
1771 # build&#x27;s `Secret`.
1772 &quot;A String&quot;,
1773 ],
1774 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container.
1775 #
1776 # If this value is a relative path, it is relative to the build&#x27;s working
1777 # directory. If this value is absolute, it may be outside the build&#x27;s working
1778 # directory, in which case the contents of the path may not be persisted
1779 # across build step executions, unless a `volume` for that path is specified.
1780 #
1781 # If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
1782 # which specifies an absolute path, the `RepoSource` `dir` is ignored for
1783 # the step&#x27;s execution.
1784 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step.
1785 #
1786 # The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot;
1787 # being given the value &quot;VALUE&quot;.
1788 &quot;A String&quot;,
1789 ],
1790 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on.
1791 # This build step will not start until all the build steps in `wait_for`
1792 # have completed successfully. If `wait_for` is empty, this build step will
1793 # start when all previous build steps in the `Build.Steps` list have
1794 # completed successfully.
1795 &quot;A String&quot;,
1796 ],
1797 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
1798 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1799 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1800 },
1801 },
1802 ],
1803 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it
1804 # was triggered automatically.
1805 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
1806 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
1807 &quot;A String&quot;,
1808 ],
1809 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
1810 &quot;a_key&quot;: &quot;A String&quot;,
1811 },
1812 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
1813 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys
1814 # are:
1815 #
1816 # * BUILD: time to execute all build steps
1817 # * PUSH: time to push all specified images.
1818 # * FETCHSOURCE: time to fetch source.
1819 #
1820 # If the build does not specify source or images,
1821 # these keys will not be included.
1822 &quot;a_key&quot;: { # Start and end times for a build execution phase.
1823 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
1824 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
1825 },
1826 },
1827 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source.
1828 # some source was used for this build.
1829 &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
1830 # revisions resolved.
1831 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
1832 &quot;substitutions&quot;: { # Substitutions to use in a triggered build.
1833 # Should only be used with RunBuildTrigger
1834 &quot;a_key&quot;: &quot;A String&quot;,
1835 },
1836 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision
1837 # regex.
1838 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build.
1839 #
1840 # This must be a relative path. If a step&#x27;s `dir` is specified and is an
1841 # absolute path, this value is ignored for that step&#x27;s execution.
1842 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build.
1843 #
1844 # The syntax of the regular expressions accepted is the syntax accepted by
1845 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1846 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build.
1847 #
1848 # The syntax of the regular expressions accepted is the syntax accepted by
1849 # RE2 and described at https://github.com/google/re2/wiki/Syntax
1850 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the
1851 # project ID requesting the build is assumed.
1852 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
1853 },
1854 &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
1855 # generations resolved.
1856 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is
1857 # omitted, the latest generation will be used.
1858 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see
1859 # [Bucket Name
1860 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1861 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source.
1862 #
1863 # This object must be a gzipped archive file (`.tar.gz`) containing source to
1864 # build.
1865 },
1866 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that
1867 # the original source integrity was maintained in the build. Note that
1868 # `FileHashes` will only be populated if `BuildOptions` has requested a
1869 # `SourceProvenanceHash`.
1870 #
1871 # The keys to this map are file paths used as build source and the values
1872 # contain the hash values for those files.
1873 #
1874 # If the build source came in a single package such as a gzipped tarfile
1875 # (`.tar.gz`), the `FileHash` will be for the single path to that file.
1876 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in
1877 # SourceProvenance messages to verify integrity of source input to the build.
1878 &quot;fileHash&quot;: [ # Collection of file hashes.
1879 { # Container message for hash values.
1880 &quot;value&quot;: &quot;A String&quot;, # The hash value.
1881 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
1882 },
1883 ],
1884 },
1885 },
1886 },
1887 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001888 },
1889 ],
1890 }</pre>
1891</div>
1892
1893<div class="method">
1894 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1895 <pre>Retrieves the next page of results.
1896
1897Args:
1898 previous_request: The request for the previous page. (required)
1899 previous_response: The response from the request for the previous page. (required)
1900
1901Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001902 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001903 page. Returns None if there are no more items in the collection.
1904 </pre>
1905</div>
1906
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001907<div class="method">
1908 <code class="details" id="retry">retry(projectId, id, body=None, x__xgafv=None)</code>
1909 <pre>Creates a new build based on the specified build.
1910
1911This method creates a new build using the original build request, which may
1912or may not result in an identical build.
1913
1914For triggered builds:
1915
1916* Triggered builds resolve to a precise revision; therefore a retry of a
1917triggered build will result in a build that uses the same revision.
1918
1919For non-triggered builds that specify `RepoSource`:
1920
1921* If the original build built from the tip of a branch, the retried build
1922will build from the tip of that branch, which may not be the same revision
1923as the original build.
1924* If the original build specified a commit sha or revision ID, the retried
1925build will use the identical source.
1926
1927For builds that specify `StorageSource`:
1928
1929* If the original build pulled source from Google Cloud Storage without
1930specifying the generation of the object, the new build will use the current
1931object, which may be different from the original build source.
1932* If the original build pulled source from Cloud Storage and specified the
1933generation of the object, the new build will attempt to use the same
Bu Sun Kim65020912020-05-20 12:08:20 -07001934object, which may or may not be available depending on the bucket&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001935lifecycle management settings.
1936
1937Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001938 projectId: string, Required. ID of the project. (required)
1939 id: string, Required. Build ID of the original build. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001940 body: object, The request body.
1941 The object takes the form of:
1942
1943{ # Specifies a build to retry.
1944 }
1945
1946 x__xgafv: string, V1 error format.
1947 Allowed values
1948 1 - v1 error format
1949 2 - v2 error format
1950
1951Returns:
1952 An object of the form:
1953
1954 { # This resource represents a long-running operation that is the result of a
1955 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001956 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001957 # If `true`, the operation is completed, and either `error` or `response` is
1958 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -07001959 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001960 # method returns no data on success, such as `Delete`, the response is
1961 # `google.protobuf.Empty`. If the original method is standard
1962 # `Get`/`Create`/`Update`, the response should be the resource. For other
1963 # methods, the response should have the type `XxxResponse`, where `Xxx`
1964 # is the original method name. For example, if the original method name
1965 # is `TakeSnapshot()`, the inferred response type is
1966 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001967 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001968 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001969 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001970 # originally returns it. If you use the default HTTP mapping, the
1971 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001972 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1973 # different programming environments, including REST APIs and RPC APIs. It is
1974 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1975 # three pieces of data: error code, error message, and error details.
1976 #
1977 # You can find out more about this error model and how to work with it in the
1978 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1979 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1980 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1981 # user-facing error message should be localized and sent in the
1982 # google.rpc.Status.details field, or localized by the client.
1983 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1984 # message types for APIs to use.
1985 {
1986 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1987 },
1988 ],
1989 },
1990 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1991 # contains progress information and common metadata such as create time.
1992 # Some services might not provide such metadata. Any method that returns a
1993 # long-running operation should document the metadata type, if any.
1994 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1995 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001996 }</pre>
1997</div>
1998
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001999</body></html>