blob: 4bd5d664500698bc4e07561654a438889cea0440 [file] [log] [blame]
Dmitry Frenkel3e17f892020-10-06 16:46:05 -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
75<h1><a href="cloudbuild_v1.html">Cloud Build API</a> . <a href="cloudbuild_v1.projects.html">projects</a> . <a href="cloudbuild_v1.projects.locations.html">locations</a> . <a href="cloudbuild_v1.projects.locations.builds.html">builds</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#cancel">cancel(name, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Cancels a build in progress.</p>
80<p class="toc_element">
81 <code><a href="#close">close()</a></code></p>
82<p class="firstline">Close httplib2 connections.</p>
83<p class="toc_element">
84 <code><a href="#create">create(parent, body=None, projectId=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>
86<p class="toc_element">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -080087 <code><a href="#get">get(name, id=None, projectId=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<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">
Yoshi Automation Botb6971b02020-11-26 17:16:03 -080090 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, projectId=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>
92<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>
95<p class="toc_element">
96 <code><a href="#retry">retry(name, body=None, x__xgafv=None)</a></code></p>
97<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>
98<h3>Method Details</h3>
99<div class="method">
100 <code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code>
101 <pre>Cancels a build in progress.
102
103Args:
104 name: string, The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}` (required)
105 body: object, The request body.
106 The object takes the form of:
107
108{ # Request to cancel an ongoing build.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800109 &quot;id&quot;: &quot;A String&quot;, # Required. ID of the build.
110 &quot;projectId&quot;: &quot;A String&quot;, # Required. ID of the project.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800111 &quot;name&quot;: &quot;A String&quot;, # The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}`
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700112 }
113
114 x__xgafv: string, V1 error format.
115 Allowed values
116 1 - v1 error format
117 2 - v2 error format
118
119Returns:
120 An object of the form:
121
122 { # 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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800123 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
124 &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.
125 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
126 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
127 &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.
128 &quot;A String&quot;,
129 ],
130 &quot;images&quot;: [ # Container images that were built as a part of the build.
131 { # An image built by the pipeline.
132 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
133 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
134 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
135 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800136 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800137 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800138 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800139 ],
140 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800141 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800142 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800143 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800144 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800145 &quot;A String&quot;,
146 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800147 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800148 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800149 &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.
150 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
151 &quot;a_key&quot;: &quot;A String&quot;,
152 },
153 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
154 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value.
155 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
156 &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.
157 &quot;a_key&quot;: &quot;A String&quot;,
158 },
159 },
160 ],
161 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
162 &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.
163 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
164 { # A step in the build pipeline.
165 &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;.
166 &quot;A String&quot;,
167 ],
168 &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.
169 &quot;A String&quot;,
170 ],
171 &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.
172 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
173 &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.
174 &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.
175 },
176 ],
177 &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.
178 &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.
179 &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.
180 &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.
181 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
182 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
183 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
184 },
185 &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.
186 &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.
187 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
188 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
189 },
190 &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.
191 &quot;A String&quot;,
192 ],
193 &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`.
194 &quot;A String&quot;,
195 ],
196 &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.
197 },
198 ],
199 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
200 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
201 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
202 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
203 &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`.
204 &quot;A String&quot;,
205 ],
206 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
207 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
208 &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.
209 &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.
210 &quot;A String&quot;,
211 ],
212 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
213 &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.
214 &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.
215 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
216 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
217 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
218 &quot;A String&quot;,
219 ],
220 &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.
221 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700222 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
223 &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.
224 &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.
225 },
226 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800227 &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;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800228 &quot;A String&quot;,
229 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700230 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800231 &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`.
232 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
233 &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.
234 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
235 &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.
236 &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
237 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
238 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
239 &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.
240 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
241 &quot;a_key&quot;: &quot;A String&quot;,
242 },
243 &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
244 },
245 &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.
246 &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.
247 &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.
248 &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)).
249 },
250 },
251 &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.
252 &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.
253 &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.
254 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
255 &quot;A String&quot;,
256 ],
257 &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.
258 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
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 },
263 &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.
264 &quot;A String&quot;,
265 ],
266 },
267 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
268 &quot;A String&quot;,
269 ],
270 &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.
271 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
272 &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.
273 &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.
274 &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.
275 &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.
276 &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)).
277 },
278 &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.
279 &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.
280 &quot;fileHash&quot;: [ # Collection of file hashes.
281 { # Container message for hash values.
282 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
283 &quot;value&quot;: &quot;A String&quot;, # The hash value.
284 },
285 ],
286 },
287 },
288 &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.
289 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
290 &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.
291 &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
292 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
293 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
294 &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.
295 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
296 &quot;a_key&quot;: &quot;A String&quot;,
297 },
298 &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
299 },
300 },
301 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
302 &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.
303 &quot;a_key&quot;: { # Start and end times for a build execution phase.
304 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
305 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
306 },
307 },
308 }</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700309</div>
310
311<div class="method">
312 <code class="details" id="close">close()</code>
313 <pre>Close httplib2 connections.</pre>
314</div>
315
316<div class="method">
317 <code class="details" id="create">create(parent, body=None, projectId=None, x__xgafv=None)</code>
318 <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`).
319
320Args:
321 parent: string, The parent resource where this build will be created. Format: `projects/{project}/locations/{location}` (required)
322 body: object, The request body.
323 The object takes the form of:
324
325{ # 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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800326 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
327 &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.
328 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
329 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
330 &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.
331 &quot;A String&quot;,
332 ],
333 &quot;images&quot;: [ # Container images that were built as a part of the build.
334 { # An image built by the pipeline.
335 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
336 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
337 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
338 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800339 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800340 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800341 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800342 ],
343 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800344 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
345 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
346 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800347 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800348 &quot;A String&quot;,
349 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800350 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800351 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800352 &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.
353 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
354 &quot;a_key&quot;: &quot;A String&quot;,
355 },
356 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
357 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value.
358 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
359 &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.
360 &quot;a_key&quot;: &quot;A String&quot;,
361 },
362 },
363 ],
364 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
365 &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.
366 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
367 { # A step in the build pipeline.
368 &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;.
369 &quot;A String&quot;,
370 ],
371 &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.
372 &quot;A String&quot;,
373 ],
374 &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.
375 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
376 &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.
377 &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.
378 },
379 ],
380 &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.
381 &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.
382 &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.
383 &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.
384 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
385 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
386 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
387 },
388 &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.
389 &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.
390 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
391 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
392 },
393 &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.
394 &quot;A String&quot;,
395 ],
396 &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`.
397 &quot;A String&quot;,
398 ],
399 &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.
400 },
401 ],
402 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
403 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
404 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
405 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
406 &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`.
407 &quot;A String&quot;,
408 ],
409 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
410 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
411 &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.
412 &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.
413 &quot;A String&quot;,
414 ],
415 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
416 &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.
417 &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.
418 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
419 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
420 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
421 &quot;A String&quot;,
422 ],
423 &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.
424 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800425 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
426 &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.
427 &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.
428 },
429 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800430 &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;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800431 &quot;A String&quot;,
432 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800433 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800434 &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`.
435 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
436 &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.
437 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
438 &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.
439 &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
440 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
441 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
442 &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.
443 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
444 &quot;a_key&quot;: &quot;A String&quot;,
445 },
446 &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
447 },
448 &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.
449 &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.
450 &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.
451 &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)).
452 },
453 },
454 &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.
455 &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.
456 &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.
457 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
458 &quot;A String&quot;,
459 ],
460 &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.
461 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
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 },
466 &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.
467 &quot;A String&quot;,
468 ],
469 },
470 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
471 &quot;A String&quot;,
472 ],
473 &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.
474 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
475 &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.
476 &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.
477 &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.
478 &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.
479 &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)).
480 },
481 &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.
482 &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.
483 &quot;fileHash&quot;: [ # Collection of file hashes.
484 { # Container message for hash values.
485 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
486 &quot;value&quot;: &quot;A String&quot;, # The hash value.
487 },
488 ],
489 },
490 },
491 &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.
492 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
493 &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.
494 &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
495 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
496 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
497 &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.
498 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
499 &quot;a_key&quot;: &quot;A String&quot;,
500 },
501 &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
502 },
503 },
504 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
505 &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.
506 &quot;a_key&quot;: { # Start and end times for a build execution phase.
507 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
508 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
509 },
510 },
511 }
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800512
513 projectId: string, Required. ID of the project.
514 x__xgafv: string, V1 error format.
515 Allowed values
516 1 - v1 error format
517 2 - v2 error format
518
519Returns:
520 An object of the form:
521
522 { # This resource represents a long-running operation that is the result of a network API call.
523 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800524 &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`.
525 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
526 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800527 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800528 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
529 {
530 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
531 },
532 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800533 &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.
534 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800535 },
536 &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}`.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800537 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800538 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
539 },
540 }</pre>
541</div>
542
543<div class="method">
544 <code class="details" id="get">get(name, id=None, projectId=None, x__xgafv=None)</code>
545 <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.
546
547Args:
548 name: string, The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}` (required)
549 id: string, Required. ID of the build.
550 projectId: string, Required. ID of the project.
551 x__xgafv: string, V1 error format.
552 Allowed values
553 1 - v1 error format
554 2 - v2 error format
555
556Returns:
557 An object of the form:
558
559 { # 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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800560 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
561 &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.
562 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
563 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
564 &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.
565 &quot;A String&quot;,
566 ],
567 &quot;images&quot;: [ # Container images that were built as a part of the build.
568 { # An image built by the pipeline.
569 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
570 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
571 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
572 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800573 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800574 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800575 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800576 ],
577 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800578 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800579 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800580 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800581 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800582 &quot;A String&quot;,
583 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800584 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800585 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800586 &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.
587 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
588 &quot;a_key&quot;: &quot;A String&quot;,
589 },
590 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
591 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value.
592 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
593 &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.
594 &quot;a_key&quot;: &quot;A String&quot;,
595 },
596 },
597 ],
598 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
599 &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.
600 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
601 { # A step in the build pipeline.
602 &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;.
603 &quot;A String&quot;,
604 ],
605 &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.
606 &quot;A String&quot;,
607 ],
608 &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.
609 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
610 &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.
611 &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.
612 },
613 ],
614 &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.
615 &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.
616 &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.
617 &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.
618 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
619 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
620 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
621 },
622 &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.
623 &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.
624 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
625 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
626 },
627 &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.
628 &quot;A String&quot;,
629 ],
630 &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`.
631 &quot;A String&quot;,
632 ],
633 &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.
634 },
635 ],
636 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
637 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
638 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
639 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
640 &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`.
641 &quot;A String&quot;,
642 ],
643 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
644 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
645 &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.
646 &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.
647 &quot;A String&quot;,
648 ],
649 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
650 &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.
651 &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.
652 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
653 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
654 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
655 &quot;A String&quot;,
656 ],
657 &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.
658 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700659 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
660 &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.
661 &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.
662 },
663 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800664 &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;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800665 &quot;A String&quot;,
666 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700667 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800668 &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`.
669 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
670 &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.
671 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
672 &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.
673 &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
674 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
675 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
676 &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.
677 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
678 &quot;a_key&quot;: &quot;A String&quot;,
679 },
680 &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
681 },
682 &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.
683 &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.
684 &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.
685 &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)).
686 },
687 },
688 &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.
689 &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.
690 &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.
691 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
692 &quot;A String&quot;,
693 ],
694 &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.
695 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
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 },
700 &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.
701 &quot;A String&quot;,
702 ],
703 },
704 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
705 &quot;A String&quot;,
706 ],
707 &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.
708 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
709 &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.
710 &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.
711 &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.
712 &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.
713 &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)).
714 },
715 &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.
716 &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.
717 &quot;fileHash&quot;: [ # Collection of file hashes.
718 { # Container message for hash values.
719 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
720 &quot;value&quot;: &quot;A String&quot;, # The hash value.
721 },
722 ],
723 },
724 },
725 &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.
726 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
727 &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.
728 &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
729 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
730 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
731 &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.
732 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
733 &quot;a_key&quot;: &quot;A String&quot;,
734 },
735 &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
736 },
737 },
738 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
739 &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.
740 &quot;a_key&quot;: { # Start and end times for a build execution phase.
741 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
742 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
743 },
744 },
745 }</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700746</div>
747
748<div class="method">
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800749 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, projectId=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700750 <pre>Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
751
752Args:
753 parent: string, The parent of the collection of `Builds`. Format: `projects/{project}/locations/location` (required)
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800754 filter: string, The raw filter text to constrain the results.
755 pageSize: integer, Number of results to return in the list.
756 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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800757 projectId: string, Required. ID of the project.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700758 x__xgafv: string, V1 error format.
759 Allowed values
760 1 - v1 error format
761 2 - v2 error format
762
763Returns:
764 An object of the form:
765
766 { # Response including listed builds.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700767 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700768 &quot;builds&quot;: [ # Builds will be sorted by `create_time`, descending.
769 { # 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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800770 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the build.
771 &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.
772 &quot;results&quot;: { # Artifacts created by the build pipeline. # Output only. Results of the build.
773 &quot;artifactManifest&quot;: &quot;A String&quot;, # Path to the artifact manifest. Only populated when artifacts are uploaded.
774 &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.
775 &quot;A String&quot;,
776 ],
777 &quot;images&quot;: [ # Container images that were built as a part of the build.
778 { # An image built by the pipeline.
779 &quot;digest&quot;: &quot;A String&quot;, # Docker Registry 2.0 digest.
780 &quot;pushTiming&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image.
781 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
782 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800783 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800784 &quot;name&quot;: &quot;A String&quot;, # Name used to push the container image to Google Container Registry, as presented to `docker push`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800785 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800786 ],
787 &quot;artifactTiming&quot;: { # Start and end times for a build execution phase. # Time to push all non-container artifacts.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800788 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800789 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800790 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800791 &quot;buildStepImages&quot;: [ # List of build step digests, in the order corresponding to build step indices.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800792 &quot;A String&quot;,
793 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800794 &quot;numArtifacts&quot;: &quot;A String&quot;, # Number of artifacts uploaded. Only populated when artifacts are uploaded.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800795 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800796 &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.
797 &quot;substitutions&quot;: { # Substitutions data for `Build` resource.
798 &quot;a_key&quot;: &quot;A String&quot;,
799 },
800 &quot;secrets&quot;: [ # Secrets to decrypt using Cloud Key Management Service.
801 { # Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value.
802 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Cloud KMS key name to use to decrypt these envs.
803 &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.
804 &quot;a_key&quot;: &quot;A String&quot;,
805 },
806 },
807 ],
808 &quot;statusDetail&quot;: &quot;A String&quot;, # Output only. Customer-readable message about the current status.
809 &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.
810 &quot;steps&quot;: [ # Required. The operations to be performed on the workspace.
811 { # A step in the build pipeline.
812 &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;.
813 &quot;A String&quot;,
814 ],
815 &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.
816 &quot;A String&quot;,
817 ],
818 &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.
819 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
820 &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.
821 &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.
822 },
823 ],
824 &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.
825 &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.
826 &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.
827 &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.
828 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step.
829 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
830 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
831 },
832 &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.
833 &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.
834 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
835 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
836 },
837 &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.
838 &quot;A String&quot;,
839 ],
840 &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`.
841 &quot;A String&quot;,
842 ],
843 &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.
844 },
845 ],
846 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time at which the request to create the build was received.
847 &quot;projectId&quot;: &quot;A String&quot;, # Output only. ID of the project.
848 &quot;id&quot;: &quot;A String&quot;, # Output only. Unique identifier of the build.
849 &quot;buildTriggerId&quot;: &quot;A String&quot;, # Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.
850 &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`.
851 &quot;A String&quot;,
852 ],
853 &quot;options&quot;: { # Optional arguments to enable specific features of builds. # Special options for this build.
854 &quot;machineType&quot;: &quot;A String&quot;, # Compute Engine machine type on which to run the build.
855 &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.
856 &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.
857 &quot;A String&quot;,
858 ],
859 &quot;logging&quot;: &quot;A String&quot;, # Option to specify the logging mode, which determines if and where build logs are stored.
860 &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.
861 &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.
862 &quot;logStreamingOption&quot;: &quot;A String&quot;, # Option to define build log streaming behavior to Google Cloud Storage.
863 &quot;requestedVerifyOption&quot;: &quot;A String&quot;, # Requested verifiability options.
864 &quot;sourceProvenanceHash&quot;: [ # Requested hash for SourceProvenance.
865 &quot;A String&quot;,
866 ],
867 &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.
868 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700869 { # Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
870 &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.
871 &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.
872 },
873 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800874 &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;.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800875 &quot;A String&quot;,
876 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700877 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800878 &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`.
879 &quot;source&quot;: { # Location of the source in a supported storage service. # The location of the source files to build.
880 &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.
881 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
882 &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.
883 &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
884 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
885 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
886 &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.
887 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
888 &quot;a_key&quot;: &quot;A String&quot;,
889 },
890 &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
891 },
892 &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.
893 &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.
894 &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.
895 &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)).
896 },
897 },
898 &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.
899 &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.
900 &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.
901 &quot;paths&quot;: [ # Path globs used to match files in the build&#x27;s workspace.
902 &quot;A String&quot;,
903 ],
904 &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.
905 &quot;timing&quot;: { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects.
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 },
910 &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.
911 &quot;A String&quot;,
912 ],
913 },
914 &quot;tags&quot;: [ # Tags for annotation of a `Build`. These are not docker tags.
915 &quot;A String&quot;,
916 ],
917 &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.
918 &quot;logUrl&quot;: &quot;A String&quot;, # Output only. URL to logs for this build in Google Cloud Console.
919 &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.
920 &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.
921 &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.
922 &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.
923 &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)).
924 },
925 &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.
926 &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.
927 &quot;fileHash&quot;: [ # Collection of file hashes.
928 { # Container message for hash values.
929 &quot;type&quot;: &quot;A String&quot;, # The type of hash that was performed.
930 &quot;value&quot;: &quot;A String&quot;, # The hash value.
931 },
932 ],
933 },
934 },
935 &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.
936 &quot;invertRegex&quot;: True or False, # Only trigger a build if the revision regex does NOT match the revision regex.
937 &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.
938 &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
939 &quot;repoName&quot;: &quot;A String&quot;, # Required. Name of the Cloud Source Repository.
940 &quot;commitSha&quot;: &quot;A String&quot;, # Explicit commit SHA to build.
941 &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.
942 &quot;substitutions&quot;: { # Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
943 &quot;a_key&quot;: &quot;A String&quot;,
944 },
945 &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
946 },
947 },
948 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time at which execution of the build was started.
949 &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.
950 &quot;a_key&quot;: { # Start and end times for a build execution phase.
951 &quot;startTime&quot;: &quot;A String&quot;, # Start of time span.
952 &quot;endTime&quot;: &quot;A String&quot;, # End of time span.
953 },
954 },
955 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700956 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700957 }</pre>
958</div>
959
960<div class="method">
961 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
962 <pre>Retrieves the next page of results.
963
964Args:
965 previous_request: The request for the previous page. (required)
966 previous_response: The response from the request for the previous page. (required)
967
968Returns:
969 A request object that you can call &#x27;execute()&#x27; on to request the next
970 page. Returns None if there are no more items in the collection.
971 </pre>
972</div>
973
974<div class="method">
975 <code class="details" id="retry">retry(name, body=None, x__xgafv=None)</code>
976 <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.
977
978Args:
979 name: string, The name of the `Build` to retry. Format: `projects/{project}/locations/{location}/builds/{build}` (required)
980 body: object, The request body.
981 The object takes the form of:
982
983{ # Specifies a build to retry.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800984 &quot;projectId&quot;: &quot;A String&quot;, # Required. ID of the project.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700985 &quot;id&quot;: &quot;A String&quot;, # Required. Build ID of the original build.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700986 &quot;name&quot;: &quot;A String&quot;, # The name of the `Build` to retry. Format: `projects/{project}/locations/{location}/builds/{build}`
987 }
988
989 x__xgafv: string, V1 error format.
990 Allowed values
991 1 - v1 error format
992 2 - v2 error format
993
994Returns:
995 An object of the form:
996
997 { # This resource represents a long-running operation that is the result of a network API call.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800998 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800999 &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`.
1000 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1001 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001002 &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 -07001003 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1004 {
1005 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1006 },
1007 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001008 &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.
1009 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001010 },
1011 &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}`.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001012 &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.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001013 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1014 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001015 }</pre>
1016</div>
1017
1018</body></html>