blob: a22109c4ba36449cc80a77fea963700b9f7b54cc [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 Cheemalapatie833b792017-03-24 15:06:46 -0700107 "createTime": "A String", # Time when the trigger was created.
108 #
109 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400110 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
111 #
112 # Branch and tag names in trigger templates are interpreted as regular
113 # expressions. Any branch or tag change that matches that regular expression
114 # will trigger a build.
115 # Repository.
116 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
117 # the build is assumed.
118 "branchName": "A String", # Name of the branch to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400119 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700120 "tagName": "A String", # Name of the tag to build.
121 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400122 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700123 "disabled": True or False, # If true, the trigger will never result in a build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400124 "substitutions": { # Substitutions data for Build resource.
125 "a_key": "A String",
126 },
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 Cheemalapatie833b792017-03-24 15:06:46 -0700176 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
177 "requestedVerifyOption": "A String", # Requested verifiability options.
178 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
179 "A String",
180 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400181 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700182 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
183 # service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700184 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
185 # Repository.
186 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
187 # the build is assumed.
188 "branchName": "A String", # Name of the branch to build.
189 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
190 "tagName": "A String", # Name of the tag to build.
191 "commitSha": "A String", # Explicit commit SHA to build.
192 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700193 "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
194 # Storage.
195 # Google Cloud Storage.
196 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
197 # omitted, the latest generation will be used.
198 "object": "A String", # Google Cloud Storage object containing source.
199 #
200 # This object must be a gzipped archive file (.tar.gz) containing source to
201 # build.
202 "bucket": "A String", # Google Cloud Storage bucket containing source (see
203 # [Bucket Name
204 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
205 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700206 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800207 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
208 # triggered automatically.
209 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700210 "steps": [ # Describes the operations to be performed on the workspace.
211 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700212 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
213 # This build step will not start until all the build steps in wait_for
214 # have completed successfully. If wait_for is empty, this build step will
215 # start when all previous build steps in the Build.Steps list have completed
216 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700217 "A String",
218 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700219 "name": "A String", # The name of the container image that will run this particular build step.
220 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800221 # If the image is already available in the host's Docker daemon's cache, it
222 # will be run directly. If not, the host will attempt to pull the image
223 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700224 #
225 # The Docker daemon's cache will already have the latest versions of all of
226 # the officially supported build steps
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700227 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
228 # The Docker daemon will also have cached many of the layers for some popular
229 # images, like "ubuntu", "debian", but they will be refreshed at the time you
230 # attempt to use them.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700231 #
232 # If you built an image in a previous build step, it will be stored in the
233 # host's Docker daemon's cache and is available to use as the name for a
234 # later build step.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700235 "args": [ # A list of arguments that will be presented to the step when it is started.
236 #
237 # If the image used to run the step's container has an entrypoint, these args
238 # will be used as arguments to that entrypoint. If the image does not define
239 # an entrypoint, the first element in args will be used as the entrypoint,
240 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700241 "A String",
242 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400243 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
244 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700245 "env": [ # A list of environment variable definitions to be used when running a step.
246 #
247 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
248 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700249 "A String",
250 ],
251 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
252 # reference this build step as a dependency.
253 "dir": "A String", # Working directory (relative to project source root) to use when running
254 # this operation's container.
255 },
256 ],
257 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
258 # @OutputOnly
259 # some source was used for this build.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700260 "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
261 # revisions resolved.
262 # Repository.
263 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
264 # the build is assumed.
265 "branchName": "A String", # Name of the branch to build.
266 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
267 "tagName": "A String", # Name of the tag to build.
268 "commitSha": "A String", # Explicit commit SHA to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700269 },
270 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
271 # source integrity was maintained in the build. Note that FileHashes will
272 # only be populated if BuildOptions has requested a SourceProvenanceHash.
273 #
274 # The keys to this map are file paths used as build source and the values
275 # contain the hash values for those files.
276 #
277 # If the build source came in a single package such as a gzipped tarfile
278 # (.tar.gz), the FileHash will be for the single path to that file.
279 # @OutputOnly
280 "a_key": { # Container message for hashes of byte content of files, used in
281 # SourceProvenance messages to verify integrity of source input to the build.
282 "fileHash": [ # Collection of file hashes.
283 { # Container message for hash values.
284 "type": "A String", # The type of hash that was performed.
285 "value": "A String", # The hash value.
286 },
287 ],
288 },
289 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700290 "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
291 # generations resolved.
292 # Google Cloud Storage.
293 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
294 # omitted, the latest generation will be used.
295 "object": "A String", # Google Cloud Storage object containing source.
296 #
297 # This object must be a gzipped archive file (.tar.gz) containing source to
298 # build.
299 "bucket": "A String", # Google Cloud Storage bucket containing source (see
300 # [Bucket Name
301 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700302 },
303 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400304 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
305 # [Bucket Name
306 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
307 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700308 "images": [ # A list of images to be pushed upon the successful completion of all build
309 # steps.
310 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800311 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700312 #
313 # The digests of the pushed images will be stored in the Build resource's
314 # results field.
315 #
316 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700317 "A String",
318 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700319 "substitutions": { # Substitutions data for Build resource.
320 "a_key": "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 Cheemalapatie833b792017-03-24 15:06:46 -0700345 "createTime": "A String", # Time when the trigger was created.
346 #
347 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400348 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
349 #
350 # Branch and tag names in trigger templates are interpreted as regular
351 # expressions. Any branch or tag change that matches that regular expression
352 # will trigger a build.
353 # Repository.
354 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
355 # the build is assumed.
356 "branchName": "A String", # Name of the branch to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400357 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700358 "tagName": "A String", # Name of the tag to build.
359 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400360 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700361 "disabled": True or False, # If true, the trigger will never result in a build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400362 "substitutions": { # Substitutions data for Build resource.
363 "a_key": "A String",
364 },
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 Cheemalapatie833b792017-03-24 15:06:46 -0700414 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
415 "requestedVerifyOption": "A String", # Requested verifiability options.
416 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
417 "A String",
418 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400419 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700420 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
421 # service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700422 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
423 # Repository.
424 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
425 # the build is assumed.
426 "branchName": "A String", # Name of the branch to build.
427 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
428 "tagName": "A String", # Name of the tag to build.
429 "commitSha": "A String", # Explicit commit SHA to build.
430 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700431 "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
432 # Storage.
433 # Google Cloud Storage.
434 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
435 # omitted, the latest generation will be used.
436 "object": "A String", # Google Cloud Storage object containing source.
437 #
438 # This object must be a gzipped archive file (.tar.gz) containing source to
439 # build.
440 "bucket": "A String", # Google Cloud Storage bucket containing source (see
441 # [Bucket Name
442 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
443 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700444 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800445 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
446 # triggered automatically.
447 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700448 "steps": [ # Describes the operations to be performed on the workspace.
449 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700450 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
451 # This build step will not start until all the build steps in wait_for
452 # have completed successfully. If wait_for is empty, this build step will
453 # start when all previous build steps in the Build.Steps list have completed
454 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700455 "A String",
456 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700457 "name": "A String", # The name of the container image that will run this particular build step.
458 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800459 # If the image is already available in the host's Docker daemon's cache, it
460 # will be run directly. If not, the host will attempt to pull the image
461 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700462 #
463 # The Docker daemon's cache will already have the latest versions of all of
464 # the officially supported build steps
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700465 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
466 # The Docker daemon will also have cached many of the layers for some popular
467 # images, like "ubuntu", "debian", but they will be refreshed at the time you
468 # attempt to use them.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700469 #
470 # If you built an image in a previous build step, it will be stored in the
471 # host's Docker daemon's cache and is available to use as the name for a
472 # later build step.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700473 "args": [ # A list of arguments that will be presented to the step when it is started.
474 #
475 # If the image used to run the step's container has an entrypoint, these args
476 # will be used as arguments to that entrypoint. If the image does not define
477 # an entrypoint, the first element in args will be used as the entrypoint,
478 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700479 "A String",
480 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400481 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
482 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700483 "env": [ # A list of environment variable definitions to be used when running a step.
484 #
485 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
486 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700487 "A String",
488 ],
489 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
490 # reference this build step as a dependency.
491 "dir": "A String", # Working directory (relative to project source root) to use when running
492 # this operation's container.
493 },
494 ],
495 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
496 # @OutputOnly
497 # some source was used for this build.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700498 "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
499 # revisions resolved.
500 # Repository.
501 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
502 # the build is assumed.
503 "branchName": "A String", # Name of the branch to build.
504 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
505 "tagName": "A String", # Name of the tag to build.
506 "commitSha": "A String", # Explicit commit SHA to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700507 },
508 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
509 # source integrity was maintained in the build. Note that FileHashes will
510 # only be populated if BuildOptions has requested a SourceProvenanceHash.
511 #
512 # The keys to this map are file paths used as build source and the values
513 # contain the hash values for those files.
514 #
515 # If the build source came in a single package such as a gzipped tarfile
516 # (.tar.gz), the FileHash will be for the single path to that file.
517 # @OutputOnly
518 "a_key": { # Container message for hashes of byte content of files, used in
519 # SourceProvenance messages to verify integrity of source input to the build.
520 "fileHash": [ # Collection of file hashes.
521 { # Container message for hash values.
522 "type": "A String", # The type of hash that was performed.
523 "value": "A String", # The hash value.
524 },
525 ],
526 },
527 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700528 "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
529 # generations resolved.
530 # Google Cloud Storage.
531 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
532 # omitted, the latest generation will be used.
533 "object": "A String", # Google Cloud Storage object containing source.
534 #
535 # This object must be a gzipped archive file (.tar.gz) containing source to
536 # build.
537 "bucket": "A String", # Google Cloud Storage bucket containing source (see
538 # [Bucket Name
539 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700540 },
541 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400542 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
543 # [Bucket Name
544 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
545 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700546 "images": [ # A list of images to be pushed upon the successful completion of all build
547 # steps.
548 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800549 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700550 #
551 # The digests of the pushed images will be stored in the Build resource's
552 # results field.
553 #
554 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700555 "A String",
556 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700557 "substitutions": { # Substitutions data for Build resource.
558 "a_key": "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 Cheemalapatie833b792017-03-24 15:06:46 -0700622 "createTime": "A String", # Time when the trigger was created.
623 #
624 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400625 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
626 #
627 # Branch and tag names in trigger templates are interpreted as regular
628 # expressions. Any branch or tag change that matches that regular expression
629 # will trigger a build.
630 # Repository.
631 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
632 # the build is assumed.
633 "branchName": "A String", # Name of the branch to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400634 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700635 "tagName": "A String", # Name of the tag to build.
636 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400637 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700638 "disabled": True or False, # If true, the trigger will never result in a build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400639 "substitutions": { # Substitutions data for Build resource.
640 "a_key": "A String",
641 },
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 Cheemalapatie833b792017-03-24 15:06:46 -0700691 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
692 "requestedVerifyOption": "A String", # Requested verifiability options.
693 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
694 "A String",
695 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400696 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700697 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
698 # service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700699 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
700 # Repository.
701 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
702 # the build is assumed.
703 "branchName": "A String", # Name of the branch to build.
704 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
705 "tagName": "A String", # Name of the tag to build.
706 "commitSha": "A String", # Explicit commit SHA to build.
707 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700708 "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
709 # Storage.
710 # Google Cloud Storage.
711 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
712 # omitted, the latest generation will be used.
713 "object": "A String", # Google Cloud Storage object containing source.
714 #
715 # This object must be a gzipped archive file (.tar.gz) containing source to
716 # build.
717 "bucket": "A String", # Google Cloud Storage bucket containing source (see
718 # [Bucket Name
719 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
720 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700721 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800722 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
723 # triggered automatically.
724 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700725 "steps": [ # Describes the operations to be performed on the workspace.
726 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700727 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
728 # This build step will not start until all the build steps in wait_for
729 # have completed successfully. If wait_for is empty, this build step will
730 # start when all previous build steps in the Build.Steps list have completed
731 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700732 "A String",
733 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700734 "name": "A String", # The name of the container image that will run this particular build step.
735 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800736 # If the image is already available in the host's Docker daemon's cache, it
737 # will be run directly. If not, the host will attempt to pull the image
738 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700739 #
740 # The Docker daemon's cache will already have the latest versions of all of
741 # the officially supported build steps
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700742 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
743 # The Docker daemon will also have cached many of the layers for some popular
744 # images, like "ubuntu", "debian", but they will be refreshed at the time you
745 # attempt to use them.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700746 #
747 # If you built an image in a previous build step, it will be stored in the
748 # host's Docker daemon's cache and is available to use as the name for a
749 # later build step.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700750 "args": [ # A list of arguments that will be presented to the step when it is started.
751 #
752 # If the image used to run the step's container has an entrypoint, these args
753 # will be used as arguments to that entrypoint. If the image does not define
754 # an entrypoint, the first element in args will be used as the entrypoint,
755 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700756 "A String",
757 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400758 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
759 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700760 "env": [ # A list of environment variable definitions to be used when running a step.
761 #
762 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
763 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700764 "A String",
765 ],
766 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
767 # reference this build step as a dependency.
768 "dir": "A String", # Working directory (relative to project source root) to use when running
769 # this operation's container.
770 },
771 ],
772 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
773 # @OutputOnly
774 # some source was used for this build.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700775 "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
776 # revisions resolved.
777 # Repository.
778 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
779 # the build is assumed.
780 "branchName": "A String", # Name of the branch to build.
781 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
782 "tagName": "A String", # Name of the tag to build.
783 "commitSha": "A String", # Explicit commit SHA to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700784 },
785 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
786 # source integrity was maintained in the build. Note that FileHashes will
787 # only be populated if BuildOptions has requested a SourceProvenanceHash.
788 #
789 # The keys to this map are file paths used as build source and the values
790 # contain the hash values for those files.
791 #
792 # If the build source came in a single package such as a gzipped tarfile
793 # (.tar.gz), the FileHash will be for the single path to that file.
794 # @OutputOnly
795 "a_key": { # Container message for hashes of byte content of files, used in
796 # SourceProvenance messages to verify integrity of source input to the build.
797 "fileHash": [ # Collection of file hashes.
798 { # Container message for hash values.
799 "type": "A String", # The type of hash that was performed.
800 "value": "A String", # The hash value.
801 },
802 ],
803 },
804 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700805 "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
806 # generations resolved.
807 # Google Cloud Storage.
808 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
809 # omitted, the latest generation will be used.
810 "object": "A String", # Google Cloud Storage object containing source.
811 #
812 # This object must be a gzipped archive file (.tar.gz) containing source to
813 # build.
814 "bucket": "A String", # Google Cloud Storage bucket containing source (see
815 # [Bucket Name
816 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700817 },
818 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400819 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
820 # [Bucket Name
821 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
822 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700823 "images": [ # A list of images to be pushed upon the successful completion of all build
824 # steps.
825 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800826 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700827 #
828 # The digests of the pushed images will be stored in the Build resource's
829 # results field.
830 #
831 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700832 "A String",
833 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700834 "substitutions": { # Substitutions data for Build resource.
835 "a_key": "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 Cheemalapatie833b792017-03-24 15:06:46 -0700871 "createTime": "A String", # Time when the trigger was created.
872 #
873 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400874 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
875 #
876 # Branch and tag names in trigger templates are interpreted as regular
877 # expressions. Any branch or tag change that matches that regular expression
878 # will trigger a build.
879 # Repository.
880 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
881 # the build is assumed.
882 "branchName": "A String", # Name of the branch to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400883 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700884 "tagName": "A String", # Name of the tag to build.
885 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400886 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700887 "disabled": True or False, # If true, the trigger will never result in a build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400888 "substitutions": { # Substitutions data for Build resource.
889 "a_key": "A String",
890 },
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 Cheemalapatie833b792017-03-24 15:06:46 -0700940 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
941 "requestedVerifyOption": "A String", # Requested verifiability options.
942 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
943 "A String",
944 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400945 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700946 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
947 # service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700948 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
949 # Repository.
950 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
951 # the build is assumed.
952 "branchName": "A String", # Name of the branch to build.
953 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
954 "tagName": "A String", # Name of the tag to build.
955 "commitSha": "A String", # Explicit commit SHA to build.
956 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700957 "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
958 # Storage.
959 # Google Cloud Storage.
960 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
961 # omitted, the latest generation will be used.
962 "object": "A String", # Google Cloud Storage object containing source.
963 #
964 # This object must be a gzipped archive file (.tar.gz) containing source to
965 # build.
966 "bucket": "A String", # Google Cloud Storage bucket containing source (see
967 # [Bucket Name
968 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
969 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700970 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800971 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
972 # triggered automatically.
973 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700974 "steps": [ # Describes the operations to be performed on the workspace.
975 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700976 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
977 # This build step will not start until all the build steps in wait_for
978 # have completed successfully. If wait_for is empty, this build step will
979 # start when all previous build steps in the Build.Steps list have completed
980 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700981 "A String",
982 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700983 "name": "A String", # The name of the container image that will run this particular build step.
984 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800985 # If the image is already available in the host's Docker daemon's cache, it
986 # will be run directly. If not, the host will attempt to pull the image
987 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700988 #
989 # The Docker daemon's cache will already have the latest versions of all of
990 # the officially supported build steps
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700991 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
992 # The Docker daemon will also have cached many of the layers for some popular
993 # images, like "ubuntu", "debian", but they will be refreshed at the time you
994 # attempt to use them.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700995 #
996 # If you built an image in a previous build step, it will be stored in the
997 # host's Docker daemon's cache and is available to use as the name for a
998 # later build step.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700999 "args": [ # A list of arguments that will be presented to the step when it is started.
1000 #
1001 # If the image used to run the step's container has an entrypoint, these args
1002 # will be used as arguments to that entrypoint. If the image does not define
1003 # an entrypoint, the first element in args will be used as the entrypoint,
1004 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001005 "A String",
1006 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001007 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
1008 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001009 "env": [ # A list of environment variable definitions to be used when running a step.
1010 #
1011 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1012 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001013 "A String",
1014 ],
1015 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
1016 # reference this build step as a dependency.
1017 "dir": "A String", # Working directory (relative to project source root) to use when running
1018 # this operation's container.
1019 },
1020 ],
1021 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
1022 # @OutputOnly
1023 # some source was used for this build.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001024 "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
1025 # revisions resolved.
1026 # Repository.
1027 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1028 # the build is assumed.
1029 "branchName": "A String", # Name of the branch to build.
1030 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1031 "tagName": "A String", # Name of the tag to build.
1032 "commitSha": "A String", # Explicit commit SHA to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001033 },
1034 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
1035 # source integrity was maintained in the build. Note that FileHashes will
1036 # only be populated if BuildOptions has requested a SourceProvenanceHash.
1037 #
1038 # The keys to this map are file paths used as build source and the values
1039 # contain the hash values for those files.
1040 #
1041 # If the build source came in a single package such as a gzipped tarfile
1042 # (.tar.gz), the FileHash will be for the single path to that file.
1043 # @OutputOnly
1044 "a_key": { # Container message for hashes of byte content of files, used in
1045 # SourceProvenance messages to verify integrity of source input to the build.
1046 "fileHash": [ # Collection of file hashes.
1047 { # Container message for hash values.
1048 "type": "A String", # The type of hash that was performed.
1049 "value": "A String", # The hash value.
1050 },
1051 ],
1052 },
1053 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001054 "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
1055 # generations resolved.
1056 # Google Cloud Storage.
1057 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1058 # omitted, the latest generation will be used.
1059 "object": "A String", # Google Cloud Storage object containing source.
1060 #
1061 # This object must be a gzipped archive file (.tar.gz) containing source to
1062 # build.
1063 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1064 # [Bucket Name
1065 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001066 },
1067 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001068 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1069 # [Bucket Name
1070 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1071 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001072 "images": [ # A list of images to be pushed upon the successful completion of all build
1073 # steps.
1074 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001075 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001076 #
1077 # The digests of the pushed images will be stored in the Build resource's
1078 # results field.
1079 #
1080 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001081 "A String",
1082 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001083 "substitutions": { # Substitutions data for Build resource.
1084 "a_key": "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 Cheemalapatie833b792017-03-24 15:06:46 -07001116 "createTime": "A String", # Time when the trigger was created.
1117 #
1118 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001119 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
1120 #
1121 # Branch and tag names in trigger templates are interpreted as regular
1122 # expressions. Any branch or tag change that matches that regular expression
1123 # will trigger a build.
1124 # Repository.
1125 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1126 # the build is assumed.
1127 "branchName": "A String", # Name of the branch to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001128 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001129 "tagName": "A String", # Name of the tag to build.
1130 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001131 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001132 "disabled": True or False, # If true, the trigger will never result in a build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001133 "substitutions": { # Substitutions data for Build resource.
1134 "a_key": "A String",
1135 },
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 Cheemalapatie833b792017-03-24 15:06:46 -07001185 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
1186 "requestedVerifyOption": "A String", # Requested verifiability options.
1187 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1188 "A String",
1189 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001190 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001191 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
1192 # service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001193 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
1194 # Repository.
1195 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1196 # the build is assumed.
1197 "branchName": "A String", # Name of the branch to build.
1198 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1199 "tagName": "A String", # Name of the tag to build.
1200 "commitSha": "A String", # Explicit commit SHA to build.
1201 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001202 "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
1203 # Storage.
1204 # Google Cloud Storage.
1205 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1206 # omitted, the latest generation will be used.
1207 "object": "A String", # Google Cloud Storage object containing source.
1208 #
1209 # This object must be a gzipped archive file (.tar.gz) containing source to
1210 # build.
1211 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1212 # [Bucket Name
1213 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1214 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001215 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001216 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
1217 # triggered automatically.
1218 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001219 "steps": [ # Describes the operations to be performed on the workspace.
1220 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001221 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1222 # This build step will not start until all the build steps in wait_for
1223 # have completed successfully. If wait_for is empty, this build step will
1224 # start when all previous build steps in the Build.Steps list have completed
1225 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001226 "A String",
1227 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001228 "name": "A String", # The name of the container image that will run this particular build step.
1229 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001230 # If the image is already available in the host's Docker daemon's cache, it
1231 # will be run directly. If not, the host will attempt to pull the image
1232 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001233 #
1234 # The Docker daemon's cache will already have the latest versions of all of
1235 # the officially supported build steps
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001236 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1237 # The Docker daemon will also have cached many of the layers for some popular
1238 # images, like "ubuntu", "debian", but they will be refreshed at the time you
1239 # attempt to use them.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001240 #
1241 # If you built an image in a previous build step, it will be stored in the
1242 # host's Docker daemon's cache and is available to use as the name for a
1243 # later build step.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001244 "args": [ # A list of arguments that will be presented to the step when it is started.
1245 #
1246 # If the image used to run the step's container has an entrypoint, these args
1247 # will be used as arguments to that entrypoint. If the image does not define
1248 # an entrypoint, the first element in args will be used as the entrypoint,
1249 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001250 "A String",
1251 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001252 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
1253 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001254 "env": [ # A list of environment variable definitions to be used when running a step.
1255 #
1256 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1257 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001258 "A String",
1259 ],
1260 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
1261 # reference this build step as a dependency.
1262 "dir": "A String", # Working directory (relative to project source root) to use when running
1263 # this operation's container.
1264 },
1265 ],
1266 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
1267 # @OutputOnly
1268 # some source was used for this build.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001269 "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
1270 # revisions resolved.
1271 # Repository.
1272 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1273 # the build is assumed.
1274 "branchName": "A String", # Name of the branch to build.
1275 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1276 "tagName": "A String", # Name of the tag to build.
1277 "commitSha": "A String", # Explicit commit SHA to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001278 },
1279 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
1280 # source integrity was maintained in the build. Note that FileHashes will
1281 # only be populated if BuildOptions has requested a SourceProvenanceHash.
1282 #
1283 # The keys to this map are file paths used as build source and the values
1284 # contain the hash values for those files.
1285 #
1286 # If the build source came in a single package such as a gzipped tarfile
1287 # (.tar.gz), the FileHash will be for the single path to that file.
1288 # @OutputOnly
1289 "a_key": { # Container message for hashes of byte content of files, used in
1290 # SourceProvenance messages to verify integrity of source input to the build.
1291 "fileHash": [ # Collection of file hashes.
1292 { # Container message for hash values.
1293 "type": "A String", # The type of hash that was performed.
1294 "value": "A String", # The hash value.
1295 },
1296 ],
1297 },
1298 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001299 "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
1300 # generations resolved.
1301 # Google Cloud Storage.
1302 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1303 # omitted, the latest generation will be used.
1304 "object": "A String", # Google Cloud Storage object containing source.
1305 #
1306 # This object must be a gzipped archive file (.tar.gz) containing source to
1307 # build.
1308 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1309 # [Bucket Name
1310 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001311 },
1312 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001313 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1314 # [Bucket Name
1315 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1316 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001317 "images": [ # A list of images to be pushed upon the successful completion of all build
1318 # steps.
1319 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001320 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001321 #
1322 # The digests of the pushed images will be stored in the Build resource's
1323 # results field.
1324 #
1325 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001326 "A String",
1327 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001328 "substitutions": { # Substitutions data for Build resource.
1329 "a_key": "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 Cheemalapatie833b792017-03-24 15:06:46 -07001354 "createTime": "A String", # Time when the trigger was created.
1355 #
1356 # @OutputOnly
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001357 "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build.
1358 #
1359 # Branch and tag names in trigger templates are interpreted as regular
1360 # expressions. Any branch or tag change that matches that regular expression
1361 # will trigger a build.
1362 # Repository.
1363 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1364 # the build is assumed.
1365 "branchName": "A String", # Name of the branch to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001366 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001367 "tagName": "A String", # Name of the tag to build.
1368 "commitSha": "A String", # Explicit commit SHA to build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001369 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001370 "disabled": True or False, # If true, the trigger will never result in a build.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001371 "substitutions": { # Substitutions data for Build resource.
1372 "a_key": "A String",
1373 },
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 Cheemalapatie833b792017-03-24 15:06:46 -07001423 "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
1424 "requestedVerifyOption": "A String", # Requested verifiability options.
1425 "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
1426 "A String",
1427 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001428 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001429 "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
1430 # service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001431 "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
1432 # Repository.
1433 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1434 # the build is assumed.
1435 "branchName": "A String", # Name of the branch to build.
1436 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1437 "tagName": "A String", # Name of the tag to build.
1438 "commitSha": "A String", # Explicit commit SHA to build.
1439 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001440 "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
1441 # Storage.
1442 # Google Cloud Storage.
1443 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1444 # omitted, the latest generation will be used.
1445 "object": "A String", # Google Cloud Storage object containing source.
1446 #
1447 # This object must be a gzipped archive file (.tar.gz) containing source to
1448 # build.
1449 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1450 # [Bucket Name
1451 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1452 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001453 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001454 "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was
1455 # triggered automatically.
1456 # @OutputOnly
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001457 "steps": [ # Describes the operations to be performed on the workspace.
1458 { # BuildStep describes a step to perform in the build pipeline.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001459 "waitFor": [ # The ID(s) of the step(s) that this build step depends on.
1460 # This build step will not start until all the build steps in wait_for
1461 # have completed successfully. If wait_for is empty, this build step will
1462 # start when all previous build steps in the Build.Steps list have completed
1463 # successfully.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001464 "A String",
1465 ],
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001466 "name": "A String", # The name of the container image that will run this particular build step.
1467 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001468 # If the image is already available in the host's Docker daemon's cache, it
1469 # will be run directly. If not, the host will attempt to pull the image
1470 # first, using the builder service account's credentials if necessary.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001471 #
1472 # The Docker daemon's cache will already have the latest versions of all of
1473 # the officially supported build steps
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001474 # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
1475 # The Docker daemon will also have cached many of the layers for some popular
1476 # images, like "ubuntu", "debian", but they will be refreshed at the time you
1477 # attempt to use them.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001478 #
1479 # If you built an image in a previous build step, it will be stored in the
1480 # host's Docker daemon's cache and is available to use as the name for a
1481 # later build step.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001482 "args": [ # A list of arguments that will be presented to the step when it is started.
1483 #
1484 # If the image used to run the step's container has an entrypoint, these args
1485 # will be used as arguments to that entrypoint. If the image does not define
1486 # an entrypoint, the first element in args will be used as the entrypoint,
1487 # and the remainder will be used as arguments.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001488 "A String",
1489 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001490 "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default
1491 # If unset, the image's default will be used.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001492 "env": [ # A list of environment variable definitions to be used when running a step.
1493 #
1494 # The elements are of the form "KEY=VALUE" for the environment variable "KEY"
1495 # being given the value "VALUE".
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001496 "A String",
1497 ],
1498 "id": "A String", # Optional unique identifier for this build step, used in wait_for to
1499 # reference this build step as a dependency.
1500 "dir": "A String", # Working directory (relative to project source root) to use when running
1501 # this operation's container.
1502 },
1503 ],
1504 "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
1505 # @OutputOnly
1506 # some source was used for this build.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001507 "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
1508 # revisions resolved.
1509 # Repository.
1510 "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
1511 # the build is assumed.
1512 "branchName": "A String", # Name of the branch to build.
1513 "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
1514 "tagName": "A String", # Name of the tag to build.
1515 "commitSha": "A String", # Explicit commit SHA to build.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001516 },
1517 "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original
1518 # source integrity was maintained in the build. Note that FileHashes will
1519 # only be populated if BuildOptions has requested a SourceProvenanceHash.
1520 #
1521 # The keys to this map are file paths used as build source and the values
1522 # contain the hash values for those files.
1523 #
1524 # If the build source came in a single package such as a gzipped tarfile
1525 # (.tar.gz), the FileHash will be for the single path to that file.
1526 # @OutputOnly
1527 "a_key": { # Container message for hashes of byte content of files, used in
1528 # SourceProvenance messages to verify integrity of source input to the build.
1529 "fileHash": [ # Collection of file hashes.
1530 { # Container message for hash values.
1531 "type": "A String", # The type of hash that was performed.
1532 "value": "A String", # The hash value.
1533 },
1534 ],
1535 },
1536 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001537 "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
1538 # generations resolved.
1539 # Google Cloud Storage.
1540 "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
1541 # omitted, the latest generation will be used.
1542 "object": "A String", # Google Cloud Storage object containing source.
1543 #
1544 # This object must be a gzipped archive file (.tar.gz) containing source to
1545 # build.
1546 "bucket": "A String", # Google Cloud Storage bucket containing source (see
1547 # [Bucket Name
1548 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001549 },
1550 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001551 "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see
1552 # [Bucket Name
1553 # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1554 # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001555 "images": [ # A list of images to be pushed upon the successful completion of all build
1556 # steps.
1557 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001558 # The images will be pushed using the builder service account's credentials.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001559 #
1560 # The digests of the pushed images will be stored in the Build resource's
1561 # results field.
1562 #
1563 # If any of the images fail to be pushed, the build is marked FAILURE.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001564 "A String",
1565 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001566 "substitutions": { # Substitutions data for Build resource.
1567 "a_key": "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>