blob: 7b6cdeb6d264c6e0091cb513148b54d7696747d3 [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070081 <code><a href="#close">close()</a></code></p>
82<p class="firstline">Close httplib2 connections.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070083<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#create">create(projectId, body=None, parent=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID. Pass the build ID to `GetBuild` to determine the build status (such as `SUCCESS` or `FAILURE`).</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070086<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087 <code><a href="#get">get(projectId, id, name=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information.</p>
89<p class="toc_element">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070090 <code><a href="#list">list(projectId, parent=None, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070095<p class="toc_element">
96 <code><a href="#retry">retry(projectId, id, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097<p class="firstline">Creates a new build based on the specified build. This method creates a new build using the original build request, which may or may not result in an identical build. For triggered builds: * Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision. For non-triggered builds that specify `RepoSource`: * If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build. * If the original build specified a commit sha or revision ID, the retried build will use the identical source. For builds that specify `StorageSource`: * If the original build pulled source from Google Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source. * If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070098<h3>Method Details</h3>
99<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100 <code class="details" id="cancel">cancel(projectId, id, body=None, x__xgafv=None)</code>
101 <pre>Cancels a build in progress.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700102
103Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700104 projectId: string, Required. ID of the project. (required)
105 id: string, Required. ID of the build. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700107 The object takes the form of:
108
109{ # Request to cancel an ongoing build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700110 &quot;projectId&quot;: &quot;A String&quot;, # Required. ID of the project.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700111 &quot;id&quot;: &quot;A String&quot;, # Required. ID of the build.
112 &quot;name&quot;: &quot;A String&quot;, # The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700113 }
114
115 x__xgafv: string, V1 error format.
116 Allowed values
117 1 - v1 error format
118 2 - v2 error format
119
120Returns:
121 An object of the form:
122
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 { # A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700124 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700125 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the `Build` resource&#x27;s results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.
126 &quot;A String&quot;,
127 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700128 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700129 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is experimental.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700130 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
131 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
132 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
133 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700134 },
135 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700136 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
137 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700138 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
139 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
140 &quot;A String&quot;,
141 ],
142 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`. These variables will be available to all build steps in this build.
143 &quot;A String&quot;,
144 ],
145 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
146 &quot;A String&quot;,
147 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700148 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT* &quot;disk free&quot;; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700149 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700150 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
151 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700152 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700153 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.
154 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
155 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
156 { # A step in the build pipeline.
157 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started. If the image used to run the step&#x27;s container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
158 &quot;A String&quot;,
159 ],
160 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.
161 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint. If unset, the image&#x27;s default entrypoint is used.
162 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s builder image only.
163 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
164 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
165 },
166 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
167 &quot;volumes&quot;: [ # List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
168 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
169 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
170 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
171 },
172 ],
173 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
174 &quot;A String&quot;,
175 ],
176 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular build step. If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account&#x27;s credentials if necessary. The Docker daemon&#x27;s cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a later build step.
177 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container. If this value is a relative path, it is relative to the build&#x27;s working directory. If this value is absolute, it may be outside the build&#x27;s working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step&#x27;s execution.
178 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`.
179 &quot;A String&quot;,
180 ],
181 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
182 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.
183 &quot;A String&quot;,
184 ],
185 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
186 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
187 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
188 },
189 },
190 ],
191 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
192 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon successful completion of all build steps. # Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
193 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the Build resource&#x27;s results field. If any of the images fail to be pushed, the build is marked FAILURE.
194 &quot;A String&quot;,
195 ],
196 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. # A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account&#x27;s credentials. The location and generation of the uploaded objects will be stored in the Build resource&#x27;s results field. If any objects fail to be pushed, the build is marked FAILURE.
197 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
198 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
199 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
200 },
201 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
202 &quot;A String&quot;,
203 ],
204 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
205 },
206 },
207 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
208 &quot;a_key&quot;: &quot;A String&quot;,
209 },
210 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that some source was used for this build. # Output only. A permanent fixed identifier for source.
211 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any generations resolved.
212 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
213 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
214 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
215 },
216 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.
217 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
218 &quot;fileHash&quot;: [ # Collection of file hashes.
219 { # Container message for hash values.
220 &quot;value&quot;: &quot;A String&quot;, # The hash value.
221 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
222 },
223 ],
224 },
225 },
226 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any revisions resolved.
227 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
228 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
229 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
230 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
231 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
232 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
233 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
234 &quot;a_key&quot;: &quot;A String&quot;,
235 },
236 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
237 },
238 },
239 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
240 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
241 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.
242 &quot;serviceAccount&quot;: &quot;A String&quot;, # IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in alpha and is not publicly available.
243 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build&#x27;s execution.
244 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.
245 &quot;a_key&quot;: { # Start and end times for a build execution phase.
246 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
247 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
248 },
249 },
250 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
251 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
252 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
253 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
254 },
255 &quot;images&quot;: [ # Container images that were built as a part of the build.
256 { # An image built by the pipeline.
257 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
258 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
259 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
260 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
261 },
262 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
263 },
264 ],
265 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
266 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
267 &quot;A String&quot;,
268 ],
269 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
270 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
271 &quot;A String&quot;,
272 ],
273 },
274 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
275 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700276 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
277 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value.
278 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
279 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
280 &quot;a_key&quot;: &quot;A String&quot;,
281 },
282 },
283 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700284 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700285 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700286 &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.
287 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
288 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
289 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
290 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700291 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source Repository.
292 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
293 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
294 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
295 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700296 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700297 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700298 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
299 &quot;a_key&quot;: &quot;A String&quot;,
300 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700301 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700302 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700303 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700304 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
305 &quot;A String&quot;,
306 ],
307 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
308 &quot;name&quot;: &quot;A String&quot;, # Output only. The &#x27;Build&#x27; name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700309 }</pre>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700310</div>
311
312<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700313 <code class="details" id="close">close()</code>
314 <pre>Close httplib2 connections.</pre>
315</div>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700316
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700317<div class="method">
318 <code class="details" id="create">create(projectId, body=None, parent=None, x__xgafv=None)</code>
319 <pre>Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID. Pass the build ID to `GetBuild` to determine the build status (such as `SUCCESS` or `FAILURE`).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700320
321Args:
322 projectId: string, Required. ID of the project. (required)
323 body: object, The request body.
324 The object takes the form of:
325
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700326{ # A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700327 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700328 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the `Build` resource&#x27;s results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.
329 &quot;A String&quot;,
330 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700331 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700332 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is experimental.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700333 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
334 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
335 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
336 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700337 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700338 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700339 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
340 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700341 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
342 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
343 &quot;A String&quot;,
344 ],
345 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`. These variables will be available to all build steps in this build.
346 &quot;A String&quot;,
347 ],
348 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
349 &quot;A String&quot;,
350 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700351 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT* &quot;disk free&quot;; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700352 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700353 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
354 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700355 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700356 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.
357 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
358 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
359 { # A step in the build pipeline.
360 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started. If the image used to run the step&#x27;s container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
361 &quot;A String&quot;,
362 ],
363 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.
364 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint. If unset, the image&#x27;s default entrypoint is used.
365 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s builder image only.
366 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
367 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
368 },
369 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
370 &quot;volumes&quot;: [ # List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
371 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
372 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
373 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
374 },
375 ],
376 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
377 &quot;A String&quot;,
378 ],
379 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular build step. If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account&#x27;s credentials if necessary. The Docker daemon&#x27;s cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a later build step.
380 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container. If this value is a relative path, it is relative to the build&#x27;s working directory. If this value is absolute, it may be outside the build&#x27;s working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step&#x27;s execution.
381 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`.
382 &quot;A String&quot;,
383 ],
384 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
385 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.
386 &quot;A String&quot;,
387 ],
388 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
389 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
390 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
391 },
392 },
393 ],
394 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
395 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon successful completion of all build steps. # Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
396 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the Build resource&#x27;s results field. If any of the images fail to be pushed, the build is marked FAILURE.
397 &quot;A String&quot;,
398 ],
399 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. # A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account&#x27;s credentials. The location and generation of the uploaded objects will be stored in the Build resource&#x27;s results field. If any objects fail to be pushed, the build is marked FAILURE.
400 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
401 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
402 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
403 },
404 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
405 &quot;A String&quot;,
406 ],
407 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
408 },
409 },
410 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
411 &quot;a_key&quot;: &quot;A String&quot;,
412 },
413 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that some source was used for this build. # Output only. A permanent fixed identifier for source.
414 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any generations resolved.
415 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
416 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
417 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
418 },
419 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.
420 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
421 &quot;fileHash&quot;: [ # Collection of file hashes.
422 { # Container message for hash values.
423 &quot;value&quot;: &quot;A String&quot;, # The hash value.
424 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
425 },
426 ],
427 },
428 },
429 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any revisions resolved.
430 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
431 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
432 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
433 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
434 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
435 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
436 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
437 &quot;a_key&quot;: &quot;A String&quot;,
438 },
439 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
440 },
441 },
442 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
443 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
444 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.
445 &quot;serviceAccount&quot;: &quot;A String&quot;, # IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in alpha and is not publicly available.
446 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build&#x27;s execution.
447 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.
448 &quot;a_key&quot;: { # Start and end times for a build execution phase.
449 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
450 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
451 },
452 },
453 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
454 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
455 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
456 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
457 },
458 &quot;images&quot;: [ # Container images that were built as a part of the build.
459 { # An image built by the pipeline.
460 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
461 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
462 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
463 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
464 },
465 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
466 },
467 ],
468 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
469 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
470 &quot;A String&quot;,
471 ],
472 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
473 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
474 &quot;A String&quot;,
475 ],
476 },
477 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
478 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700479 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
480 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value.
481 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
482 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
483 &quot;a_key&quot;: &quot;A String&quot;,
484 },
485 },
486 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700487 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700488 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700489 &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.
490 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
491 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
492 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
493 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700494 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source Repository.
495 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
496 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
497 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
498 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700499 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700500 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700501 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
502 &quot;a_key&quot;: &quot;A String&quot;,
503 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700504 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700505 },
506 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700507 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
508 &quot;A String&quot;,
509 ],
510 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
511 &quot;name&quot;: &quot;A String&quot;, # Output only. The &#x27;Build&#x27; name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700512}
513
514 parent: string, The parent resource where this build will be created. Format: `projects/{project}/locations/{location}`
515 x__xgafv: string, V1 error format.
516 Allowed values
517 1 - v1 error format
518 2 - v2 error format
519
520Returns:
521 An object of the form:
522
523 { # This resource represents a long-running operation that is the result of a network API call.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700524 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700525 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
526 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
527 },
528 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
529 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
530 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
531 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700532 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700533 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
534 {
535 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
536 },
537 ],
538 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700539 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700540 },
541 }</pre>
542</div>
543
544<div class="method">
545 <code class="details" id="get">get(projectId, id, name=None, x__xgafv=None)</code>
546 <pre>Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information.
547
548Args:
549 projectId: string, Required. ID of the project. (required)
550 id: string, Required. ID of the build. (required)
551 name: string, The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}`
552 x__xgafv: string, V1 error format.
553 Allowed values
554 1 - v1 error format
555 2 - v2 error format
556
557Returns:
558 An object of the form:
559
560 { # A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700561 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700562 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the `Build` resource&#x27;s results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.
563 &quot;A String&quot;,
564 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700565 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700566 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is experimental.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700567 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
568 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
569 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
570 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
571 },
572 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700573 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
574 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700575 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
576 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
577 &quot;A String&quot;,
578 ],
579 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`. These variables will be available to all build steps in this build.
580 &quot;A String&quot;,
581 ],
582 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
583 &quot;A String&quot;,
584 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700585 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT* &quot;disk free&quot;; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700586 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700587 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
588 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700589 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700590 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.
591 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
592 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
593 { # A step in the build pipeline.
594 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started. If the image used to run the step&#x27;s container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
595 &quot;A String&quot;,
596 ],
597 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.
598 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint. If unset, the image&#x27;s default entrypoint is used.
599 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s builder image only.
600 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
601 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
602 },
603 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
604 &quot;volumes&quot;: [ # List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
605 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
606 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
607 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
608 },
609 ],
610 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
611 &quot;A String&quot;,
612 ],
613 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular build step. If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account&#x27;s credentials if necessary. The Docker daemon&#x27;s cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a later build step.
614 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container. If this value is a relative path, it is relative to the build&#x27;s working directory. If this value is absolute, it may be outside the build&#x27;s working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step&#x27;s execution.
615 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`.
616 &quot;A String&quot;,
617 ],
618 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
619 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.
620 &quot;A String&quot;,
621 ],
622 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
623 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
624 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
625 },
626 },
627 ],
628 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
629 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon successful completion of all build steps. # Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
630 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the Build resource&#x27;s results field. If any of the images fail to be pushed, the build is marked FAILURE.
631 &quot;A String&quot;,
632 ],
633 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. # A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account&#x27;s credentials. The location and generation of the uploaded objects will be stored in the Build resource&#x27;s results field. If any objects fail to be pushed, the build is marked FAILURE.
634 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
635 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
636 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
637 },
638 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
639 &quot;A String&quot;,
640 ],
641 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
642 },
643 },
644 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
645 &quot;a_key&quot;: &quot;A String&quot;,
646 },
647 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that some source was used for this build. # Output only. A permanent fixed identifier for source.
648 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any generations resolved.
649 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
650 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
651 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
652 },
653 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.
654 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
655 &quot;fileHash&quot;: [ # Collection of file hashes.
656 { # Container message for hash values.
657 &quot;value&quot;: &quot;A String&quot;, # The hash value.
658 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
659 },
660 ],
661 },
662 },
663 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any revisions resolved.
664 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
665 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
666 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
667 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
668 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
669 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
670 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
671 &quot;a_key&quot;: &quot;A String&quot;,
672 },
673 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
674 },
675 },
676 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
677 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
678 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.
679 &quot;serviceAccount&quot;: &quot;A String&quot;, # IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in alpha and is not publicly available.
680 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build&#x27;s execution.
681 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.
682 &quot;a_key&quot;: { # Start and end times for a build execution phase.
683 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
684 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
685 },
686 },
687 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
688 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
689 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
690 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
691 },
692 &quot;images&quot;: [ # Container images that were built as a part of the build.
693 { # An image built by the pipeline.
694 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
695 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
696 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
697 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
698 },
699 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
700 },
701 ],
702 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
703 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
704 &quot;A String&quot;,
705 ],
706 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
707 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
708 &quot;A String&quot;,
709 ],
710 },
711 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
712 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700713 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
714 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value.
715 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
716 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
717 &quot;a_key&quot;: &quot;A String&quot;,
718 },
719 },
720 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700721 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700722 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700723 &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.
724 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
725 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
726 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
727 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700728 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source Repository.
729 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
730 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
731 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
732 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700733 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700734 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700735 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
736 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700737 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700738 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700739 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700740 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700741 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
742 &quot;A String&quot;,
743 ],
744 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
745 &quot;name&quot;: &quot;A String&quot;, # Output only. The &#x27;Build&#x27; name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700746 }</pre>
747</div>
748
749<div class="method">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700750 <code class="details" id="list">list(projectId, parent=None, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700751 <pre>Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700752
753Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700754 projectId: string, Required. ID of the project. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700755 parent: string, The parent of the collection of `Builds`. Format: `projects/{project}/locations/location`
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700756 filter: string, The raw filter text to constrain the results.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700757 pageToken: string, The page token for the next page of Builds. If unspecified, the first page of results is returned. If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. In this case, the token should be discarded, and pagination should be restarted from the first page of results. See https://google.aip.dev/158 for more.
758 pageSize: integer, Number of results to return in the list.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700759 x__xgafv: string, V1 error format.
760 Allowed values
761 1 - v1 error format
762 2 - v2 error format
763
764Returns:
765 An object of the form:
766
767 { # Response including listed builds.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700768 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to receive the next page of results. This will be absent if the end of the response list has been reached.
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 &quot;builds&quot;: [ # Builds will be sorted by `create_time`, descending.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700770 { # A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700771 &quot;logsBucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700772 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the `Build` resource&#x27;s results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.
773 &quot;A String&quot;,
774 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700775 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700776 &quot;workerPool&quot;: &quot;A String&quot;, # Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is experimental.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700777 &quot;volumes&quot;: [ # Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
778 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
779 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
780 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
781 },
782 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700783 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
784 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700785 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
786 &quot;env&quot;: [ # A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
787 &quot;A String&quot;,
788 ],
789 &quot;secretEnv&quot;: [ # A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`. These variables will be available to all build steps in this build.
790 &quot;A String&quot;,
791 ],
792 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
793 &quot;A String&quot;,
794 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700795 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Requested disk size for the VM that runs the build. Note that this is *NOT* &quot;disk free&quot;; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700796 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700797 &quot;dynamicSubstitutions&quot;: True or False, # Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
798 &quot;substitutionOption&quot;: &quot;A String&quot;, # Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700799 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700800 &quot;queueTtl&quot;: &quot;A String&quot;, # TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.
801 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
802 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
803 { # A step in the build pipeline.
804 &quot;args&quot;: [ # A list of arguments that will be presented to the step when it is started. If the image used to run the step&#x27;s container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.
805 &quot;A String&quot;,
806 ],
807 &quot;id&quot;: &quot;A String&quot;, # Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.
808 &quot;entrypoint&quot;: &quot;A String&quot;, # Entrypoint to be used instead of the build step image&#x27;s default entrypoint. If unset, the image&#x27;s default entrypoint is used.
809 &quot;pullTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step&#x27;s builder image only.
810 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
811 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
812 },
813 &quot;timeout&quot;: &quot;A String&quot;, # Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
814 &quot;volumes&quot;: [ # List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
815 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
816 &quot;path&quot;: &quot;A String&quot;, # Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
817 &quot;name&quot;: &quot;A String&quot;, # Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
818 },
819 ],
820 &quot;env&quot;: [ # A list of environment variable definitions to be used when running a step. The elements are of the form &quot;KEY=VALUE&quot; for the environment variable &quot;KEY&quot; being given the value &quot;VALUE&quot;.
821 &quot;A String&quot;,
822 ],
823 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the container image that will run this particular build step. If the image is available in the host&#x27;s Docker daemon&#x27;s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account&#x27;s credentials if necessary. The Docker daemon&#x27;s cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like &quot;ubuntu&quot;, &quot;debian&quot;, but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host&#x27;s Docker daemon&#x27;s cache and is available to use as the name for a later build step.
824 &quot;dir&quot;: &quot;A String&quot;, # Working directory to use when running this step&#x27;s container. If this value is a relative path, it is relative to the build&#x27;s working directory. If this value is absolute, it may be outside the build&#x27;s working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step&#x27;s execution.
825 &quot;secretEnv&quot;: [ # A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build&#x27;s `Secret`.
826 &quot;A String&quot;,
827 ],
828 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
829 &quot;waitFor&quot;: [ # The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.
830 &quot;A String&quot;,
831 ],
832 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
833 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
834 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
835 },
836 },
837 ],
838 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
839 &quot;artifacts&quot;: { # Artifacts produced by a build that should be uploaded upon successful completion of all build steps. # Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
840 &quot;images&quot;: [ # A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account&#x27;s credentials. The digests of the pushed images will be stored in the Build resource&#x27;s results field. If any of the images fail to be pushed, the build is marked FAILURE.
841 &quot;A String&quot;,
842 ],
843 &quot;objects&quot;: { # Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. # A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account&#x27;s credentials. The location and generation of the uploaded objects will be stored in the Build resource&#x27;s results field. If any objects fail to be pushed, the build is marked FAILURE.
844 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
845 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
846 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
847 },
848 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
849 &quot;A String&quot;,
850 ],
851 &quot;location&quot;: &quot;A String&quot;, # Cloud Storage bucket and optional object path, in the form &quot;gs://bucket/path/to/somewhere/&quot;. (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
852 },
853 },
854 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
855 &quot;a_key&quot;: &quot;A String&quot;,
856 },
857 &quot;sourceProvenance&quot;: { # Provenance of the source. Ways to find the original source, or verify that some source was used for this build. # Output only. A permanent fixed identifier for source.
858 &quot;resolvedStorageSource&quot;: { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build&#x27;s `source.storage_source`, if exists, with any generations resolved.
859 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
860 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
861 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
862 },
863 &quot;fileHashes&quot;: { # Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.
864 &quot;a_key&quot;: { # Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
865 &quot;fileHash&quot;: [ # Collection of file hashes.
866 { # Container message for hash values.
867 &quot;value&quot;: &quot;A String&quot;, # The hash value.
868 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
869 },
870 ],
871 },
872 },
873 &quot;resolvedRepoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # A copy of the build&#x27;s `source.repo_source`, if exists, with any revisions resolved.
874 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
875 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
876 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
877 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
878 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
879 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
880 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
881 &quot;a_key&quot;: &quot;A String&quot;,
882 },
883 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
884 },
885 },
886 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
887 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
888 &quot;timeout&quot;: &quot;A String&quot;, # Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.
889 &quot;serviceAccount&quot;: &quot;A String&quot;, # IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in alpha and is not publicly available.
890 &quot;finishTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build&#x27;s execution.
891 &quot;timing&quot;: { # Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.
892 &quot;a_key&quot;: { # Start and end times for a build execution phase.
893 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
894 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
895 },
896 },
897 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
898 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
899 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
900 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
901 },
902 &quot;images&quot;: [ # Container images that were built as a part of the build.
903 { # An image built by the pipeline.
904 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
905 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
906 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
907 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
908 },
909 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
910 },
911 ],
912 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
913 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
914 &quot;A String&quot;,
915 ],
916 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
917 &quot;buildStepOutputs&quot;: [ # List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
918 &quot;A String&quot;,
919 ],
920 },
921 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
922 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700923 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
924 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value.
925 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
926 &quot;secretEnv&quot;: { # Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build&#x27;s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build&#x27;s secrets.
927 &quot;a_key&quot;: &quot;A String&quot;,
928 },
929 },
930 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700931 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700932 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700933 &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.
934 &quot;object&quot;: &quot;A String&quot;, # Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
935 &quot;generation&quot;: &quot;A String&quot;, # Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
936 &quot;bucket&quot;: &quot;A String&quot;, # Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
937 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700938 &quot;repoSource&quot;: { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source Repository.
939 &quot;branchName&quot;: &quot;A String&quot;, # Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
940 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
941 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
942 &quot;dir&quot;: &quot;A String&quot;, # Directory, relative to the source root, in which to run the build. This must be a relative path. If a step&#x27;s `dir` is specified and is an absolute path, this value is ignored for that step&#x27;s execution.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700943 &quot;tagName&quot;: &quot;A String&quot;, # Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700944 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700945 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
946 &quot;a_key&quot;: &quot;A String&quot;,
947 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700948 &quot;projectId&quot;: &quot;A String&quot;, # ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700949 },
950 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700951 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
952 &quot;A String&quot;,
953 ],
954 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
955 &quot;name&quot;: &quot;A String&quot;, # Output only. The &#x27;Build&#x27; name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700956 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700957 ],
958 }</pre>
959</div>
960
961<div class="method">
962 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
963 <pre>Retrieves the next page of results.
964
965Args:
966 previous_request: The request for the previous page. (required)
967 previous_response: The response from the request for the previous page. (required)
968
969Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700970 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700971 page. Returns None if there are no more items in the collection.
972 </pre>
973</div>
974
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700975<div class="method">
976 <code class="details" id="retry">retry(projectId, id, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700977 <pre>Creates a new build based on the specified build. This method creates a new build using the original build request, which may or may not result in an identical build. For triggered builds: * Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision. For non-triggered builds that specify `RepoSource`: * If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build. * If the original build specified a commit sha or revision ID, the retried build will use the identical source. For builds that specify `StorageSource`: * If the original build pulled source from Google Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source. * If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket&#x27;s lifecycle management settings.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700978
979Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700980 projectId: string, Required. ID of the project. (required)
981 id: string, Required. Build ID of the original build. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700982 body: object, The request body.
983 The object takes the form of:
984
985{ # Specifies a build to retry.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700986 &quot;id&quot;: &quot;A String&quot;, # Required. Build ID of the original build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700987 &quot;name&quot;: &quot;A String&quot;, # The name of the `Build` to retry. Format: `projects/{project}/locations/{location}/builds/{build}`
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700988 &quot;projectId&quot;: &quot;A String&quot;, # Required. ID of the project.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700989 }
990
991 x__xgafv: string, V1 error format.
992 Allowed values
993 1 - v1 error format
994 2 - v2 error format
995
996Returns:
997 An object of the form:
998
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700999 { # This resource represents a long-running operation that is the result of a network API call.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001000 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001001 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
1002 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1003 },
1004 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
1005 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
1006 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1007 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001008 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001009 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001010 {
1011 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1012 },
1013 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001014 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001015 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001016 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001017 }</pre>
1018</div>
1019
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001020</body></html>