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