blob: faeeb52495acaa07b205c5ba3e753364fe3897b5 [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="cloudbuild_v1.html">Google Cloud Container Builder API</a> . <a href="cloudbuild_v1.projects.html">projects</a> . <a href="cloudbuild_v1.projects.builds.html">builds</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#cancel">cancel(projectId, id, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Cancels a requested build in progress.</p>
80<p class="toc_element">
81 <code><a href="#create">create(projectId, body, x__xgafv=None)</a></code></p>
82<p class="firstline">Starts a build with the specified configuration.</p>
83<p class="toc_element">
84 <code><a href="#get">get(projectId, id, x__xgafv=None)</a></code></p>
85<p class="firstline">Returns information about a previously requested build.</p>
86<p class="toc_element">
87 <code><a href="#list">list(projectId, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Lists previously requested builds.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="cancel">cancel(projectId, id, body, x__xgafv=None)</code>
95 <pre>Cancels a requested build in progress.
96
97Args:
98 projectId: string, ID of the project. (required)
99 id: string, ID of the build. (required)
100 body: object, The request body. (required)
101 The object takes the form of:
102
103{ # Request to cancel an ongoing build.
104 }
105
106 x__xgafv: string, V1 error format.
107 Allowed values
108 1 - v1 error format
109 2 - v2 error format
110
111Returns:
112 An object of the form:
113
114 { # A build resource in the Container Builder API.
115 #
116 # At a high level, a Build describes where to find source code, how to build
117 # it (for example, the builder image to run on the source), and what tag to
118 # apply to the built image when it is pushed to Google Container Registry.
119 "status": "A String", # Status of the build.
120 # @OutputOnly
121 "finishTime": "A String", # Time at which execution of the build was finished.
122 # @OutputOnly
123 "startTime": "A String", # Time at which execution of the build was started.
124 # @OutputOnly
125 "statusDetail": "A String", # Customer-readable message about the current status.
126 # @OutputOnly
127 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
128 # [Bucket Name
129 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
130 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
131 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
132 # @OutputOnly
133 "images": [ # Images that were built as a part of the build.
134 { # BuiltImage describes an image built by the pipeline.
135 "name": "A String", # Name used to push the container image to Google Container Registry, as
136 # presented to `docker push`.
137 "digest": "A String", # Docker Registry 2.0 digest.
138 },
139 ],
140 },
141 "createTime": "A String", # Time at which the build was created.
142 # @OutputOnly
143 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
144 # service.
145 "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud
146 # Storage.
147 # Google Cloud Storage.
148 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
149 # omitted, the latest generation will be used.
150 "object": "A String", # Google Cloud Storage object containing source.
151 #
152 # This object must be a gzipped archive file (.tar.gz) containing source to
153 # build.
154 "bucket": "A String", # Google Cloud Storage bucket containing source (see
155 # [Bucket Name
156 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
157 },
158 },
159 "steps": [ # Describes the operations to be performed on the workspace.
160 { # BuildStep describes a step to perform in the build pipeline.
161 "args": [ # Command-line arguments to use when running this step's container.
162 "A String",
163 ],
164 "name": "A String", # Name of the container image to use for creating this stage in the
165 # pipeline, as presented to `docker pull`.
166 "dir": "A String", # Working directory (relative to project source root) to use when running
167 # this operation's container.
168 "env": [ # Additional environment variables to set for this step's container.
169 "A String",
170 ],
171 },
172 ],
173 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
174 # granularity. If this amount of time elapses, work on the build will cease
175 # and the build status will be TIMEOUT.
176 #
177 # Default time is ten minutes.
178 "projectId": "A String", # ID of the project.
179 # @OutputOnly.
180 "images": [ # List of images expected to be built and pushed to Google Container
181 # Registry. If an image is listed here and the image is not produced by
182 # one of the build steps, the build will fail. Any images present when
183 # the build steps are complete will be pushed to Container Registry.
184 "A String",
185 ],
186 "id": "A String", # Unique identifier of the build.
187 # @OutputOnly
188 }</pre>
189</div>
190
191<div class="method">
192 <code class="details" id="create">create(projectId, body, x__xgafv=None)</code>
193 <pre>Starts a build with the specified configuration.
194
195The long-running Operation returned by this method will include the ID of
196the build, which can be passed to GetBuild to determine its status (e.g.,
197success or failure).
198
199Args:
200 projectId: string, ID of the project. (required)
201 body: object, The request body. (required)
202 The object takes the form of:
203
204{ # A build resource in the Container Builder API.
205 #
206 # At a high level, a Build describes where to find source code, how to build
207 # it (for example, the builder image to run on the source), and what tag to
208 # apply to the built image when it is pushed to Google Container Registry.
209 "status": "A String", # Status of the build.
210 # @OutputOnly
211 "finishTime": "A String", # Time at which execution of the build was finished.
212 # @OutputOnly
213 "startTime": "A String", # Time at which execution of the build was started.
214 # @OutputOnly
215 "statusDetail": "A String", # Customer-readable message about the current status.
216 # @OutputOnly
217 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
218 # [Bucket Name
219 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
220 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
221 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
222 # @OutputOnly
223 "images": [ # Images that were built as a part of the build.
224 { # BuiltImage describes an image built by the pipeline.
225 "name": "A String", # Name used to push the container image to Google Container Registry, as
226 # presented to `docker push`.
227 "digest": "A String", # Docker Registry 2.0 digest.
228 },
229 ],
230 },
231 "createTime": "A String", # Time at which the build was created.
232 # @OutputOnly
233 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
234 # service.
235 "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud
236 # Storage.
237 # Google Cloud Storage.
238 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
239 # omitted, the latest generation will be used.
240 "object": "A String", # Google Cloud Storage object containing source.
241 #
242 # This object must be a gzipped archive file (.tar.gz) containing source to
243 # build.
244 "bucket": "A String", # Google Cloud Storage bucket containing source (see
245 # [Bucket Name
246 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
247 },
248 },
249 "steps": [ # Describes the operations to be performed on the workspace.
250 { # BuildStep describes a step to perform in the build pipeline.
251 "args": [ # Command-line arguments to use when running this step's container.
252 "A String",
253 ],
254 "name": "A String", # Name of the container image to use for creating this stage in the
255 # pipeline, as presented to `docker pull`.
256 "dir": "A String", # Working directory (relative to project source root) to use when running
257 # this operation's container.
258 "env": [ # Additional environment variables to set for this step's container.
259 "A String",
260 ],
261 },
262 ],
263 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
264 # granularity. If this amount of time elapses, work on the build will cease
265 # and the build status will be TIMEOUT.
266 #
267 # Default time is ten minutes.
268 "projectId": "A String", # ID of the project.
269 # @OutputOnly.
270 "images": [ # List of images expected to be built and pushed to Google Container
271 # Registry. If an image is listed here and the image is not produced by
272 # one of the build steps, the build will fail. Any images present when
273 # the build steps are complete will be pushed to Container Registry.
274 "A String",
275 ],
276 "id": "A String", # Unique identifier of the build.
277 # @OutputOnly
278}
279
280 x__xgafv: string, V1 error format.
281 Allowed values
282 1 - v1 error format
283 2 - v2 error format
284
285Returns:
286 An object of the form:
287
288 { # This resource represents a long-running operation that is the result of a
289 # network API call.
290 "metadata": { # Service-specific metadata associated with the operation. It typically
291 # contains progress information and common metadata such as create time.
292 # Some services might not provide such metadata. Any method that returns a
293 # long-running operation should document the metadata type, if any.
294 "a_key": "", # Properties of the object. Contains field @ype with type URL.
295 },
296 "done": True or False, # If the value is `false`, it means the operation is still in progress.
297 # If true, the operation is completed, and either `error` or `response` is
298 # available.
299 "response": { # The normal response of the operation in case of success. If the original
300 # method returns no data on success, such as `Delete`, the response is
301 # `google.protobuf.Empty`. If the original method is standard
302 # `Get`/`Create`/`Update`, the response should be the resource. For other
303 # methods, the response should have the type `XxxResponse`, where `Xxx`
304 # is the original method name. For example, if the original method name
305 # is `TakeSnapshot()`, the inferred response type is
306 # `TakeSnapshotResponse`.
307 "a_key": "", # Properties of the object. Contains field @ype with type URL.
308 },
309 "name": "A String", # The server-assigned name, which is only unique within the same service that
310 # originally returns it. If you use the default HTTP mapping, the
311 # `name` should have the format of `operations/some/unique/name`.
312 "error": { # The `Status` type defines a logical error model that is suitable for different # The error result of the operation in case of failure.
313 # programming environments, including REST APIs and RPC APIs. It is used by
314 # [gRPC](https://github.com/grpc). The error model is designed to be:
315 #
316 # - Simple to use and understand for most users
317 # - Flexible enough to meet unexpected needs
318 #
319 # # Overview
320 #
321 # The `Status` message contains three pieces of data: error code, error message,
322 # and error details. The error code should be an enum value of
323 # google.rpc.Code, but it may accept additional error codes if needed. The
324 # error message should be a developer-facing English message that helps
325 # developers *understand* and *resolve* the error. If a localized user-facing
326 # error message is needed, put the localized message in the error details or
327 # localize it in the client. The optional error details may contain arbitrary
328 # information about the error. There is a predefined set of error detail types
329 # in the package `google.rpc` which can be used for common error conditions.
330 #
331 # # Language mapping
332 #
333 # The `Status` message is the logical representation of the error model, but it
334 # is not necessarily the actual wire format. When the `Status` message is
335 # exposed in different client libraries and different wire protocols, it can be
336 # mapped differently. For example, it will likely be mapped to some exceptions
337 # in Java, but more likely mapped to some error codes in C.
338 #
339 # # Other uses
340 #
341 # The error model and the `Status` message can be used in a variety of
342 # environments, either with or without APIs, to provide a
343 # consistent developer experience across different environments.
344 #
345 # Example uses of this error model include:
346 #
347 # - Partial errors. If a service needs to return partial errors to the client,
348 # it may embed the `Status` in the normal response to indicate the partial
349 # errors.
350 #
351 # - Workflow errors. A typical workflow has multiple steps. Each step may
352 # have a `Status` message for error reporting purpose.
353 #
354 # - Batch operations. If a client uses batch request and batch response, the
355 # `Status` message should be used directly inside batch response, one for
356 # each error sub-response.
357 #
358 # - Asynchronous operations. If an API call embeds asynchronous operation
359 # results in its response, the status of those operations should be
360 # represented directly using the `Status` message.
361 #
362 # - Logging. If some API errors are stored in logs, the message `Status` could
363 # be used directly after any stripping needed for security/privacy reasons.
364 "message": "A String", # A developer-facing error message, which should be in English. Any
365 # user-facing error message should be localized and sent in the
366 # google.rpc.Status.details field, or localized by the client.
367 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
368 "details": [ # A list of messages that carry the error details. There will be a
369 # common set of message types for APIs to use.
370 {
371 "a_key": "", # Properties of the object. Contains field @ype with type URL.
372 },
373 ],
374 },
375 }</pre>
376</div>
377
378<div class="method">
379 <code class="details" id="get">get(projectId, id, x__xgafv=None)</code>
380 <pre>Returns information about a previously requested build.
381
382The Build that is returned includes its status (e.g., success or failure,
383or in-progress), and timing information.
384
385Args:
386 projectId: string, ID of the project. (required)
387 id: string, ID of the build. (required)
388 x__xgafv: string, V1 error format.
389 Allowed values
390 1 - v1 error format
391 2 - v2 error format
392
393Returns:
394 An object of the form:
395
396 { # A build resource in the Container Builder API.
397 #
398 # At a high level, a Build describes where to find source code, how to build
399 # it (for example, the builder image to run on the source), and what tag to
400 # apply to the built image when it is pushed to Google Container Registry.
401 "status": "A String", # Status of the build.
402 # @OutputOnly
403 "finishTime": "A String", # Time at which execution of the build was finished.
404 # @OutputOnly
405 "startTime": "A String", # Time at which execution of the build was started.
406 # @OutputOnly
407 "statusDetail": "A String", # Customer-readable message about the current status.
408 # @OutputOnly
409 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
410 # [Bucket Name
411 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
412 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
413 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
414 # @OutputOnly
415 "images": [ # Images that were built as a part of the build.
416 { # BuiltImage describes an image built by the pipeline.
417 "name": "A String", # Name used to push the container image to Google Container Registry, as
418 # presented to `docker push`.
419 "digest": "A String", # Docker Registry 2.0 digest.
420 },
421 ],
422 },
423 "createTime": "A String", # Time at which the build was created.
424 # @OutputOnly
425 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
426 # service.
427 "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud
428 # Storage.
429 # Google Cloud Storage.
430 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
431 # omitted, the latest generation will be used.
432 "object": "A String", # Google Cloud Storage object containing source.
433 #
434 # This object must be a gzipped archive file (.tar.gz) containing source to
435 # build.
436 "bucket": "A String", # Google Cloud Storage bucket containing source (see
437 # [Bucket Name
438 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
439 },
440 },
441 "steps": [ # Describes the operations to be performed on the workspace.
442 { # BuildStep describes a step to perform in the build pipeline.
443 "args": [ # Command-line arguments to use when running this step's container.
444 "A String",
445 ],
446 "name": "A String", # Name of the container image to use for creating this stage in the
447 # pipeline, as presented to `docker pull`.
448 "dir": "A String", # Working directory (relative to project source root) to use when running
449 # this operation's container.
450 "env": [ # Additional environment variables to set for this step's container.
451 "A String",
452 ],
453 },
454 ],
455 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
456 # granularity. If this amount of time elapses, work on the build will cease
457 # and the build status will be TIMEOUT.
458 #
459 # Default time is ten minutes.
460 "projectId": "A String", # ID of the project.
461 # @OutputOnly.
462 "images": [ # List of images expected to be built and pushed to Google Container
463 # Registry. If an image is listed here and the image is not produced by
464 # one of the build steps, the build will fail. Any images present when
465 # the build steps are complete will be pushed to Container Registry.
466 "A String",
467 ],
468 "id": "A String", # Unique identifier of the build.
469 # @OutputOnly
470 }</pre>
471</div>
472
473<div class="method">
474 <code class="details" id="list">list(projectId, pageSize=None, pageToken=None, x__xgafv=None)</code>
475 <pre>Lists previously requested builds.
476
477Previously requested builds may still be in-progress, or may have finished
478successfully or unsuccessfully.
479
480Args:
481 projectId: string, ID of the project. (required)
482 pageSize: integer, Number of results to return in the list.
483 pageToken: string, Token to provide to skip to a particular spot in the list.
484 x__xgafv: string, V1 error format.
485 Allowed values
486 1 - v1 error format
487 2 - v2 error format
488
489Returns:
490 An object of the form:
491
492 { # Response including listed builds.
493 "nextPageToken": "A String", # Token to receive the next page of results.
494 "builds": [ # Builds will be sorted by create_time, descending.
495 { # A build resource in the Container Builder API.
496 #
497 # At a high level, a Build describes where to find source code, how to build
498 # it (for example, the builder image to run on the source), and what tag to
499 # apply to the built image when it is pushed to Google Container Registry.
500 "status": "A String", # Status of the build.
501 # @OutputOnly
502 "finishTime": "A String", # Time at which execution of the build was finished.
503 # @OutputOnly
504 "startTime": "A String", # Time at which execution of the build was started.
505 # @OutputOnly
506 "statusDetail": "A String", # Customer-readable message about the current status.
507 # @OutputOnly
508 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
509 # [Bucket Name
510 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
511 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
512 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
513 # @OutputOnly
514 "images": [ # Images that were built as a part of the build.
515 { # BuiltImage describes an image built by the pipeline.
516 "name": "A String", # Name used to push the container image to Google Container Registry, as
517 # presented to `docker push`.
518 "digest": "A String", # Docker Registry 2.0 digest.
519 },
520 ],
521 },
522 "createTime": "A String", # Time at which the build was created.
523 # @OutputOnly
524 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
525 # service.
526 "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud
527 # Storage.
528 # Google Cloud Storage.
529 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
530 # omitted, the latest generation will be used.
531 "object": "A String", # Google Cloud Storage object containing source.
532 #
533 # This object must be a gzipped archive file (.tar.gz) containing source to
534 # build.
535 "bucket": "A String", # Google Cloud Storage bucket containing source (see
536 # [Bucket Name
537 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
538 },
539 },
540 "steps": [ # Describes the operations to be performed on the workspace.
541 { # BuildStep describes a step to perform in the build pipeline.
542 "args": [ # Command-line arguments to use when running this step's container.
543 "A String",
544 ],
545 "name": "A String", # Name of the container image to use for creating this stage in the
546 # pipeline, as presented to `docker pull`.
547 "dir": "A String", # Working directory (relative to project source root) to use when running
548 # this operation's container.
549 "env": [ # Additional environment variables to set for this step's container.
550 "A String",
551 ],
552 },
553 ],
554 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
555 # granularity. If this amount of time elapses, work on the build will cease
556 # and the build status will be TIMEOUT.
557 #
558 # Default time is ten minutes.
559 "projectId": "A String", # ID of the project.
560 # @OutputOnly.
561 "images": [ # List of images expected to be built and pushed to Google Container
562 # Registry. If an image is listed here and the image is not produced by
563 # one of the build steps, the build will fail. Any images present when
564 # the build steps are complete will be pushed to Container Registry.
565 "A String",
566 ],
567 "id": "A String", # Unique identifier of the build.
568 # @OutputOnly
569 },
570 ],
571 }</pre>
572</div>
573
574<div class="method">
575 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
576 <pre>Retrieves the next page of results.
577
578Args:
579 previous_request: The request for the previous page. (required)
580 previous_response: The response from the request for the previous page. (required)
581
582Returns:
583 A request object that you can call 'execute()' on to request the next
584 page. Returns None if there are no more items in the collection.
585 </pre>
586</div>
587
588</body></html>