blob: 6ca863a3c3eb4a069709cd56b7863771bfa420a7 [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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400107 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
108 #
109 # Branch and tag names in trigger templates are interpreted as regular
110 # expressions. Any branch or tag change that matches that regular expression
111 # will trigger a build.
112 # Repository.
113 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
114 # the build is assumed.
115 "branchName": "A String", # Name of the branch to build.
116 "commitSha": "A String", # Explicit commit SHA to build.
117 "tagName": "A String", # Name of the tag to build.
118 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
119 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700120 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700121 #
122 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400123 "substitutions": { # Substitutions data for Build resource.
124 "a_key": "A String",
125 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700126 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700127 "build": { # A build resource in the Container Builder API. # Contents of the build template.
128 #
129 # At a high level, a Build describes where to find source code, how to build
130 # it (for example, the builder image to run on the source), and what tag to
131 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700132 #
133 # Fields can include the following variables which will be expanded when the
134 # build is created:
135 #
136 # - $PROJECT_ID: the project ID of the build.
137 # - $BUILD_ID: the autogenerated ID of the build.
138 # - $REPO_NAME: the source repository name specified by RepoSource.
139 # - $BRANCH_NAME: the branch name specified by RepoSource.
140 # - $TAG_NAME: the tag name specified by RepoSource.
141 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
142 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700143 "finishTime": "A String", # Time at which execution of the build was finished.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800144 #
145 # The difference between finish_time and start_time is the duration of the
146 # build's execution.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700147 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400148 "status": "A String", # Status of the build.
149 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700150 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
151 # granularity. If this amount of time elapses, work on the build will cease
152 # and the build status will be TIMEOUT.
153 #
154 # Default time is ten minutes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700155 "startTime": "A String", # Time at which execution of the build was started.
156 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400157 "projectId": "A String", # ID of the project.
158 # @OutputOnly.
159 "id": "A String", # Unique identifier of the build.
160 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700161 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
162 # @OutputOnly
163 "images": [ # Images that were built as a part of the build.
164 { # BuiltImage describes an image built by the pipeline.
165 "name": "A String", # Name used to push the container image to Google Container Registry, as
166 # presented to `docker push`.
167 "digest": "A String", # Docker Registry 2.0 digest.
168 },
169 ],
170 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
171 "A String",
172 ],
173 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400174 "statusDetail": "A String", # Customer-readable message about the current status.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700175 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400176 "substitutions": { # Substitutions data for Build resource.
177 "a_key": "A String",
178 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700179 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
180 # service.
181 "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
182 # Storage.
183 # Google Cloud Storage.
184 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
185 # omitted, the latest generation will be used.
186 "object": "A String", # Google Cloud Storage object containing source.
187 #
188 # This object must be a gzipped archive file (.tar.gz) containing source to
189 # build.
190 "bucket": "A String", # Google Cloud Storage bucket containing source (see
191 # [Bucket Name
192 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
193 },
194 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
195 # Repository.
196 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
197 # the build is assumed.
198 "branchName": "A String", # Name of the branch to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700199 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400200 "tagName": "A String", # Name of the tag to build.
201 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700202 },
203 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800204 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
205 # triggered automatically.
206 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400207 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
208 "requestedVerifyOption": "A String", # Requested verifiability options.
209 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
210 "A String",
211 ],
212 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700213 "steps": [ # Describes the operations to be performed on the workspace.
214 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400215 "args": [ # A list of arguments that will be presented to the step when it is started.
216 #
217 # If the image used to run the step's container has an entrypoint, these args
218 # will be used as arguments to that entrypoint. If the image does not define
219 # an entrypoint, the first element in args will be used as the entrypoint,
220 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700221 "A String",
222 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700223 "name": "A String", # The name of the container image that will run this particular build step.
224 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800225 # If the image is already available in the host's Docker daemon's cache, it
226 # will be run directly. If not, the host will attempt to pull the image
227 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700228 #
229 # The Docker daemon's cache will already have the latest versions of all of
230 # the officially supported build steps
231 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
232 # will also have cached many of the layers for some popular images, like
233 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
234 # use them.
235 #
236 # If you built an image in a previous build step, it will be stored in the
237 # host's Docker daemon's cache and is available to use as the name for a
238 # later build step.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400239 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
240 # This build step will not start until all the build steps in wait_for
241 # have completed successfully. If wait_for is empty, this build step will
242 # start when all previous build steps in the Build.Steps list have completed
243 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700244 "A String",
245 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400246 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
247 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700248 "env": [ # A list of environment variable definitions to be used when running a step.
249 #
250 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
251 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700252 "A String",
253 ],
254 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
255 # reference this build step as a dependency.
256 "dir": "A String", # Working directory (relative to project source root) to use when running
257 # this operation's container.
258 },
259 ],
260 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
261 # @OutputOnly
262 # some source was used for this build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400263 "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
264 # generations resolved.
265 # Google Cloud Storage.
266 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
267 # omitted, the latest generation will be used.
268 "object": "A String", # Google Cloud Storage object containing source.
269 #
270 # This object must be a gzipped archive file (.tar.gz) containing source to
271 # build.
272 "bucket": "A String", # Google Cloud Storage bucket containing source (see
273 # [Bucket Name
274 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700275 },
276 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
277 # source integrity was maintained in the build. Note that FileHashes will
278 # only be populated if BuildOptions has requested a SourceProvenanceHash.
279 #
280 # The keys to this map are file paths used as build source and the values
281 # contain the hash values for those files.
282 #
283 # If the build source came in a single package such as a gzipped tarfile
284 # (.tar.gz), the FileHash will be for the single path to that file.
285 # @OutputOnly
286 "a_key": { # Container message for hashes of byte content of files, used in
287 # SourceProvenance messages to verify integrity of source input to the build.
288 "fileHash": [ # Collection of file hashes.
289 { # Container message for hash values.
290 "type": "A String", # The type of hash that was performed.
291 "value": "A String", # The hash value.
292 },
293 ],
294 },
295 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400296 "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
297 # revisions resolved.
298 # Repository.
299 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
300 # the build is assumed.
301 "branchName": "A String", # Name of the branch to build.
302 "commitSha": "A String", # Explicit commit SHA to build.
303 "tagName": "A String", # Name of the tag to build.
304 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700305 },
306 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400307 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
308 # [Bucket Name
309 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
310 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700311 "images": [ # A list of images to be pushed upon the successful completion of all build
312 # steps.
313 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800314 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700315 #
316 # The digests of the pushed images will be stored in the Build resource's
317 # results field.
318 #
319 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700320 "A String",
321 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400322 "createTime": "A String", # Time at which the request to create the build was received.
323 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700324 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
325 # @OutputOnly
326 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400327 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
328 # template.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700329 "id": "A String", # Unique identifier of the trigger.
330 #
331 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700332 }
333
334 x__xgafv: string, V1 error format.
335 Allowed values
336 1 - v1 error format
337 2 - v2 error format
338
339Returns:
340 An object of the form:
341
342 { # Configuration for an automated build in response to source repository
343 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700344 "description": "A String", # Human-readable description of this trigger.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400345 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
346 #
347 # Branch and tag names in trigger templates are interpreted as regular
348 # expressions. Any branch or tag change that matches that regular expression
349 # will trigger a build.
350 # Repository.
351 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
352 # the build is assumed.
353 "branchName": "A String", # Name of the branch to build.
354 "commitSha": "A String", # Explicit commit SHA to build.
355 "tagName": "A String", # Name of the tag to build.
356 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
357 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700358 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700359 #
360 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400361 "substitutions": { # Substitutions data for Build resource.
362 "a_key": "A String",
363 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700364 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700365 "build": { # A build resource in the Container Builder API. # Contents of the build template.
366 #
367 # At a high level, a Build describes where to find source code, how to build
368 # it (for example, the builder image to run on the source), and what tag to
369 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700370 #
371 # Fields can include the following variables which will be expanded when the
372 # build is created:
373 #
374 # - $PROJECT_ID: the project ID of the build.
375 # - $BUILD_ID: the autogenerated ID of the build.
376 # - $REPO_NAME: the source repository name specified by RepoSource.
377 # - $BRANCH_NAME: the branch name specified by RepoSource.
378 # - $TAG_NAME: the tag name specified by RepoSource.
379 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
380 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700381 "finishTime": "A String", # Time at which execution of the build was finished.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800382 #
383 # The difference between finish_time and start_time is the duration of the
384 # build's execution.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700385 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400386 "status": "A String", # Status of the build.
387 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700388 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
389 # granularity. If this amount of time elapses, work on the build will cease
390 # and the build status will be TIMEOUT.
391 #
392 # Default time is ten minutes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700393 "startTime": "A String", # Time at which execution of the build was started.
394 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400395 "projectId": "A String", # ID of the project.
396 # @OutputOnly.
397 "id": "A String", # Unique identifier of the build.
398 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700399 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
400 # @OutputOnly
401 "images": [ # Images that were built as a part of the build.
402 { # BuiltImage describes an image built by the pipeline.
403 "name": "A String", # Name used to push the container image to Google Container Registry, as
404 # presented to `docker push`.
405 "digest": "A String", # Docker Registry 2.0 digest.
406 },
407 ],
408 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
409 "A String",
410 ],
411 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400412 "statusDetail": "A String", # Customer-readable message about the current status.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700413 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400414 "substitutions": { # Substitutions data for Build resource.
415 "a_key": "A String",
416 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700417 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
418 # service.
419 "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
420 # Storage.
421 # Google Cloud Storage.
422 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
423 # omitted, the latest generation will be used.
424 "object": "A String", # Google Cloud Storage object containing source.
425 #
426 # This object must be a gzipped archive file (.tar.gz) containing source to
427 # build.
428 "bucket": "A String", # Google Cloud Storage bucket containing source (see
429 # [Bucket Name
430 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
431 },
432 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
433 # Repository.
434 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
435 # the build is assumed.
436 "branchName": "A String", # Name of the branch to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700437 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400438 "tagName": "A String", # Name of the tag to build.
439 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700440 },
441 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800442 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
443 # triggered automatically.
444 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400445 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
446 "requestedVerifyOption": "A String", # Requested verifiability options.
447 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
448 "A String",
449 ],
450 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700451 "steps": [ # Describes the operations to be performed on the workspace.
452 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400453 "args": [ # A list of arguments that will be presented to the step when it is started.
454 #
455 # If the image used to run the step's container has an entrypoint, these args
456 # will be used as arguments to that entrypoint. If the image does not define
457 # an entrypoint, the first element in args will be used as the entrypoint,
458 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700459 "A String",
460 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700461 "name": "A String", # The name of the container image that will run this particular build step.
462 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800463 # If the image is already available in the host's Docker daemon's cache, it
464 # will be run directly. If not, the host will attempt to pull the image
465 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700466 #
467 # The Docker daemon's cache will already have the latest versions of all of
468 # the officially supported build steps
469 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
470 # will also have cached many of the layers for some popular images, like
471 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
472 # use them.
473 #
474 # If you built an image in a previous build step, it will be stored in the
475 # host's Docker daemon's cache and is available to use as the name for a
476 # later build step.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400477 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
478 # This build step will not start until all the build steps in wait_for
479 # have completed successfully. If wait_for is empty, this build step will
480 # start when all previous build steps in the Build.Steps list have completed
481 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700482 "A String",
483 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400484 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
485 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700486 "env": [ # A list of environment variable definitions to be used when running a step.
487 #
488 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
489 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700490 "A String",
491 ],
492 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
493 # reference this build step as a dependency.
494 "dir": "A String", # Working directory (relative to project source root) to use when running
495 # this operation's container.
496 },
497 ],
498 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
499 # @OutputOnly
500 # some source was used for this build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400501 "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
502 # generations resolved.
503 # Google Cloud Storage.
504 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
505 # omitted, the latest generation will be used.
506 "object": "A String", # Google Cloud Storage object containing source.
507 #
508 # This object must be a gzipped archive file (.tar.gz) containing source to
509 # build.
510 "bucket": "A String", # Google Cloud Storage bucket containing source (see
511 # [Bucket Name
512 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700513 },
514 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
515 # source integrity was maintained in the build. Note that FileHashes will
516 # only be populated if BuildOptions has requested a SourceProvenanceHash.
517 #
518 # The keys to this map are file paths used as build source and the values
519 # contain the hash values for those files.
520 #
521 # If the build source came in a single package such as a gzipped tarfile
522 # (.tar.gz), the FileHash will be for the single path to that file.
523 # @OutputOnly
524 "a_key": { # Container message for hashes of byte content of files, used in
525 # SourceProvenance messages to verify integrity of source input to the build.
526 "fileHash": [ # Collection of file hashes.
527 { # Container message for hash values.
528 "type": "A String", # The type of hash that was performed.
529 "value": "A String", # The hash value.
530 },
531 ],
532 },
533 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400534 "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
535 # revisions resolved.
536 # Repository.
537 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
538 # the build is assumed.
539 "branchName": "A String", # Name of the branch to build.
540 "commitSha": "A String", # Explicit commit SHA to build.
541 "tagName": "A String", # Name of the tag to build.
542 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700543 },
544 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400545 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
546 # [Bucket Name
547 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
548 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700549 "images": [ # A list of images to be pushed upon the successful completion of all build
550 # steps.
551 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800552 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700553 #
554 # The digests of the pushed images will be stored in the Build resource's
555 # results field.
556 #
557 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700558 "A String",
559 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400560 "createTime": "A String", # Time at which the request to create the build was received.
561 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700562 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
563 # @OutputOnly
564 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400565 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
566 # template.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700567 "id": "A String", # Unique identifier of the trigger.
568 #
569 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700570 }</pre>
571</div>
572
573<div class="method">
574 <code class="details" id="delete">delete(projectId, triggerId, x__xgafv=None)</code>
575 <pre>Deletes an BuildTrigger by its project ID and trigger ID.
576
577This API is experimental.
578
579Args:
580 projectId: string, ID of the project that owns the trigger. (required)
581 triggerId: string, ID of the BuildTrigger to delete. (required)
582 x__xgafv: string, V1 error format.
583 Allowed values
584 1 - v1 error format
585 2 - v2 error format
586
587Returns:
588 An object of the form:
589
590 { # A generic empty message that you can re-use to avoid defining duplicated
591 # empty messages in your APIs. A typical example is to use it as the request
592 # or the response type of an API method. For instance:
593 #
594 # service Foo {
595 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
596 # }
597 #
598 # The JSON representation for `Empty` is empty JSON object `{}`.
599 }</pre>
600</div>
601
602<div class="method">
603 <code class="details" id="get">get(projectId, triggerId, x__xgafv=None)</code>
604 <pre>Gets information about a BuildTrigger.
605
606This API is experimental.
607
608Args:
609 projectId: string, ID of the project that owns the trigger. (required)
610 triggerId: string, ID of the BuildTrigger to get. (required)
611 x__xgafv: string, V1 error format.
612 Allowed values
613 1 - v1 error format
614 2 - v2 error format
615
616Returns:
617 An object of the form:
618
619 { # Configuration for an automated build in response to source repository
620 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700621 "description": "A String", # Human-readable description of this trigger.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400622 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
623 #
624 # Branch and tag names in trigger templates are interpreted as regular
625 # expressions. Any branch or tag change that matches that regular expression
626 # will trigger a build.
627 # Repository.
628 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
629 # the build is assumed.
630 "branchName": "A String", # Name of the branch to build.
631 "commitSha": "A String", # Explicit commit SHA to build.
632 "tagName": "A String", # Name of the tag to build.
633 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
634 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700635 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700636 #
637 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400638 "substitutions": { # Substitutions data for Build resource.
639 "a_key": "A String",
640 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700641 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700642 "build": { # A build resource in the Container Builder API. # Contents of the build template.
643 #
644 # At a high level, a Build describes where to find source code, how to build
645 # it (for example, the builder image to run on the source), and what tag to
646 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700647 #
648 # Fields can include the following variables which will be expanded when the
649 # build is created:
650 #
651 # - $PROJECT_ID: the project ID of the build.
652 # - $BUILD_ID: the autogenerated ID of the build.
653 # - $REPO_NAME: the source repository name specified by RepoSource.
654 # - $BRANCH_NAME: the branch name specified by RepoSource.
655 # - $TAG_NAME: the tag name specified by RepoSource.
656 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
657 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700658 "finishTime": "A String", # Time at which execution of the build was finished.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800659 #
660 # The difference between finish_time and start_time is the duration of the
661 # build's execution.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700662 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400663 "status": "A String", # Status of the build.
664 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700665 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
666 # granularity. If this amount of time elapses, work on the build will cease
667 # and the build status will be TIMEOUT.
668 #
669 # Default time is ten minutes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700670 "startTime": "A String", # Time at which execution of the build was started.
671 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400672 "projectId": "A String", # ID of the project.
673 # @OutputOnly.
674 "id": "A String", # Unique identifier of the build.
675 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700676 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
677 # @OutputOnly
678 "images": [ # Images that were built as a part of the build.
679 { # BuiltImage describes an image built by the pipeline.
680 "name": "A String", # Name used to push the container image to Google Container Registry, as
681 # presented to `docker push`.
682 "digest": "A String", # Docker Registry 2.0 digest.
683 },
684 ],
685 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
686 "A String",
687 ],
688 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400689 "statusDetail": "A String", # Customer-readable message about the current status.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700690 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400691 "substitutions": { # Substitutions data for Build resource.
692 "a_key": "A String",
693 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700694 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
695 # service.
696 "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
697 # Storage.
698 # Google Cloud Storage.
699 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
700 # omitted, the latest generation will be used.
701 "object": "A String", # Google Cloud Storage object containing source.
702 #
703 # This object must be a gzipped archive file (.tar.gz) containing source to
704 # build.
705 "bucket": "A String", # Google Cloud Storage bucket containing source (see
706 # [Bucket Name
707 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
708 },
709 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
710 # Repository.
711 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
712 # the build is assumed.
713 "branchName": "A String", # Name of the branch to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700714 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400715 "tagName": "A String", # Name of the tag to build.
716 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700717 },
718 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800719 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
720 # triggered automatically.
721 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400722 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
723 "requestedVerifyOption": "A String", # Requested verifiability options.
724 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
725 "A String",
726 ],
727 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700728 "steps": [ # Describes the operations to be performed on the workspace.
729 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400730 "args": [ # A list of arguments that will be presented to the step when it is started.
731 #
732 # If the image used to run the step's container has an entrypoint, these args
733 # will be used as arguments to that entrypoint. If the image does not define
734 # an entrypoint, the first element in args will be used as the entrypoint,
735 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700736 "A String",
737 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700738 "name": "A String", # The name of the container image that will run this particular build step.
739 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800740 # If the image is already available in the host's Docker daemon's cache, it
741 # will be run directly. If not, the host will attempt to pull the image
742 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700743 #
744 # The Docker daemon's cache will already have the latest versions of all of
745 # the officially supported build steps
746 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
747 # will also have cached many of the layers for some popular images, like
748 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
749 # use them.
750 #
751 # If you built an image in a previous build step, it will be stored in the
752 # host's Docker daemon's cache and is available to use as the name for a
753 # later build step.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400754 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
755 # This build step will not start until all the build steps in wait_for
756 # have completed successfully. If wait_for is empty, this build step will
757 # start when all previous build steps in the Build.Steps list have completed
758 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700759 "A String",
760 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400761 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
762 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700763 "env": [ # A list of environment variable definitions to be used when running a step.
764 #
765 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
766 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700767 "A String",
768 ],
769 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
770 # reference this build step as a dependency.
771 "dir": "A String", # Working directory (relative to project source root) to use when running
772 # this operation's container.
773 },
774 ],
775 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
776 # @OutputOnly
777 # some source was used for this build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400778 "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
779 # generations resolved.
780 # Google Cloud Storage.
781 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
782 # omitted, the latest generation will be used.
783 "object": "A String", # Google Cloud Storage object containing source.
784 #
785 # This object must be a gzipped archive file (.tar.gz) containing source to
786 # build.
787 "bucket": "A String", # Google Cloud Storage bucket containing source (see
788 # [Bucket Name
789 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700790 },
791 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
792 # source integrity was maintained in the build. Note that FileHashes will
793 # only be populated if BuildOptions has requested a SourceProvenanceHash.
794 #
795 # The keys to this map are file paths used as build source and the values
796 # contain the hash values for those files.
797 #
798 # If the build source came in a single package such as a gzipped tarfile
799 # (.tar.gz), the FileHash will be for the single path to that file.
800 # @OutputOnly
801 "a_key": { # Container message for hashes of byte content of files, used in
802 # SourceProvenance messages to verify integrity of source input to the build.
803 "fileHash": [ # Collection of file hashes.
804 { # Container message for hash values.
805 "type": "A String", # The type of hash that was performed.
806 "value": "A String", # The hash value.
807 },
808 ],
809 },
810 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400811 "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
812 # revisions resolved.
813 # Repository.
814 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
815 # the build is assumed.
816 "branchName": "A String", # Name of the branch to build.
817 "commitSha": "A String", # Explicit commit SHA to build.
818 "tagName": "A String", # Name of the tag to build.
819 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700820 },
821 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400822 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
823 # [Bucket Name
824 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
825 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700826 "images": [ # A list of images to be pushed upon the successful completion of all build
827 # steps.
828 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800829 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700830 #
831 # The digests of the pushed images will be stored in the Build resource's
832 # results field.
833 #
834 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700835 "A String",
836 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400837 "createTime": "A String", # Time at which the request to create the build was received.
838 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700839 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
840 # @OutputOnly
841 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400842 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
843 # template.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700844 "id": "A String", # Unique identifier of the trigger.
845 #
846 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700847 }</pre>
848</div>
849
850<div class="method">
851 <code class="details" id="list">list(projectId, x__xgafv=None)</code>
852 <pre>Lists existing BuildTrigger.
853
854This API is experimental.
855
856Args:
857 projectId: string, ID of the project for which to list BuildTriggers. (required)
858 x__xgafv: string, V1 error format.
859 Allowed values
860 1 - v1 error format
861 2 - v2 error format
862
863Returns:
864 An object of the form:
865
866 { # Response containing existing BuildTriggers.
867 "triggers": [ # BuildTriggers for the project, sorted by create_time descending.
868 { # Configuration for an automated build in response to source repository
869 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700870 "description": "A String", # Human-readable description of this trigger.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400871 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
872 #
873 # Branch and tag names in trigger templates are interpreted as regular
874 # expressions. Any branch or tag change that matches that regular expression
875 # will trigger a build.
876 # Repository.
877 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
878 # the build is assumed.
879 "branchName": "A String", # Name of the branch to build.
880 "commitSha": "A String", # Explicit commit SHA to build.
881 "tagName": "A String", # Name of the tag to build.
882 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
883 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700884 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700885 #
886 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400887 "substitutions": { # Substitutions data for Build resource.
888 "a_key": "A String",
889 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700890 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700891 "build": { # A build resource in the Container Builder API. # Contents of the build template.
892 #
893 # At a high level, a Build describes where to find source code, how to build
894 # it (for example, the builder image to run on the source), and what tag to
895 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700896 #
897 # Fields can include the following variables which will be expanded when the
898 # build is created:
899 #
900 # - $PROJECT_ID: the project ID of the build.
901 # - $BUILD_ID: the autogenerated ID of the build.
902 # - $REPO_NAME: the source repository name specified by RepoSource.
903 # - $BRANCH_NAME: the branch name specified by RepoSource.
904 # - $TAG_NAME: the tag name specified by RepoSource.
905 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
906 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700907 "finishTime": "A String", # Time at which execution of the build was finished.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800908 #
909 # The difference between finish_time and start_time is the duration of the
910 # build's execution.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700911 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400912 "status": "A String", # Status of the build.
913 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700914 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
915 # granularity. If this amount of time elapses, work on the build will cease
916 # and the build status will be TIMEOUT.
917 #
918 # Default time is ten minutes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700919 "startTime": "A String", # Time at which execution of the build was started.
920 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400921 "projectId": "A String", # ID of the project.
922 # @OutputOnly.
923 "id": "A String", # Unique identifier of the build.
924 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700925 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
926 # @OutputOnly
927 "images": [ # Images that were built as a part of the build.
928 { # BuiltImage describes an image built by the pipeline.
929 "name": "A String", # Name used to push the container image to Google Container Registry, as
930 # presented to `docker push`.
931 "digest": "A String", # Docker Registry 2.0 digest.
932 },
933 ],
934 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
935 "A String",
936 ],
937 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400938 "statusDetail": "A String", # Customer-readable message about the current status.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700939 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400940 "substitutions": { # Substitutions data for Build resource.
941 "a_key": "A String",
942 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700943 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
944 # service.
945 "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
946 # Storage.
947 # Google Cloud Storage.
948 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
949 # omitted, the latest generation will be used.
950 "object": "A String", # Google Cloud Storage object containing source.
951 #
952 # This object must be a gzipped archive file (.tar.gz) containing source to
953 # build.
954 "bucket": "A String", # Google Cloud Storage bucket containing source (see
955 # [Bucket Name
956 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
957 },
958 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
959 # Repository.
960 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
961 # the build is assumed.
962 "branchName": "A String", # Name of the branch to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700963 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400964 "tagName": "A String", # Name of the tag to build.
965 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700966 },
967 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800968 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
969 # triggered automatically.
970 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400971 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
972 "requestedVerifyOption": "A String", # Requested verifiability options.
973 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
974 "A String",
975 ],
976 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700977 "steps": [ # Describes the operations to be performed on the workspace.
978 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400979 "args": [ # A list of arguments that will be presented to the step when it is started.
980 #
981 # If the image used to run the step's container has an entrypoint, these args
982 # will be used as arguments to that entrypoint. If the image does not define
983 # an entrypoint, the first element in args will be used as the entrypoint,
984 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700985 "A String",
986 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700987 "name": "A String", # The name of the container image that will run this particular build step.
988 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800989 # If the image is already available in the host's Docker daemon's cache, it
990 # will be run directly. If not, the host will attempt to pull the image
991 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700992 #
993 # The Docker daemon's cache will already have the latest versions of all of
994 # the officially supported build steps
995 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
996 # will also have cached many of the layers for some popular images, like
997 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
998 # use them.
999 #
1000 # If you built an image in a previous build step, it will be stored in the
1001 # host's Docker daemon's cache and is available to use as the name for a
1002 # later build step.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001003 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1004 # This build step will not start until all the build steps in wait_for
1005 # have completed successfully. If wait_for is empty, this build step will
1006 # start when all previous build steps in the Build.Steps list have completed
1007 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001008 "A String",
1009 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001010 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
1011 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001012 "env": [ # A list of environment variable definitions to be used when running a step.
1013 #
1014 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1015 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001016 "A String",
1017 ],
1018 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
1019 # reference this build step as a dependency.
1020 "dir": "A String", # Working directory (relative to project source root) to use when running
1021 # this operation's container.
1022 },
1023 ],
1024 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
1025 # @OutputOnly
1026 # some source was used for this build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001027 "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
1028 # generations resolved.
1029 # Google Cloud Storage.
1030 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1031 # omitted, the latest generation will be used.
1032 "object": "A String", # Google Cloud Storage object containing source.
1033 #
1034 # This object must be a gzipped archive file (.tar.gz) containing source to
1035 # build.
1036 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1037 # [Bucket Name
1038 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001039 },
1040 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
1041 # source integrity was maintained in the build. Note that FileHashes will
1042 # only be populated if BuildOptions has requested a SourceProvenanceHash.
1043 #
1044 # The keys to this map are file paths used as build source and the values
1045 # contain the hash values for those files.
1046 #
1047 # If the build source came in a single package such as a gzipped tarfile
1048 # (.tar.gz), the FileHash will be for the single path to that file.
1049 # @OutputOnly
1050 "a_key": { # Container message for hashes of byte content of files, used in
1051 # SourceProvenance messages to verify integrity of source input to the build.
1052 "fileHash": [ # Collection of file hashes.
1053 { # Container message for hash values.
1054 "type": "A String", # The type of hash that was performed.
1055 "value": "A String", # The hash value.
1056 },
1057 ],
1058 },
1059 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001060 "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
1061 # revisions resolved.
1062 # Repository.
1063 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1064 # the build is assumed.
1065 "branchName": "A String", # Name of the branch to build.
1066 "commitSha": "A String", # Explicit commit SHA to build.
1067 "tagName": "A String", # Name of the tag to build.
1068 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001069 },
1070 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001071 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1072 # [Bucket Name
1073 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1074 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001075 "images": [ # A list of images to be pushed upon the successful completion of all build
1076 # steps.
1077 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001078 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001079 #
1080 # The digests of the pushed images will be stored in the Build resource's
1081 # results field.
1082 #
1083 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001084 "A String",
1085 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001086 "createTime": "A String", # Time at which the request to create the build was received.
1087 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001088 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
1089 # @OutputOnly
1090 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001091 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
1092 # template.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001093 "id": "A String", # Unique identifier of the trigger.
1094 #
1095 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001096 },
1097 ],
1098 }</pre>
1099</div>
1100
1101<div class="method">
1102 <code class="details" id="patch">patch(projectId, triggerId, body, x__xgafv=None)</code>
1103 <pre>Updates an BuildTrigger by its project ID and trigger ID.
1104
1105This API is experimental.
1106
1107Args:
1108 projectId: string, ID of the project that owns the trigger. (required)
1109 triggerId: string, ID of the BuildTrigger to update. (required)
1110 body: object, The request body. (required)
1111 The object takes the form of:
1112
1113{ # Configuration for an automated build in response to source repository
1114 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001115 "description": "A String", # Human-readable description of this trigger.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001116 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
1117 #
1118 # Branch and tag names in trigger templates are interpreted as regular
1119 # expressions. Any branch or tag change that matches that regular expression
1120 # will trigger a build.
1121 # Repository.
1122 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1123 # the build is assumed.
1124 "branchName": "A String", # Name of the branch to build.
1125 "commitSha": "A String", # Explicit commit SHA to build.
1126 "tagName": "A String", # Name of the tag to build.
1127 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1128 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001129 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001130 #
1131 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001132 "substitutions": { # Substitutions data for Build resource.
1133 "a_key": "A String",
1134 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001135 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001136 "build": { # A build resource in the Container Builder API. # Contents of the build template.
1137 #
1138 # At a high level, a Build describes where to find source code, how to build
1139 # it (for example, the builder image to run on the source), and what tag to
1140 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001141 #
1142 # Fields can include the following variables which will be expanded when the
1143 # build is created:
1144 #
1145 # - $PROJECT_ID: the project ID of the build.
1146 # - $BUILD_ID: the autogenerated ID of the build.
1147 # - $REPO_NAME: the source repository name specified by RepoSource.
1148 # - $BRANCH_NAME: the branch name specified by RepoSource.
1149 # - $TAG_NAME: the tag name specified by RepoSource.
1150 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1151 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001152 "finishTime": "A String", # Time at which execution of the build was finished.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001153 #
1154 # The difference between finish_time and start_time is the duration of the
1155 # build's execution.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001156 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001157 "status": "A String", # Status of the build.
1158 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001159 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
1160 # granularity. If this amount of time elapses, work on the build will cease
1161 # and the build status will be TIMEOUT.
1162 #
1163 # Default time is ten minutes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001164 "startTime": "A String", # Time at which execution of the build was started.
1165 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001166 "projectId": "A String", # ID of the project.
1167 # @OutputOnly.
1168 "id": "A String", # Unique identifier of the build.
1169 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001170 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
1171 # @OutputOnly
1172 "images": [ # Images that were built as a part of the build.
1173 { # BuiltImage describes an image built by the pipeline.
1174 "name": "A String", # Name used to push the container image to Google Container Registry, as
1175 # presented to `docker push`.
1176 "digest": "A String", # Docker Registry 2.0 digest.
1177 },
1178 ],
1179 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
1180 "A String",
1181 ],
1182 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001183 "statusDetail": "A String", # Customer-readable message about the current status.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001184 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001185 "substitutions": { # Substitutions data for Build resource.
1186 "a_key": "A String",
1187 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001188 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
1189 # service.
1190 "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
1191 # Storage.
1192 # Google Cloud Storage.
1193 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1194 # omitted, the latest generation will be used.
1195 "object": "A String", # Google Cloud Storage object containing source.
1196 #
1197 # This object must be a gzipped archive file (.tar.gz) containing source to
1198 # build.
1199 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1200 # [Bucket Name
1201 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1202 },
1203 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
1204 # Repository.
1205 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1206 # the build is assumed.
1207 "branchName": "A String", # Name of the branch to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001208 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001209 "tagName": "A String", # Name of the tag to build.
1210 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001211 },
1212 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001213 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
1214 # triggered automatically.
1215 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001216 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
1217 "requestedVerifyOption": "A String", # Requested verifiability options.
1218 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1219 "A String",
1220 ],
1221 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001222 "steps": [ # Describes the operations to be performed on the workspace.
1223 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001224 "args": [ # A list of arguments that will be presented to the step when it is started.
1225 #
1226 # If the image used to run the step's container has an entrypoint, these args
1227 # will be used as arguments to that entrypoint. If the image does not define
1228 # an entrypoint, the first element in args will be used as the entrypoint,
1229 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001230 "A String",
1231 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001232 "name": "A String", # The name of the container image that will run this particular build step.
1233 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001234 # If the image is already available in the host's Docker daemon's cache, it
1235 # will be run directly. If not, the host will attempt to pull the image
1236 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001237 #
1238 # The Docker daemon's cache will already have the latest versions of all of
1239 # the officially supported build steps
1240 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
1241 # will also have cached many of the layers for some popular images, like
1242 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
1243 # use them.
1244 #
1245 # If you built an image in a previous build step, it will be stored in the
1246 # host's Docker daemon's cache and is available to use as the name for a
1247 # later build step.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001248 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1249 # This build step will not start until all the build steps in wait_for
1250 # have completed successfully. If wait_for is empty, this build step will
1251 # start when all previous build steps in the Build.Steps list have completed
1252 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001253 "A String",
1254 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001255 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
1256 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001257 "env": [ # A list of environment variable definitions to be used when running a step.
1258 #
1259 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1260 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001261 "A String",
1262 ],
1263 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
1264 # reference this build step as a dependency.
1265 "dir": "A String", # Working directory (relative to project source root) to use when running
1266 # this operation's container.
1267 },
1268 ],
1269 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
1270 # @OutputOnly
1271 # some source was used for this build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001272 "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
1273 # generations resolved.
1274 # Google Cloud Storage.
1275 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1276 # omitted, the latest generation will be used.
1277 "object": "A String", # Google Cloud Storage object containing source.
1278 #
1279 # This object must be a gzipped archive file (.tar.gz) containing source to
1280 # build.
1281 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1282 # [Bucket Name
1283 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001284 },
1285 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
1286 # source integrity was maintained in the build. Note that FileHashes will
1287 # only be populated if BuildOptions has requested a SourceProvenanceHash.
1288 #
1289 # The keys to this map are file paths used as build source and the values
1290 # contain the hash values for those files.
1291 #
1292 # If the build source came in a single package such as a gzipped tarfile
1293 # (.tar.gz), the FileHash will be for the single path to that file.
1294 # @OutputOnly
1295 "a_key": { # Container message for hashes of byte content of files, used in
1296 # SourceProvenance messages to verify integrity of source input to the build.
1297 "fileHash": [ # Collection of file hashes.
1298 { # Container message for hash values.
1299 "type": "A String", # The type of hash that was performed.
1300 "value": "A String", # The hash value.
1301 },
1302 ],
1303 },
1304 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001305 "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
1306 # revisions resolved.
1307 # Repository.
1308 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1309 # the build is assumed.
1310 "branchName": "A String", # Name of the branch to build.
1311 "commitSha": "A String", # Explicit commit SHA to build.
1312 "tagName": "A String", # Name of the tag to build.
1313 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001314 },
1315 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001316 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1317 # [Bucket Name
1318 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1319 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001320 "images": [ # A list of images to be pushed upon the successful completion of all build
1321 # steps.
1322 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001323 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001324 #
1325 # The digests of the pushed images will be stored in the Build resource's
1326 # results field.
1327 #
1328 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001329 "A String",
1330 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001331 "createTime": "A String", # Time at which the request to create the build was received.
1332 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001333 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
1334 # @OutputOnly
1335 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001336 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
1337 # template.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001338 "id": "A String", # Unique identifier of the trigger.
1339 #
1340 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001341 }
1342
1343 x__xgafv: string, V1 error format.
1344 Allowed values
1345 1 - v1 error format
1346 2 - v2 error format
1347
1348Returns:
1349 An object of the form:
1350
1351 { # Configuration for an automated build in response to source repository
1352 # changes.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001353 "description": "A String", # Human-readable description of this trigger.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001354 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
1355 #
1356 # Branch and tag names in trigger templates are interpreted as regular
1357 # expressions. Any branch or tag change that matches that regular expression
1358 # will trigger a build.
1359 # Repository.
1360 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1361 # the build is assumed.
1362 "branchName": "A String", # Name of the branch to build.
1363 "commitSha": "A String", # Explicit commit SHA to build.
1364 "tagName": "A String", # Name of the tag to build.
1365 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1366 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001367 "createTime": "A String", # Time when the trigger was created.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001368 #
1369 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001370 "substitutions": { # Substitutions data for Build resource.
1371 "a_key": "A String",
1372 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001373 "disabled": True or False, # If true, the trigger will never result in a build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001374 "build": { # A build resource in the Container Builder API. # Contents of the build template.
1375 #
1376 # At a high level, a Build describes where to find source code, how to build
1377 # it (for example, the builder image to run on the source), and what tag to
1378 # apply to the built image when it is pushed to Google Container Registry.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001379 #
1380 # Fields can include the following variables which will be expanded when the
1381 # build is created:
1382 #
1383 # - $PROJECT_ID: the project ID of the build.
1384 # - $BUILD_ID: the autogenerated ID of the build.
1385 # - $REPO_NAME: the source repository name specified by RepoSource.
1386 # - $BRANCH_NAME: the branch name specified by RepoSource.
1387 # - $TAG_NAME: the tag name specified by RepoSource.
1388 # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
1389 # resolved from the specified branch or tag.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001390 "finishTime": "A String", # Time at which execution of the build was finished.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001391 #
1392 # The difference between finish_time and start_time is the duration of the
1393 # build's execution.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001394 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001395 "status": "A String", # Status of the build.
1396 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001397 "timeout": "A String", # Amount of time that this build should be allowed to run, to second
1398 # granularity. If this amount of time elapses, work on the build will cease
1399 # and the build status will be TIMEOUT.
1400 #
1401 # Default time is ten minutes.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001402 "startTime": "A String", # Time at which execution of the build was started.
1403 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001404 "projectId": "A String", # ID of the project.
1405 # @OutputOnly.
1406 "id": "A String", # Unique identifier of the build.
1407 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001408 "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
1409 # @OutputOnly
1410 "images": [ # Images that were built as a part of the build.
1411 { # BuiltImage describes an image built by the pipeline.
1412 "name": "A String", # Name used to push the container image to Google Container Registry, as
1413 # presented to `docker push`.
1414 "digest": "A String", # Docker Registry 2.0 digest.
1415 },
1416 ],
1417 "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
1418 "A String",
1419 ],
1420 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001421 "statusDetail": "A String", # Customer-readable message about the current status.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001422 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001423 "substitutions": { # Substitutions data for Build resource.
1424 "a_key": "A String",
1425 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001426 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
1427 # service.
1428 "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
1429 # Storage.
1430 # Google Cloud Storage.
1431 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1432 # omitted, the latest generation will be used.
1433 "object": "A String", # Google Cloud Storage object containing source.
1434 #
1435 # This object must be a gzipped archive file (.tar.gz) containing source to
1436 # build.
1437 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1438 # [Bucket Name
1439 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1440 },
1441 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
1442 # Repository.
1443 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1444 # the build is assumed.
1445 "branchName": "A String", # Name of the branch to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001446 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001447 "tagName": "A String", # Name of the tag to build.
1448 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001449 },
1450 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001451 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
1452 # triggered automatically.
1453 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001454 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
1455 "requestedVerifyOption": "A String", # Requested verifiability options.
1456 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1457 "A String",
1458 ],
1459 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001460 "steps": [ # Describes the operations to be performed on the workspace.
1461 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001462 "args": [ # A list of arguments that will be presented to the step when it is started.
1463 #
1464 # If the image used to run the step's container has an entrypoint, these args
1465 # will be used as arguments to that entrypoint. If the image does not define
1466 # an entrypoint, the first element in args will be used as the entrypoint,
1467 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001468 "A String",
1469 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001470 "name": "A String", # The name of the container image that will run this particular build step.
1471 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001472 # If the image is already available in the host's Docker daemon's cache, it
1473 # will be run directly. If not, the host will attempt to pull the image
1474 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001475 #
1476 # The Docker daemon's cache will already have the latest versions of all of
1477 # the officially supported build steps
1478 # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon
1479 # will also have cached many of the layers for some popular images, like
1480 # "ubuntu", "debian", but they will be refreshed at the time you attempt to
1481 # use them.
1482 #
1483 # If you built an image in a previous build step, it will be stored in the
1484 # host's Docker daemon's cache and is available to use as the name for a
1485 # later build step.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001486 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1487 # This build step will not start until all the build steps in wait_for
1488 # have completed successfully. If wait_for is empty, this build step will
1489 # start when all previous build steps in the Build.Steps list have completed
1490 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001491 "A String",
1492 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001493 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
1494 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001495 "env": [ # A list of environment variable definitions to be used when running a step.
1496 #
1497 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1498 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001499 "A String",
1500 ],
1501 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
1502 # reference this build step as a dependency.
1503 "dir": "A String", # Working directory (relative to project source root) to use when running
1504 # this operation's container.
1505 },
1506 ],
1507 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
1508 # @OutputOnly
1509 # some source was used for this build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001510 "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
1511 # generations resolved.
1512 # Google Cloud Storage.
1513 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1514 # omitted, the latest generation will be used.
1515 "object": "A String", # Google Cloud Storage object containing source.
1516 #
1517 # This object must be a gzipped archive file (.tar.gz) containing source to
1518 # build.
1519 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1520 # [Bucket Name
1521 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001522 },
1523 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
1524 # source integrity was maintained in the build. Note that FileHashes will
1525 # only be populated if BuildOptions has requested a SourceProvenanceHash.
1526 #
1527 # The keys to this map are file paths used as build source and the values
1528 # contain the hash values for those files.
1529 #
1530 # If the build source came in a single package such as a gzipped tarfile
1531 # (.tar.gz), the FileHash will be for the single path to that file.
1532 # @OutputOnly
1533 "a_key": { # Container message for hashes of byte content of files, used in
1534 # SourceProvenance messages to verify integrity of source input to the build.
1535 "fileHash": [ # Collection of file hashes.
1536 { # Container message for hash values.
1537 "type": "A String", # The type of hash that was performed.
1538 "value": "A String", # The hash value.
1539 },
1540 ],
1541 },
1542 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001543 "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
1544 # revisions resolved.
1545 # Repository.
1546 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1547 # the build is assumed.
1548 "branchName": "A String", # Name of the branch to build.
1549 "commitSha": "A String", # Explicit commit SHA to build.
1550 "tagName": "A String", # Name of the tag to build.
1551 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001552 },
1553 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001554 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1555 # [Bucket Name
1556 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1557 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001558 "images": [ # A list of images to be pushed upon the successful completion of all build
1559 # steps.
1560 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001561 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001562 #
1563 # The digests of the pushed images will be stored in the Build resource's
1564 # results field.
1565 #
1566 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001567 "A String",
1568 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001569 "createTime": "A String", # Time at which the request to create the build was received.
1570 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001571 "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
1572 # @OutputOnly
1573 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001574 "filename": "A String", # Path, from the source root, to a file whose contents is used for the
1575 # template.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001576 "id": "A String", # Unique identifier of the trigger.
1577 #
1578 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001579 }</pre>
1580</div>
1581
1582</body></html>