blob: 95aecd562e59e12bf7e3f553dce340d9f3833ce2 [file] [log] [blame]
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
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.triggers.html">triggers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(projectId, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a new BuildTrigger.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(projectId, triggerId, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes an BuildTrigger by its project ID and trigger ID.</p>
83<p class="toc_element">
84 <code><a href="#get">get(projectId, triggerId, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets information about a BuildTrigger.</p>
86<p class="toc_element">
87 <code><a href="#list">list(projectId, x__xgafv=None)</a></code></p>
88<p class="firstline">Lists existing BuildTrigger.</p>
89<p class="toc_element">
90 <code><a href="#patch">patch(projectId, triggerId, body, x__xgafv=None)</a></code></p>
91<p class="firstline">Updates an BuildTrigger by its project ID and trigger ID.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="create">create(projectId, body, x__xgafv=None)</code>
95 <pre>Creates a new BuildTrigger.
96
97This API is experimental.
98
99Args:
100 projectId: string, ID of the project for which to configure automatic builds. (required)
101 body: object, The request body. (required)
102 The object takes the form of:
103
104{ # Configuration for an automated build in response to source repository
105 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700106 "description": "A String", # Human-readable description of this trigger.
107 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700108 #
109 # @OutputOnly
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700110 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
111 # template.
112 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700113 "build": { # A build resource in the Container Builder API. # Contents of the build template.
114 #
115 # At a high level, a Build describes where to find source code, how to build
116 # it (for example, the builder image to run on the source), and what tag to
117 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700118 #
119 # Fields can include the following variables which will be expanded when the
120 # build is created:
121 #
122 # - $PROJECT_ID: the project ID of the build.
123 # - $BUILD_ID: the autogenerated ID of the build.
124 # - $REPO_NAME: the source repository name specified by RepoSource.
125 # - $BRANCH_NAME: the branch name specified by RepoSource.
126 # - $TAG_NAME: the tag name specified by RepoSource.
127 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
128 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700129 "status": "A String", # Status of the build.
130 # @OutputOnly
131 "finishTime": "A String", # Time at which execution of the build was finished.
132 # @OutputOnly
133 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
134 # granularity. If this amount of time elapses, work on the build will cease
135 # and the build status will be TIMEOUT.
136 #
137 # Default time is ten minutes.
138 "statusDetail": "A String", # Customer-readable message about the current status.
139 # @OutputOnly
140 "startTime": "A String", # Time at which execution of the build was started.
141 # @OutputOnly
142 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
143 # [Bucket Name
144 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
145 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
146 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
147 # @OutputOnly
148 "images": [ # Images that were built as a part of the build.
149 { # BuiltImage describes an image built by the pipeline.
150 "name": "A String", # Name used to push the container image to Google Container Registry, as
151 # presented to `docker push`.
152 "digest": "A String", # Docker Registry 2.0 digest.
153 },
154 ],
155 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
156 "A String",
157 ],
158 },
159 "createTime": "A String", # Time at which the build was created.
160 # @OutputOnly
161 "id": "A String", # Unique identifier of the build.
162 # @OutputOnly
163 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
164 # service.
165 "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
166 # Storage.
167 # Google Cloud Storage.
168 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
169 # omitted, the latest generation will be used.
170 "object": "A String", # Google Cloud Storage object containing source.
171 #
172 # This object must be a gzipped archive file (.tar.gz) containing source to
173 # build.
174 "bucket": "A String", # Google Cloud Storage bucket containing source (see
175 # [Bucket Name
176 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
177 },
178 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
179 # Repository.
180 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
181 # the build is assumed.
182 "branchName": "A String", # Name of the branch to build.
183 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
184 "tagName": "A String", # Name of the tag to build.
185 "commitSha": "A String", # Explicit commit SHA to build.
186 },
187 },
188 "steps": [ # Describes the operations to be performed on the workspace.
189 { # BuildStep describes a step to perform in the build pipeline.
190 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
191 # This build step will not start until all the build steps in wait_for
192 # have completed successfully. If wait_for is empty, this build step will
193 # start when all previous build steps in the Build.Steps list have completed
194 # successfully.
195 "A String",
196 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700197 "name": "A String", # The name of the container image that will run this particular build step.
198 #
199 # If the image is already available in the host's
200 # Docker daemon's cache, it will be run directly. If not, the host will
201 # attempt to pull the image first, using the builder service account's
202 # credentials if necessary.
203 #
204 # The Docker daemon's cache will already have the latest versions of all of
205 # the officially supported build steps
206 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
207 # will also have cached many of the layers for some popular images, like
208 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
209 # use them.
210 #
211 # If you built an image in a previous build step, it will be stored in the
212 # host's Docker daemon's cache and is available to use as the name for a
213 # later build step.
214 "args": [ # A list of arguments that will be presented to the step when it is started.
215 #
216 # If the image used to run the step's container has an entrypoint, these args
217 # will be used as arguments to that entrypoint. If the image does not define
218 # an entrypoint, the first element in args will be used as the entrypoint,
219 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700220 "A String",
221 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700222 "env": [ # A list of environment variable definitions to be used when running a step.
223 #
224 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
225 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700226 "A String",
227 ],
228 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
229 # reference this build step as a dependency.
230 "dir": "A String", # Working directory (relative to project source root) to use when running
231 # this operation's container.
232 },
233 ],
234 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
235 # @OutputOnly
236 # some source was used for this build.
237 "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
238 # revisions resolved.
239 # Repository.
240 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
241 # the build is assumed.
242 "branchName": "A String", # Name of the branch to build.
243 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
244 "tagName": "A String", # Name of the tag to build.
245 "commitSha": "A String", # Explicit commit SHA to build.
246 },
247 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
248 # source integrity was maintained in the build. Note that FileHashes will
249 # only be populated if BuildOptions has requested a SourceProvenanceHash.
250 #
251 # The keys to this map are file paths used as build source and the values
252 # contain the hash values for those files.
253 #
254 # If the build source came in a single package such as a gzipped tarfile
255 # (.tar.gz), the FileHash will be for the single path to that file.
256 # @OutputOnly
257 "a_key": { # Container message for hashes of byte content of files, used in
258 # SourceProvenance messages to verify integrity of source input to the build.
259 "fileHash": [ # Collection of file hashes.
260 { # Container message for hash values.
261 "type": "A String", # The type of hash that was performed.
262 "value": "A String", # The hash value.
263 },
264 ],
265 },
266 },
267 "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
268 # generations resolved.
269 # Google Cloud Storage.
270 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
271 # omitted, the latest generation will be used.
272 "object": "A String", # Google Cloud Storage object containing source.
273 #
274 # This object must be a gzipped archive file (.tar.gz) containing source to
275 # build.
276 "bucket": "A String", # Google Cloud Storage bucket containing source (see
277 # [Bucket Name
278 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
279 },
280 },
281 "projectId": "A String", # ID of the project.
282 # @OutputOnly.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700283 "images": [ # A list of images to be pushed upon the successful completion of all build
284 # steps.
285 #
286 # The images will be pushed using the builder
287 # service account's credentials.
288 #
289 # The digests of the pushed images will be stored in the Build resource's
290 # results field.
291 #
292 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700293 "A String",
294 ],
295 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700296 "requestedVerifyOption": "A String", # Requested verifiability options.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700297 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
298 "A String",
299 ],
300 },
301 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
302 # @OutputOnly
303 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700304 "id": "A String", # Unique identifier of the trigger.
305 #
306 # @OutputOnly
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -0700307 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
308 #
309 # Branch and tag names in trigger templates are interpreted as regular
310 # expressions. Any branch or tag change that matches that regular expression
311 # will trigger a build.
312 # Repository.
313 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
314 # the build is assumed.
315 "branchName": "A String", # Name of the branch to build.
316 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
317 "tagName": "A String", # Name of the tag to build.
318 "commitSha": "A String", # Explicit commit SHA to build.
319 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700320 }
321
322 x__xgafv: string, V1 error format.
323 Allowed values
324 1 - v1 error format
325 2 - v2 error format
326
327Returns:
328 An object of the form:
329
330 { # Configuration for an automated build in response to source repository
331 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700332 "description": "A String", # Human-readable description of this trigger.
333 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700334 #
335 # @OutputOnly
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700336 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
337 # template.
338 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700339 "build": { # A build resource in the Container Builder API. # Contents of the build template.
340 #
341 # At a high level, a Build describes where to find source code, how to build
342 # it (for example, the builder image to run on the source), and what tag to
343 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700344 #
345 # Fields can include the following variables which will be expanded when the
346 # build is created:
347 #
348 # - $PROJECT_ID: the project ID of the build.
349 # - $BUILD_ID: the autogenerated ID of the build.
350 # - $REPO_NAME: the source repository name specified by RepoSource.
351 # - $BRANCH_NAME: the branch name specified by RepoSource.
352 # - $TAG_NAME: the tag name specified by RepoSource.
353 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
354 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700355 "status": "A String", # Status of the build.
356 # @OutputOnly
357 "finishTime": "A String", # Time at which execution of the build was finished.
358 # @OutputOnly
359 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
360 # granularity. If this amount of time elapses, work on the build will cease
361 # and the build status will be TIMEOUT.
362 #
363 # Default time is ten minutes.
364 "statusDetail": "A String", # Customer-readable message about the current status.
365 # @OutputOnly
366 "startTime": "A String", # Time at which execution of the build was started.
367 # @OutputOnly
368 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
369 # [Bucket Name
370 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
371 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
372 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
373 # @OutputOnly
374 "images": [ # Images that were built as a part of the build.
375 { # BuiltImage describes an image built by the pipeline.
376 "name": "A String", # Name used to push the container image to Google Container Registry, as
377 # presented to `docker push`.
378 "digest": "A String", # Docker Registry 2.0 digest.
379 },
380 ],
381 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
382 "A String",
383 ],
384 },
385 "createTime": "A String", # Time at which the build was created.
386 # @OutputOnly
387 "id": "A String", # Unique identifier of the build.
388 # @OutputOnly
389 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
390 # service.
391 "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
392 # Storage.
393 # Google Cloud Storage.
394 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
395 # omitted, the latest generation will be used.
396 "object": "A String", # Google Cloud Storage object containing source.
397 #
398 # This object must be a gzipped archive file (.tar.gz) containing source to
399 # build.
400 "bucket": "A String", # Google Cloud Storage bucket containing source (see
401 # [Bucket Name
402 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
403 },
404 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
405 # Repository.
406 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
407 # the build is assumed.
408 "branchName": "A String", # Name of the branch to build.
409 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
410 "tagName": "A String", # Name of the tag to build.
411 "commitSha": "A String", # Explicit commit SHA to build.
412 },
413 },
414 "steps": [ # Describes the operations to be performed on the workspace.
415 { # BuildStep describes a step to perform in the build pipeline.
416 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
417 # This build step will not start until all the build steps in wait_for
418 # have completed successfully. If wait_for is empty, this build step will
419 # start when all previous build steps in the Build.Steps list have completed
420 # successfully.
421 "A String",
422 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700423 "name": "A String", # The name of the container image that will run this particular build step.
424 #
425 # If the image is already available in the host's
426 # Docker daemon's cache, it will be run directly. If not, the host will
427 # attempt to pull the image first, using the builder service account's
428 # credentials if necessary.
429 #
430 # The Docker daemon's cache will already have the latest versions of all of
431 # the officially supported build steps
432 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
433 # will also have cached many of the layers for some popular images, like
434 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
435 # use them.
436 #
437 # If you built an image in a previous build step, it will be stored in the
438 # host's Docker daemon's cache and is available to use as the name for a
439 # later build step.
440 "args": [ # A list of arguments that will be presented to the step when it is started.
441 #
442 # If the image used to run the step's container has an entrypoint, these args
443 # will be used as arguments to that entrypoint. If the image does not define
444 # an entrypoint, the first element in args will be used as the entrypoint,
445 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700446 "A String",
447 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700448 "env": [ # A list of environment variable definitions to be used when running a step.
449 #
450 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
451 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700452 "A String",
453 ],
454 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
455 # reference this build step as a dependency.
456 "dir": "A String", # Working directory (relative to project source root) to use when running
457 # this operation's container.
458 },
459 ],
460 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
461 # @OutputOnly
462 # some source was used for this build.
463 "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
464 # revisions resolved.
465 # Repository.
466 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
467 # the build is assumed.
468 "branchName": "A String", # Name of the branch to build.
469 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
470 "tagName": "A String", # Name of the tag to build.
471 "commitSha": "A String", # Explicit commit SHA to build.
472 },
473 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
474 # source integrity was maintained in the build. Note that FileHashes will
475 # only be populated if BuildOptions has requested a SourceProvenanceHash.
476 #
477 # The keys to this map are file paths used as build source and the values
478 # contain the hash values for those files.
479 #
480 # If the build source came in a single package such as a gzipped tarfile
481 # (.tar.gz), the FileHash will be for the single path to that file.
482 # @OutputOnly
483 "a_key": { # Container message for hashes of byte content of files, used in
484 # SourceProvenance messages to verify integrity of source input to the build.
485 "fileHash": [ # Collection of file hashes.
486 { # Container message for hash values.
487 "type": "A String", # The type of hash that was performed.
488 "value": "A String", # The hash value.
489 },
490 ],
491 },
492 },
493 "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
494 # generations resolved.
495 # Google Cloud Storage.
496 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
497 # omitted, the latest generation will be used.
498 "object": "A String", # Google Cloud Storage object containing source.
499 #
500 # This object must be a gzipped archive file (.tar.gz) containing source to
501 # build.
502 "bucket": "A String", # Google Cloud Storage bucket containing source (see
503 # [Bucket Name
504 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
505 },
506 },
507 "projectId": "A String", # ID of the project.
508 # @OutputOnly.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700509 "images": [ # A list of images to be pushed upon the successful completion of all build
510 # steps.
511 #
512 # The images will be pushed using the builder
513 # service account's credentials.
514 #
515 # The digests of the pushed images will be stored in the Build resource's
516 # results field.
517 #
518 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700519 "A String",
520 ],
521 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700522 "requestedVerifyOption": "A String", # Requested verifiability options.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700523 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
524 "A String",
525 ],
526 },
527 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
528 # @OutputOnly
529 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700530 "id": "A String", # Unique identifier of the trigger.
531 #
532 # @OutputOnly
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -0700533 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
534 #
535 # Branch and tag names in trigger templates are interpreted as regular
536 # expressions. Any branch or tag change that matches that regular expression
537 # will trigger a build.
538 # Repository.
539 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
540 # the build is assumed.
541 "branchName": "A String", # Name of the branch to build.
542 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
543 "tagName": "A String", # Name of the tag to build.
544 "commitSha": "A String", # Explicit commit SHA to build.
545 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700546 }</pre>
547</div>
548
549<div class="method">
550 <code class="details" id="delete">delete(projectId, triggerId, x__xgafv=None)</code>
551 <pre>Deletes an BuildTrigger by its project ID and trigger ID.
552
553This API is experimental.
554
555Args:
556 projectId: string, ID of the project that owns the trigger. (required)
557 triggerId: string, ID of the BuildTrigger to delete. (required)
558 x__xgafv: string, V1 error format.
559 Allowed values
560 1 - v1 error format
561 2 - v2 error format
562
563Returns:
564 An object of the form:
565
566 { # A generic empty message that you can re-use to avoid defining duplicated
567 # empty messages in your APIs. A typical example is to use it as the request
568 # or the response type of an API method. For instance:
569 #
570 # service Foo {
571 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
572 # }
573 #
574 # The JSON representation for `Empty` is empty JSON object `{}`.
575 }</pre>
576</div>
577
578<div class="method">
579 <code class="details" id="get">get(projectId, triggerId, x__xgafv=None)</code>
580 <pre>Gets information about a BuildTrigger.
581
582This API is experimental.
583
584Args:
585 projectId: string, ID of the project that owns the trigger. (required)
586 triggerId: string, ID of the BuildTrigger to get. (required)
587 x__xgafv: string, V1 error format.
588 Allowed values
589 1 - v1 error format
590 2 - v2 error format
591
592Returns:
593 An object of the form:
594
595 { # Configuration for an automated build in response to source repository
596 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700597 "description": "A String", # Human-readable description of this trigger.
598 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700599 #
600 # @OutputOnly
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700601 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
602 # template.
603 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700604 "build": { # A build resource in the Container Builder API. # Contents of the build template.
605 #
606 # At a high level, a Build describes where to find source code, how to build
607 # it (for example, the builder image to run on the source), and what tag to
608 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700609 #
610 # Fields can include the following variables which will be expanded when the
611 # build is created:
612 #
613 # - $PROJECT_ID: the project ID of the build.
614 # - $BUILD_ID: the autogenerated ID of the build.
615 # - $REPO_NAME: the source repository name specified by RepoSource.
616 # - $BRANCH_NAME: the branch name specified by RepoSource.
617 # - $TAG_NAME: the tag name specified by RepoSource.
618 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
619 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700620 "status": "A String", # Status of the build.
621 # @OutputOnly
622 "finishTime": "A String", # Time at which execution of the build was finished.
623 # @OutputOnly
624 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
625 # granularity. If this amount of time elapses, work on the build will cease
626 # and the build status will be TIMEOUT.
627 #
628 # Default time is ten minutes.
629 "statusDetail": "A String", # Customer-readable message about the current status.
630 # @OutputOnly
631 "startTime": "A String", # Time at which execution of the build was started.
632 # @OutputOnly
633 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
634 # [Bucket Name
635 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
636 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
637 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
638 # @OutputOnly
639 "images": [ # Images that were built as a part of the build.
640 { # BuiltImage describes an image built by the pipeline.
641 "name": "A String", # Name used to push the container image to Google Container Registry, as
642 # presented to `docker push`.
643 "digest": "A String", # Docker Registry 2.0 digest.
644 },
645 ],
646 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
647 "A String",
648 ],
649 },
650 "createTime": "A String", # Time at which the build was created.
651 # @OutputOnly
652 "id": "A String", # Unique identifier of the build.
653 # @OutputOnly
654 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
655 # service.
656 "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
657 # Storage.
658 # Google Cloud Storage.
659 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
660 # omitted, the latest generation will be used.
661 "object": "A String", # Google Cloud Storage object containing source.
662 #
663 # This object must be a gzipped archive file (.tar.gz) containing source to
664 # build.
665 "bucket": "A String", # Google Cloud Storage bucket containing source (see
666 # [Bucket Name
667 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
668 },
669 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
670 # Repository.
671 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
672 # the build is assumed.
673 "branchName": "A String", # Name of the branch to build.
674 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
675 "tagName": "A String", # Name of the tag to build.
676 "commitSha": "A String", # Explicit commit SHA to build.
677 },
678 },
679 "steps": [ # Describes the operations to be performed on the workspace.
680 { # BuildStep describes a step to perform in the build pipeline.
681 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
682 # This build step will not start until all the build steps in wait_for
683 # have completed successfully. If wait_for is empty, this build step will
684 # start when all previous build steps in the Build.Steps list have completed
685 # successfully.
686 "A String",
687 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700688 "name": "A String", # The name of the container image that will run this particular build step.
689 #
690 # If the image is already available in the host's
691 # Docker daemon's cache, it will be run directly. If not, the host will
692 # attempt to pull the image first, using the builder service account's
693 # credentials if necessary.
694 #
695 # The Docker daemon's cache will already have the latest versions of all of
696 # the officially supported build steps
697 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
698 # will also have cached many of the layers for some popular images, like
699 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
700 # use them.
701 #
702 # If you built an image in a previous build step, it will be stored in the
703 # host's Docker daemon's cache and is available to use as the name for a
704 # later build step.
705 "args": [ # A list of arguments that will be presented to the step when it is started.
706 #
707 # If the image used to run the step's container has an entrypoint, these args
708 # will be used as arguments to that entrypoint. If the image does not define
709 # an entrypoint, the first element in args will be used as the entrypoint,
710 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700711 "A String",
712 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700713 "env": [ # A list of environment variable definitions to be used when running a step.
714 #
715 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
716 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700717 "A String",
718 ],
719 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
720 # reference this build step as a dependency.
721 "dir": "A String", # Working directory (relative to project source root) to use when running
722 # this operation's container.
723 },
724 ],
725 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
726 # @OutputOnly
727 # some source was used for this build.
728 "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
729 # revisions resolved.
730 # Repository.
731 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
732 # the build is assumed.
733 "branchName": "A String", # Name of the branch to build.
734 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
735 "tagName": "A String", # Name of the tag to build.
736 "commitSha": "A String", # Explicit commit SHA to build.
737 },
738 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
739 # source integrity was maintained in the build. Note that FileHashes will
740 # only be populated if BuildOptions has requested a SourceProvenanceHash.
741 #
742 # The keys to this map are file paths used as build source and the values
743 # contain the hash values for those files.
744 #
745 # If the build source came in a single package such as a gzipped tarfile
746 # (.tar.gz), the FileHash will be for the single path to that file.
747 # @OutputOnly
748 "a_key": { # Container message for hashes of byte content of files, used in
749 # SourceProvenance messages to verify integrity of source input to the build.
750 "fileHash": [ # Collection of file hashes.
751 { # Container message for hash values.
752 "type": "A String", # The type of hash that was performed.
753 "value": "A String", # The hash value.
754 },
755 ],
756 },
757 },
758 "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
759 # generations resolved.
760 # Google Cloud Storage.
761 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
762 # omitted, the latest generation will be used.
763 "object": "A String", # Google Cloud Storage object containing source.
764 #
765 # This object must be a gzipped archive file (.tar.gz) containing source to
766 # build.
767 "bucket": "A String", # Google Cloud Storage bucket containing source (see
768 # [Bucket Name
769 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
770 },
771 },
772 "projectId": "A String", # ID of the project.
773 # @OutputOnly.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700774 "images": [ # A list of images to be pushed upon the successful completion of all build
775 # steps.
776 #
777 # The images will be pushed using the builder
778 # service account's credentials.
779 #
780 # The digests of the pushed images will be stored in the Build resource's
781 # results field.
782 #
783 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700784 "A String",
785 ],
786 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700787 "requestedVerifyOption": "A String", # Requested verifiability options.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700788 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
789 "A String",
790 ],
791 },
792 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
793 # @OutputOnly
794 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700795 "id": "A String", # Unique identifier of the trigger.
796 #
797 # @OutputOnly
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -0700798 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
799 #
800 # Branch and tag names in trigger templates are interpreted as regular
801 # expressions. Any branch or tag change that matches that regular expression
802 # will trigger a build.
803 # Repository.
804 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
805 # the build is assumed.
806 "branchName": "A String", # Name of the branch to build.
807 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
808 "tagName": "A String", # Name of the tag to build.
809 "commitSha": "A String", # Explicit commit SHA to build.
810 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700811 }</pre>
812</div>
813
814<div class="method">
815 <code class="details" id="list">list(projectId, x__xgafv=None)</code>
816 <pre>Lists existing BuildTrigger.
817
818This API is experimental.
819
820Args:
821 projectId: string, ID of the project for which to list BuildTriggers. (required)
822 x__xgafv: string, V1 error format.
823 Allowed values
824 1 - v1 error format
825 2 - v2 error format
826
827Returns:
828 An object of the form:
829
830 { # Response containing existing BuildTriggers.
831 "triggers": [ # BuildTriggers for the project, sorted by create_time descending.
832 { # Configuration for an automated build in response to source repository
833 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700834 "description": "A String", # Human-readable description of this trigger.
835 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700836 #
837 # @OutputOnly
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700838 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
839 # template.
840 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700841 "build": { # A build resource in the Container Builder API. # Contents of the build template.
842 #
843 # At a high level, a Build describes where to find source code, how to build
844 # it (for example, the builder image to run on the source), and what tag to
845 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700846 #
847 # Fields can include the following variables which will be expanded when the
848 # build is created:
849 #
850 # - $PROJECT_ID: the project ID of the build.
851 # - $BUILD_ID: the autogenerated ID of the build.
852 # - $REPO_NAME: the source repository name specified by RepoSource.
853 # - $BRANCH_NAME: the branch name specified by RepoSource.
854 # - $TAG_NAME: the tag name specified by RepoSource.
855 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
856 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700857 "status": "A String", # Status of the build.
858 # @OutputOnly
859 "finishTime": "A String", # Time at which execution of the build was finished.
860 # @OutputOnly
861 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
862 # granularity. If this amount of time elapses, work on the build will cease
863 # and the build status will be TIMEOUT.
864 #
865 # Default time is ten minutes.
866 "statusDetail": "A String", # Customer-readable message about the current status.
867 # @OutputOnly
868 "startTime": "A String", # Time at which execution of the build was started.
869 # @OutputOnly
870 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
871 # [Bucket Name
872 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
873 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
874 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
875 # @OutputOnly
876 "images": [ # Images that were built as a part of the build.
877 { # BuiltImage describes an image built by the pipeline.
878 "name": "A String", # Name used to push the container image to Google Container Registry, as
879 # presented to `docker push`.
880 "digest": "A String", # Docker Registry 2.0 digest.
881 },
882 ],
883 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
884 "A String",
885 ],
886 },
887 "createTime": "A String", # Time at which the build was created.
888 # @OutputOnly
889 "id": "A String", # Unique identifier of the build.
890 # @OutputOnly
891 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
892 # service.
893 "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
894 # Storage.
895 # Google Cloud Storage.
896 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
897 # omitted, the latest generation will be used.
898 "object": "A String", # Google Cloud Storage object containing source.
899 #
900 # This object must be a gzipped archive file (.tar.gz) containing source to
901 # build.
902 "bucket": "A String", # Google Cloud Storage bucket containing source (see
903 # [Bucket Name
904 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
905 },
906 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
907 # Repository.
908 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
909 # the build is assumed.
910 "branchName": "A String", # Name of the branch to build.
911 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
912 "tagName": "A String", # Name of the tag to build.
913 "commitSha": "A String", # Explicit commit SHA to build.
914 },
915 },
916 "steps": [ # Describes the operations to be performed on the workspace.
917 { # BuildStep describes a step to perform in the build pipeline.
918 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
919 # This build step will not start until all the build steps in wait_for
920 # have completed successfully. If wait_for is empty, this build step will
921 # start when all previous build steps in the Build.Steps list have completed
922 # successfully.
923 "A String",
924 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700925 "name": "A String", # The name of the container image that will run this particular build step.
926 #
927 # If the image is already available in the host's
928 # Docker daemon's cache, it will be run directly. If not, the host will
929 # attempt to pull the image first, using the builder service account's
930 # credentials if necessary.
931 #
932 # The Docker daemon's cache will already have the latest versions of all of
933 # the officially supported build steps
934 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
935 # will also have cached many of the layers for some popular images, like
936 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
937 # use them.
938 #
939 # If you built an image in a previous build step, it will be stored in the
940 # host's Docker daemon's cache and is available to use as the name for a
941 # later build step.
942 "args": [ # A list of arguments that will be presented to the step when it is started.
943 #
944 # If the image used to run the step's container has an entrypoint, these args
945 # will be used as arguments to that entrypoint. If the image does not define
946 # an entrypoint, the first element in args will be used as the entrypoint,
947 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700948 "A String",
949 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700950 "env": [ # A list of environment variable definitions to be used when running a step.
951 #
952 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
953 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700954 "A String",
955 ],
956 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
957 # reference this build step as a dependency.
958 "dir": "A String", # Working directory (relative to project source root) to use when running
959 # this operation's container.
960 },
961 ],
962 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
963 # @OutputOnly
964 # some source was used for this build.
965 "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
966 # revisions resolved.
967 # Repository.
968 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
969 # the build is assumed.
970 "branchName": "A String", # Name of the branch to build.
971 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
972 "tagName": "A String", # Name of the tag to build.
973 "commitSha": "A String", # Explicit commit SHA to build.
974 },
975 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
976 # source integrity was maintained in the build. Note that FileHashes will
977 # only be populated if BuildOptions has requested a SourceProvenanceHash.
978 #
979 # The keys to this map are file paths used as build source and the values
980 # contain the hash values for those files.
981 #
982 # If the build source came in a single package such as a gzipped tarfile
983 # (.tar.gz), the FileHash will be for the single path to that file.
984 # @OutputOnly
985 "a_key": { # Container message for hashes of byte content of files, used in
986 # SourceProvenance messages to verify integrity of source input to the build.
987 "fileHash": [ # Collection of file hashes.
988 { # Container message for hash values.
989 "type": "A String", # The type of hash that was performed.
990 "value": "A String", # The hash value.
991 },
992 ],
993 },
994 },
995 "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
996 # generations resolved.
997 # Google Cloud Storage.
998 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
999 # omitted, the latest generation will be used.
1000 "object": "A String", # Google Cloud Storage object containing source.
1001 #
1002 # This object must be a gzipped archive file (.tar.gz) containing source to
1003 # build.
1004 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1005 # [Bucket Name
1006 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1007 },
1008 },
1009 "projectId": "A String", # ID of the project.
1010 # @OutputOnly.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001011 "images": [ # A list of images to be pushed upon the successful completion of all build
1012 # steps.
1013 #
1014 # The images will be pushed using the builder
1015 # service account's credentials.
1016 #
1017 # The digests of the pushed images will be stored in the Build resource's
1018 # results field.
1019 #
1020 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001021 "A String",
1022 ],
1023 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001024 "requestedVerifyOption": "A String", # Requested verifiability options.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001025 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1026 "A String",
1027 ],
1028 },
1029 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
1030 # @OutputOnly
1031 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001032 "id": "A String", # Unique identifier of the trigger.
1033 #
1034 # @OutputOnly
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07001035 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
1036 #
1037 # Branch and tag names in trigger templates are interpreted as regular
1038 # expressions. Any branch or tag change that matches that regular expression
1039 # will trigger a build.
1040 # Repository.
1041 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1042 # the build is assumed.
1043 "branchName": "A String", # Name of the branch to build.
1044 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1045 "tagName": "A String", # Name of the tag to build.
1046 "commitSha": "A String", # Explicit commit SHA to build.
1047 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001048 },
1049 ],
1050 }</pre>
1051</div>
1052
1053<div class="method">
1054 <code class="details" id="patch">patch(projectId, triggerId, body, x__xgafv=None)</code>
1055 <pre>Updates an BuildTrigger by its project ID and trigger ID.
1056
1057This API is experimental.
1058
1059Args:
1060 projectId: string, ID of the project that owns the trigger. (required)
1061 triggerId: string, ID of the BuildTrigger to update. (required)
1062 body: object, The request body. (required)
1063 The object takes the form of:
1064
1065{ # Configuration for an automated build in response to source repository
1066 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001067 "description": "A String", # Human-readable description of this trigger.
1068 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001069 #
1070 # @OutputOnly
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001071 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
1072 # template.
1073 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001074 "build": { # A build resource in the Container Builder API. # Contents of the build template.
1075 #
1076 # At a high level, a Build describes where to find source code, how to build
1077 # it (for example, the builder image to run on the source), and what tag to
1078 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001079 #
1080 # Fields can include the following variables which will be expanded when the
1081 # build is created:
1082 #
1083 # - $PROJECT_ID: the project ID of the build.
1084 # - $BUILD_ID: the autogenerated ID of the build.
1085 # - $REPO_NAME: the source repository name specified by RepoSource.
1086 # - $BRANCH_NAME: the branch name specified by RepoSource.
1087 # - $TAG_NAME: the tag name specified by RepoSource.
1088 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1089 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001090 "status": "A String", # Status of the build.
1091 # @OutputOnly
1092 "finishTime": "A String", # Time at which execution of the build was finished.
1093 # @OutputOnly
1094 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
1095 # granularity. If this amount of time elapses, work on the build will cease
1096 # and the build status will be TIMEOUT.
1097 #
1098 # Default time is ten minutes.
1099 "statusDetail": "A String", # Customer-readable message about the current status.
1100 # @OutputOnly
1101 "startTime": "A String", # Time at which execution of the build was started.
1102 # @OutputOnly
1103 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1104 # [Bucket Name
1105 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1106 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1107 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
1108 # @OutputOnly
1109 "images": [ # Images that were built as a part of the build.
1110 { # BuiltImage describes an image built by the pipeline.
1111 "name": "A String", # Name used to push the container image to Google Container Registry, as
1112 # presented to `docker push`.
1113 "digest": "A String", # Docker Registry 2.0 digest.
1114 },
1115 ],
1116 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
1117 "A String",
1118 ],
1119 },
1120 "createTime": "A String", # Time at which the build was created.
1121 # @OutputOnly
1122 "id": "A String", # Unique identifier of the build.
1123 # @OutputOnly
1124 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
1125 # service.
1126 "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
1127 # Storage.
1128 # Google Cloud Storage.
1129 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1130 # omitted, the latest generation will be used.
1131 "object": "A String", # Google Cloud Storage object containing source.
1132 #
1133 # This object must be a gzipped archive file (.tar.gz) containing source to
1134 # build.
1135 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1136 # [Bucket Name
1137 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1138 },
1139 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
1140 # Repository.
1141 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1142 # the build is assumed.
1143 "branchName": "A String", # Name of the branch to build.
1144 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1145 "tagName": "A String", # Name of the tag to build.
1146 "commitSha": "A String", # Explicit commit SHA to build.
1147 },
1148 },
1149 "steps": [ # Describes the operations to be performed on the workspace.
1150 { # BuildStep describes a step to perform in the build pipeline.
1151 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1152 # This build step will not start until all the build steps in wait_for
1153 # have completed successfully. If wait_for is empty, this build step will
1154 # start when all previous build steps in the Build.Steps list have completed
1155 # successfully.
1156 "A String",
1157 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001158 "name": "A String", # The name of the container image that will run this particular build step.
1159 #
1160 # If the image is already available in the host's
1161 # Docker daemon's cache, it will be run directly. If not, the host will
1162 # attempt to pull the image first, using the builder service account's
1163 # credentials if necessary.
1164 #
1165 # The Docker daemon's cache will already have the latest versions of all of
1166 # the officially supported build steps
1167 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
1168 # will also have cached many of the layers for some popular images, like
1169 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
1170 # use them.
1171 #
1172 # If you built an image in a previous build step, it will be stored in the
1173 # host's Docker daemon's cache and is available to use as the name for a
1174 # later build step.
1175 "args": [ # A list of arguments that will be presented to the step when it is started.
1176 #
1177 # If the image used to run the step's container has an entrypoint, these args
1178 # will be used as arguments to that entrypoint. If the image does not define
1179 # an entrypoint, the first element in args will be used as the entrypoint,
1180 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001181 "A String",
1182 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001183 "env": [ # A list of environment variable definitions to be used when running a step.
1184 #
1185 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1186 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001187 "A String",
1188 ],
1189 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
1190 # reference this build step as a dependency.
1191 "dir": "A String", # Working directory (relative to project source root) to use when running
1192 # this operation's container.
1193 },
1194 ],
1195 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
1196 # @OutputOnly
1197 # some source was used for this build.
1198 "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
1199 # revisions resolved.
1200 # Repository.
1201 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1202 # the build is assumed.
1203 "branchName": "A String", # Name of the branch to build.
1204 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1205 "tagName": "A String", # Name of the tag to build.
1206 "commitSha": "A String", # Explicit commit SHA to build.
1207 },
1208 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
1209 # source integrity was maintained in the build. Note that FileHashes will
1210 # only be populated if BuildOptions has requested a SourceProvenanceHash.
1211 #
1212 # The keys to this map are file paths used as build source and the values
1213 # contain the hash values for those files.
1214 #
1215 # If the build source came in a single package such as a gzipped tarfile
1216 # (.tar.gz), the FileHash will be for the single path to that file.
1217 # @OutputOnly
1218 "a_key": { # Container message for hashes of byte content of files, used in
1219 # SourceProvenance messages to verify integrity of source input to the build.
1220 "fileHash": [ # Collection of file hashes.
1221 { # Container message for hash values.
1222 "type": "A String", # The type of hash that was performed.
1223 "value": "A String", # The hash value.
1224 },
1225 ],
1226 },
1227 },
1228 "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
1229 # generations resolved.
1230 # Google Cloud Storage.
1231 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1232 # omitted, the latest generation will be used.
1233 "object": "A String", # Google Cloud Storage object containing source.
1234 #
1235 # This object must be a gzipped archive file (.tar.gz) containing source to
1236 # build.
1237 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1238 # [Bucket Name
1239 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1240 },
1241 },
1242 "projectId": "A String", # ID of the project.
1243 # @OutputOnly.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001244 "images": [ # A list of images to be pushed upon the successful completion of all build
1245 # steps.
1246 #
1247 # The images will be pushed using the builder
1248 # service account's credentials.
1249 #
1250 # The digests of the pushed images will be stored in the Build resource's
1251 # results field.
1252 #
1253 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001254 "A String",
1255 ],
1256 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001257 "requestedVerifyOption": "A String", # Requested verifiability options.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001258 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1259 "A String",
1260 ],
1261 },
1262 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
1263 # @OutputOnly
1264 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001265 "id": "A String", # Unique identifier of the trigger.
1266 #
1267 # @OutputOnly
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07001268 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
1269 #
1270 # Branch and tag names in trigger templates are interpreted as regular
1271 # expressions. Any branch or tag change that matches that regular expression
1272 # will trigger a build.
1273 # Repository.
1274 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1275 # the build is assumed.
1276 "branchName": "A String", # Name of the branch to build.
1277 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1278 "tagName": "A String", # Name of the tag to build.
1279 "commitSha": "A String", # Explicit commit SHA to build.
1280 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001281 }
1282
1283 x__xgafv: string, V1 error format.
1284 Allowed values
1285 1 - v1 error format
1286 2 - v2 error format
1287
1288Returns:
1289 An object of the form:
1290
1291 { # Configuration for an automated build in response to source repository
1292 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001293 "description": "A String", # Human-readable description of this trigger.
1294 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001295 #
1296 # @OutputOnly
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001297 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
1298 # template.
1299 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001300 "build": { # A build resource in the Container Builder API. # Contents of the build template.
1301 #
1302 # At a high level, a Build describes where to find source code, how to build
1303 # it (for example, the builder image to run on the source), and what tag to
1304 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001305 #
1306 # Fields can include the following variables which will be expanded when the
1307 # build is created:
1308 #
1309 # - $PROJECT_ID: the project ID of the build.
1310 # - $BUILD_ID: the autogenerated ID of the build.
1311 # - $REPO_NAME: the source repository name specified by RepoSource.
1312 # - $BRANCH_NAME: the branch name specified by RepoSource.
1313 # - $TAG_NAME: the tag name specified by RepoSource.
1314 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1315 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001316 "status": "A String", # Status of the build.
1317 # @OutputOnly
1318 "finishTime": "A String", # Time at which execution of the build was finished.
1319 # @OutputOnly
1320 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
1321 # granularity. If this amount of time elapses, work on the build will cease
1322 # and the build status will be TIMEOUT.
1323 #
1324 # Default time is ten minutes.
1325 "statusDetail": "A String", # Customer-readable message about the current status.
1326 # @OutputOnly
1327 "startTime": "A String", # Time at which execution of the build was started.
1328 # @OutputOnly
1329 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1330 # [Bucket Name
1331 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1332 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
1333 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
1334 # @OutputOnly
1335 "images": [ # Images that were built as a part of the build.
1336 { # BuiltImage describes an image built by the pipeline.
1337 "name": "A String", # Name used to push the container image to Google Container Registry, as
1338 # presented to `docker push`.
1339 "digest": "A String", # Docker Registry 2.0 digest.
1340 },
1341 ],
1342 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
1343 "A String",
1344 ],
1345 },
1346 "createTime": "A String", # Time at which the build was created.
1347 # @OutputOnly
1348 "id": "A String", # Unique identifier of the build.
1349 # @OutputOnly
1350 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
1351 # service.
1352 "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
1353 # Storage.
1354 # Google Cloud Storage.
1355 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1356 # omitted, the latest generation will be used.
1357 "object": "A String", # Google Cloud Storage object containing source.
1358 #
1359 # This object must be a gzipped archive file (.tar.gz) containing source to
1360 # build.
1361 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1362 # [Bucket Name
1363 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1364 },
1365 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
1366 # Repository.
1367 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1368 # the build is assumed.
1369 "branchName": "A String", # Name of the branch to build.
1370 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1371 "tagName": "A String", # Name of the tag to build.
1372 "commitSha": "A String", # Explicit commit SHA to build.
1373 },
1374 },
1375 "steps": [ # Describes the operations to be performed on the workspace.
1376 { # BuildStep describes a step to perform in the build pipeline.
1377 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1378 # This build step will not start until all the build steps in wait_for
1379 # have completed successfully. If wait_for is empty, this build step will
1380 # start when all previous build steps in the Build.Steps list have completed
1381 # successfully.
1382 "A String",
1383 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001384 "name": "A String", # The name of the container image that will run this particular build step.
1385 #
1386 # If the image is already available in the host's
1387 # Docker daemon's cache, it will be run directly. If not, the host will
1388 # attempt to pull the image first, using the builder service account's
1389 # credentials if necessary.
1390 #
1391 # The Docker daemon's cache will already have the latest versions of all of
1392 # the officially supported build steps
1393 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
1394 # will also have cached many of the layers for some popular images, like
1395 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
1396 # use them.
1397 #
1398 # If you built an image in a previous build step, it will be stored in the
1399 # host's Docker daemon's cache and is available to use as the name for a
1400 # later build step.
1401 "args": [ # A list of arguments that will be presented to the step when it is started.
1402 #
1403 # If the image used to run the step's container has an entrypoint, these args
1404 # will be used as arguments to that entrypoint. If the image does not define
1405 # an entrypoint, the first element in args will be used as the entrypoint,
1406 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001407 "A String",
1408 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001409 "env": [ # A list of environment variable definitions to be used when running a step.
1410 #
1411 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1412 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001413 "A String",
1414 ],
1415 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
1416 # reference this build step as a dependency.
1417 "dir": "A String", # Working directory (relative to project source root) to use when running
1418 # this operation's container.
1419 },
1420 ],
1421 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
1422 # @OutputOnly
1423 # some source was used for this build.
1424 "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
1425 # revisions resolved.
1426 # Repository.
1427 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1428 # the build is assumed.
1429 "branchName": "A String", # Name of the branch to build.
1430 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1431 "tagName": "A String", # Name of the tag to build.
1432 "commitSha": "A String", # Explicit commit SHA to build.
1433 },
1434 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
1435 # source integrity was maintained in the build. Note that FileHashes will
1436 # only be populated if BuildOptions has requested a SourceProvenanceHash.
1437 #
1438 # The keys to this map are file paths used as build source and the values
1439 # contain the hash values for those files.
1440 #
1441 # If the build source came in a single package such as a gzipped tarfile
1442 # (.tar.gz), the FileHash will be for the single path to that file.
1443 # @OutputOnly
1444 "a_key": { # Container message for hashes of byte content of files, used in
1445 # SourceProvenance messages to verify integrity of source input to the build.
1446 "fileHash": [ # Collection of file hashes.
1447 { # Container message for hash values.
1448 "type": "A String", # The type of hash that was performed.
1449 "value": "A String", # The hash value.
1450 },
1451 ],
1452 },
1453 },
1454 "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
1455 # generations resolved.
1456 # Google Cloud Storage.
1457 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1458 # omitted, the latest generation will be used.
1459 "object": "A String", # Google Cloud Storage object containing source.
1460 #
1461 # This object must be a gzipped archive file (.tar.gz) containing source to
1462 # build.
1463 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1464 # [Bucket Name
1465 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1466 },
1467 },
1468 "projectId": "A String", # ID of the project.
1469 # @OutputOnly.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001470 "images": [ # A list of images to be pushed upon the successful completion of all build
1471 # steps.
1472 #
1473 # The images will be pushed using the builder
1474 # service account's credentials.
1475 #
1476 # The digests of the pushed images will be stored in the Build resource's
1477 # results field.
1478 #
1479 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001480 "A String",
1481 ],
1482 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001483 "requestedVerifyOption": "A String", # Requested verifiability options.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001484 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1485 "A String",
1486 ],
1487 },
1488 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
1489 # @OutputOnly
1490 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001491 "id": "A String", # Unique identifier of the trigger.
1492 #
1493 # @OutputOnly
Jon Wayne Parrott2512a0c2016-08-29 10:21:22 -07001494 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
1495 #
1496 # Branch and tag names in trigger templates are interpreted as regular
1497 # expressions. Any branch or tag change that matches that regular expression
1498 # will trigger a build.
1499 # Repository.
1500 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1501 # the build is assumed.
1502 "branchName": "A String", # Name of the branch to build.
1503 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1504 "tagName": "A String", # Name of the tag to build.
1505 "commitSha": "A String", # Explicit commit SHA to build.
1506 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001507 }</pre>
1508</div>
1509
1510</body></html>