Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 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 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="cloudbuild_v1.html">Cloud Build API</a> . <a href="cloudbuild_v1.projects.html">projects</a> . <a href="cloudbuild_v1.projects.builds.html">builds</a></h1> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 78 | <code><a href="#cancel">cancel(projectId, id, body=None, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Cancels a build in progress.</p> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#create">create(projectId, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 82 | <p class="firstline">Starts a build with the specified configuration.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(projectId, id, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Returns information about a previously requested build.</p> |
| 86 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 87 | <code><a href="#list">list(projectId, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 88 | <p class="firstline">Lists previously requested builds.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 91 | <p class="firstline">Retrieves the next page of results.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 92 | <p class="toc_element"> |
| 93 | <code><a href="#retry">retry(projectId, id, body=None, x__xgafv=None)</a></code></p> |
| 94 | <p class="firstline">Creates a new build based on the specified build.</p> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <code class="details" id="cancel">cancel(projectId, id, body=None, x__xgafv=None)</code> |
| 98 | <pre>Cancels a build in progress. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 99 | |
| 100 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 101 | projectId: string, Required. ID of the project. (required) |
| 102 | id: string, Required. ID of the build. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 103 | body: object, The request body. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 104 | The object takes the form of: |
| 105 | |
| 106 | { # Request to cancel an ongoing build. |
| 107 | } |
| 108 | |
| 109 | x__xgafv: string, V1 error format. |
| 110 | Allowed values |
| 111 | 1 - v1 error format |
| 112 | 2 - v2 error format |
| 113 | |
| 114 | Returns: |
| 115 | An object of the form: |
| 116 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 117 | { # A build resource in the Cloud Build API. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 118 | # |
| 119 | # At a high level, a `Build` describes where to find source code, how to build |
| 120 | # it (for example, the builder image to run on the source), and where to store |
| 121 | # the built artifacts. |
| 122 | # |
| 123 | # Fields can include the following variables, which will be expanded when the |
| 124 | # build is created: |
| 125 | # |
| 126 | # - $PROJECT_ID: the project ID of the build. |
| 127 | # - $BUILD_ID: the autogenerated ID of the build. |
| 128 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 129 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 130 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 131 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 132 | # resolved from the specified branch or tag. |
| 133 | # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. |
| 134 | "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer |
| 135 | # than this value, the build will expire and the build status will be |
| 136 | # `EXPIRED`. |
| 137 | # |
| 138 | # The TTL starts ticking from create_time. |
| 139 | "statusDetail": "A String", # Output only. Customer-readable message about the current status. |
| 140 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source. |
| 141 | # some source was used for this build. |
| 142 | "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any |
| 143 | # revisions resolved. |
| 144 | "tagName": "A String", # Regex matching tags to build. |
| 145 | # |
| 146 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 147 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 148 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 149 | # |
| 150 | # This must be a relative path. If a step's `dir` is specified and is an |
| 151 | # absolute path, this value is ignored for that step's execution. |
| 152 | "substitutions": { # Substitutions to use in a triggered build. |
| 153 | # Should only be used with RunBuildTrigger |
| 154 | "a_key": "A String", |
| 155 | }, |
| 156 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 157 | "commitSha": "A String", # Explicit commit SHA to build. |
| 158 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 159 | # regex. |
| 160 | "branchName": "A String", # Regex matching branches to build. |
| 161 | # |
| 162 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 163 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 164 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 165 | # project ID requesting the build is assumed. |
| 166 | }, |
| 167 | "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any |
| 168 | # generations resolved. |
| 169 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 170 | # omitted, the latest generation will be used. |
| 171 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 172 | # [Bucket Name |
| 173 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 174 | "object": "A String", # Google Cloud Storage object containing the source. |
| 175 | # |
| 176 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 177 | # build. |
| 178 | }, |
| 179 | "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that |
| 180 | # the original source integrity was maintained in the build. Note that |
| 181 | # `FileHashes` will only be populated if `BuildOptions` has requested a |
| 182 | # `SourceProvenanceHash`. |
| 183 | # |
| 184 | # The keys to this map are file paths used as build source and the values |
| 185 | # contain the hash values for those files. |
| 186 | # |
| 187 | # If the build source came in a single package such as a gzipped tarfile |
| 188 | # (`.tar.gz`), the `FileHash` will be for the single path to that file. |
| 189 | "a_key": { # Container message for hashes of byte content of files, used in |
| 190 | # SourceProvenance messages to verify integrity of source input to the build. |
| 191 | "fileHash": [ # Collection of file hashes. |
| 192 | { # Container message for hash values. |
| 193 | "value": "A String", # The hash value. |
| 194 | "type": "A String", # The type of hash that was performed. |
| 195 | }, |
| 196 | ], |
| 197 | }, |
| 198 | }, |
| 199 | }, |
| 200 | "secrets": [ # Secrets to decrypt using Cloud Key Management Service. |
| 201 | { # Pairs a set of secret environment variables containing encrypted |
| 202 | # values with the Cloud KMS key to use to decrypt the value. |
| 203 | "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs. |
| 204 | "secretEnv": { # Map of environment variable name to its encrypted value. |
| 205 | # |
| 206 | # Secret environment variables must be unique across all of a build's |
| 207 | # secrets, and must be used by at least one build step. Values can be at most |
| 208 | # 64 KB in size. There can be at most 100 secret values across all of a |
| 209 | # build's secrets. |
| 210 | "a_key": "A String", |
| 211 | }, |
| 212 | }, |
| 213 | ], |
| 214 | "results": { # Artifacts created by the build pipeline. # Output only. Results of the build. |
| 215 | "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded. |
| 216 | "buildStepImages": [ # List of build step digests, in the order corresponding to build step |
| 217 | # indices. |
| 218 | "A String", |
| 219 | ], |
| 220 | "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts. |
| 221 | "startTime": "A String", # Start of time span. |
| 222 | "endTime": "A String", # End of time span. |
| 223 | }, |
| 224 | "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded. |
| 225 | "images": [ # Container images that were built as a part of the build. |
| 226 | { # An image built by the pipeline. |
| 227 | "digest": "A String", # Docker Registry 2.0 digest. |
| 228 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 229 | # presented to `docker push`. |
| 230 | "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image. |
| 231 | "startTime": "A String", # Start of time span. |
| 232 | "endTime": "A String", # End of time span. |
| 233 | }, |
| 234 | }, |
| 235 | ], |
| 236 | "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order |
| 237 | # corresponding to build step indices. |
| 238 | # |
| 239 | # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) |
| 240 | # can produce this output by writing to `$BUILDER_OUTPUT/output`. |
| 241 | # Only the first 4KB of data is stored. |
| 242 | "A String", |
| 243 | ], |
| 244 | }, |
| 245 | "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console. |
| 246 | "timing": { # Output only. Stores timing information for phases of the build. Valid keys |
| 247 | # are: |
| 248 | # |
| 249 | # * BUILD: time to execute all build steps |
| 250 | # * PUSH: time to push all specified images. |
| 251 | # * FETCHSOURCE: time to fetch source. |
| 252 | # |
| 253 | # If the build does not specify source or images, |
| 254 | # these keys will not be included. |
| 255 | "a_key": { # Start and end times for a build execution phase. |
| 256 | "startTime": "A String", # Start of time span. |
| 257 | "endTime": "A String", # End of time span. |
| 258 | }, |
| 259 | }, |
| 260 | "finishTime": "A String", # Output only. Time at which execution of the build was finished. |
| 261 | # |
| 262 | # The difference between finish_time and start_time is the duration of the |
| 263 | # build's execution. |
| 264 | "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it |
| 265 | # was triggered automatically. |
| 266 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 267 | # granularity. If this amount of time elapses, work on the build will cease |
| 268 | # and the build status will be `TIMEOUT`. |
| 269 | # |
| 270 | # `timeout` starts ticking from `startTime`. |
| 271 | # |
| 272 | # Default time is ten minutes. |
| 273 | "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon |
| 274 | # successful completion of all build steps. |
| 275 | # successful completion of all build steps. |
| 276 | "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful |
| 277 | # completion of all build steps. |
| 278 | # |
| 279 | # Files in the workspace matching specified paths globs will be uploaded to |
| 280 | # the specified Cloud Storage location using the builder service account's |
| 281 | # credentials. |
| 282 | # |
| 283 | # The location and generation of the uploaded objects will be stored in the |
| 284 | # Build resource's results field. |
| 285 | # |
| 286 | # If any objects fail to be pushed, the build is marked FAILURE. |
| 287 | # completion of all build steps. |
| 288 | "location": "A String", # Cloud Storage bucket and optional object path, in the form |
| 289 | # "gs://bucket/path/to/somewhere/". (see [Bucket Name |
| 290 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 291 | # |
| 292 | # Files in the workspace matching any path pattern will be uploaded to |
| 293 | # Cloud Storage with this location as a prefix. |
| 294 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects. |
| 295 | "startTime": "A String", # Start of time span. |
| 296 | "endTime": "A String", # End of time span. |
| 297 | }, |
| 298 | "paths": [ # Path globs used to match files in the build's workspace. |
| 299 | "A String", |
| 300 | ], |
| 301 | }, |
| 302 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 303 | # steps. |
| 304 | # |
| 305 | # The images will be pushed using the builder service account's credentials. |
| 306 | # |
| 307 | # The digests of the pushed images will be stored in the Build resource's |
| 308 | # results field. |
| 309 | # |
| 310 | # If any of the images fail to be pushed, the build is marked FAILURE. |
| 311 | "A String", |
| 312 | ], |
| 313 | }, |
| 314 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 315 | # [Bucket Name |
| 316 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 317 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 318 | "steps": [ # Required. The operations to be performed on the workspace. |
| 319 | { # A step in the build pipeline. |
| 320 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 321 | # |
| 322 | # If the image used to run the step's container has an entrypoint, the `args` |
| 323 | # are used as arguments to that entrypoint. If the image does not define |
| 324 | # an entrypoint, the first element in args is used as the entrypoint, |
| 325 | # and the remainder will be used as arguments. |
| 326 | "A String", |
| 327 | ], |
| 328 | "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint. |
| 329 | # If unset, the image's default entrypoint is used. |
| 330 | "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key |
| 331 | # Management Service crypto key. These values must be specified in the |
| 332 | # build's `Secret`. |
| 333 | "A String", |
| 334 | ], |
| 335 | "status": "A String", # Output only. Status of the build step. At this time, build step status is |
| 336 | # only updated on build completion; step status is not updated in real-time |
| 337 | # as the build progresses. |
| 338 | "volumes": [ # List of volumes to mount into the build step. |
| 339 | # |
| 340 | # Each volume is created as an empty volume prior to execution of the |
| 341 | # build step. Upon completion of the build, volumes and their contents are |
| 342 | # discarded. |
| 343 | # |
| 344 | # Using a named volume in only one step is not valid as it is indicative |
| 345 | # of a build request with an incorrect configuration. |
| 346 | { # Volume describes a Docker container volume which is mounted into build steps |
| 347 | # in order to persist files across build step execution. |
| 348 | "path": "A String", # Path at which to mount the volume. |
| 349 | # |
| 350 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 351 | # same build step or with certain reserved volume paths. |
| 352 | "name": "A String", # Name of the volume to mount. |
| 353 | # |
| 354 | # Volume names must be unique per build step and must be valid names for |
| 355 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 356 | }, |
| 357 | ], |
| 358 | "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no |
| 359 | # time limit and will be allowed to continue to run until either it completes |
| 360 | # or the build itself times out. |
| 361 | "dir": "A String", # Working directory to use when running this step's container. |
| 362 | # |
| 363 | # If this value is a relative path, it is relative to the build's working |
| 364 | # directory. If this value is absolute, it may be outside the build's working |
| 365 | # directory, in which case the contents of the path may not be persisted |
| 366 | # across build step executions, unless a `volume` for that path is specified. |
| 367 | # |
| 368 | # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, |
| 369 | # which specifies an absolute path, the `RepoSource` `dir` is ignored for |
| 370 | # the step's execution. |
| 371 | "id": "A String", # Unique identifier for this build step, used in `wait_for` to |
| 372 | # reference this build step as a dependency. |
| 373 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 374 | # |
| 375 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 376 | # being given the value "VALUE". |
| 377 | "A String", |
| 378 | ], |
| 379 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 380 | # This build step will not start until all the build steps in `wait_for` |
| 381 | # have completed successfully. If `wait_for` is empty, this build step will |
| 382 | # start when all previous build steps in the `Build.Steps` list have |
| 383 | # completed successfully. |
| 384 | "A String", |
| 385 | ], |
| 386 | "name": "A String", # Required. The name of the container image that will run this particular |
| 387 | # build step. |
| 388 | # |
| 389 | # If the image is available in the host's Docker daemon's cache, it |
| 390 | # will be run directly. If not, the host will attempt to pull the image |
| 391 | # first, using the builder service account's credentials if necessary. |
| 392 | # |
| 393 | # The Docker daemon's cache will already have the latest versions of all of |
| 394 | # the officially supported build steps |
| 395 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 396 | # The Docker daemon will also have cached many of the layers for some popular |
| 397 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 398 | # attempt to use them. |
| 399 | # |
| 400 | # If you built an image in a previous build step, it will be stored in the |
| 401 | # host's Docker daemon's cache and is available to use as the name for a |
| 402 | # later build step. |
| 403 | "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's |
| 404 | # builder image only. |
| 405 | "startTime": "A String", # Start of time span. |
| 406 | "endTime": "A String", # End of time span. |
| 407 | }, |
| 408 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step. |
| 409 | "startTime": "A String", # Start of time span. |
| 410 | "endTime": "A String", # End of time span. |
| 411 | }, |
| 412 | }, |
| 413 | ], |
| 414 | "id": "A String", # Output only. Unique identifier of the build. |
| 415 | "status": "A String", # Output only. Status of the build. |
| 416 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 417 | # steps. |
| 418 | # |
| 419 | # The images are pushed using the builder service account's credentials. |
| 420 | # |
| 421 | # The digests of the pushed images will be stored in the `Build` resource's |
| 422 | # results field. |
| 423 | # |
| 424 | # If any of the images fail to be pushed, the build status is marked |
| 425 | # `FAILURE`. |
| 426 | "A String", |
| 427 | ], |
| 428 | "projectId": "A String", # Output only. ID of the project. |
| 429 | "source": { # Location of the source in a supported storage service. # The location of the source files to build. |
| 430 | "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage. |
| 431 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 432 | # omitted, the latest generation will be used. |
| 433 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 434 | # [Bucket Name |
| 435 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 436 | "object": "A String", # Google Cloud Storage object containing the source. |
| 437 | # |
| 438 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 439 | # build. |
| 440 | }, |
| 441 | "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source |
| 442 | # Repository. |
| 443 | "tagName": "A String", # Regex matching tags to build. |
| 444 | # |
| 445 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 446 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 447 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 448 | # |
| 449 | # This must be a relative path. If a step's `dir` is specified and is an |
| 450 | # absolute path, this value is ignored for that step's execution. |
| 451 | "substitutions": { # Substitutions to use in a triggered build. |
| 452 | # Should only be used with RunBuildTrigger |
| 453 | "a_key": "A String", |
| 454 | }, |
| 455 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 456 | "commitSha": "A String", # Explicit commit SHA to build. |
| 457 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 458 | # regex. |
| 459 | "branchName": "A String", # Regex matching branches to build. |
| 460 | # |
| 461 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 462 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 463 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 464 | # project ID requesting the build is assumed. |
| 465 | }, |
| 466 | }, |
| 467 | "tags": [ # Tags for annotation of a `Build`. These are not docker tags. |
| 468 | "A String", |
| 469 | ], |
| 470 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 471 | "volumes": [ # Global list of volumes to mount for ALL build steps |
| 472 | # |
| 473 | # Each volume is created as an empty volume prior to starting the build |
| 474 | # process. Upon completion of the build, volumes and their contents are |
| 475 | # discarded. Global volume names and paths cannot conflict with the volumes |
| 476 | # defined a build step. |
| 477 | # |
| 478 | # Using a global volume in a build with only one step is not valid as |
| 479 | # it is indicative of a build request with an incorrect configuration. |
| 480 | { # Volume describes a Docker container volume which is mounted into build steps |
| 481 | # in order to persist files across build step execution. |
| 482 | "path": "A String", # Path at which to mount the volume. |
| 483 | # |
| 484 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 485 | # same build step or with certain reserved volume paths. |
| 486 | "name": "A String", # Name of the volume to mount. |
| 487 | # |
| 488 | # Volume names must be unique per build step and must be valid names for |
| 489 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 490 | }, |
| 491 | ], |
| 492 | "env": [ # A list of global environment variable definitions that will exist for all |
| 493 | # build steps in this build. If a variable is defined in both globally and in |
| 494 | # a build step, the variable will use the build step value. |
| 495 | # |
| 496 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 497 | # being given the value "VALUE". |
| 498 | "A String", |
| 499 | ], |
| 500 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 501 | "A String", |
| 502 | ], |
| 503 | "machineType": "A String", # Compute Engine machine type on which to run the build. |
| 504 | "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud |
| 505 | # Storage. |
| 506 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 507 | "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution |
| 508 | # checks. |
| 509 | # |
| 510 | # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot |
| 511 | # be overridden in the build configuration file. |
| 512 | "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT* |
| 513 | # "disk free"; some of the space will be used by the operating system and |
| 514 | # build utilities. Also note that this is the minimum disk size that will be |
| 515 | # allocated for the build -- the build may run with a larger disk than |
| 516 | # requested. At present, the maximum disk size is 1000GB; builds that request |
| 517 | # more than the maximum are rejected with an error. |
| 518 | "workerPool": "A String", # Option to specify a `WorkerPool` for the build. |
| 519 | # Format: projects/{project}/workerPools/{workerPool} |
| 520 | # |
| 521 | # This field is experimental. |
| 522 | "logging": "A String", # Option to specify the logging mode, which determines if and where build |
| 523 | # logs are stored. |
| 524 | "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud |
| 525 | # Key Management Service crypto key. These values must be specified in the |
| 526 | # build's `Secret`. These variables will be available to all build steps |
| 527 | # in this build. |
| 528 | "A String", |
| 529 | ], |
| 530 | "dynamicSubstitutions": True or False, # Option to specify whether or not to apply bash style string |
| 531 | # operations to the substitutions. |
| 532 | # |
| 533 | # NOTE: this is always enabled for triggered builds and cannot be |
| 534 | # overridden in the build configuration file. |
| 535 | }, |
| 536 | "substitutions": { # Substitutions data for `Build` resource. |
| 537 | "a_key": "A String", |
| 538 | }, |
| 539 | "createTime": "A String", # Output only. Time at which the request to create the build was received. |
| 540 | "startTime": "A String", # Output only. Time at which execution of the build was started. |
| 541 | }</pre> |
| 542 | </div> |
| 543 | |
| 544 | <div class="method"> |
| 545 | <code class="details" id="create">create(projectId, body=None, x__xgafv=None)</code> |
| 546 | <pre>Starts a build with the specified configuration. |
| 547 | |
| 548 | This method returns a long-running `Operation`, which includes the build |
| 549 | ID. Pass the build ID to `GetBuild` to determine the build status (such as |
| 550 | `SUCCESS` or `FAILURE`). |
| 551 | |
| 552 | Args: |
| 553 | projectId: string, Required. ID of the project. (required) |
| 554 | body: object, The request body. |
| 555 | The object takes the form of: |
| 556 | |
| 557 | { # A build resource in the Cloud Build API. |
| 558 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 559 | # At a high level, a `Build` describes where to find source code, how to build |
| 560 | # it (for example, the builder image to run on the source), and where to store |
| 561 | # the built artifacts. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 562 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 563 | # Fields can include the following variables, which will be expanded when the |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 564 | # build is created: |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 565 | # |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 566 | # - $PROJECT_ID: the project ID of the build. |
| 567 | # - $BUILD_ID: the autogenerated ID of the build. |
| 568 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 569 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 570 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 571 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 572 | # resolved from the specified branch or tag. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 573 | # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 574 | "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer |
| 575 | # than this value, the build will expire and the build status will be |
| 576 | # `EXPIRED`. |
| 577 | # |
| 578 | # The TTL starts ticking from create_time. |
| 579 | "statusDetail": "A String", # Output only. Customer-readable message about the current status. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 580 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source. |
| 581 | # some source was used for this build. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 582 | "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any |
| 583 | # revisions resolved. |
| 584 | "tagName": "A String", # Regex matching tags to build. |
| 585 | # |
| 586 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 587 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 588 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 589 | # |
| 590 | # This must be a relative path. If a step's `dir` is specified and is an |
| 591 | # absolute path, this value is ignored for that step's execution. |
| 592 | "substitutions": { # Substitutions to use in a triggered build. |
| 593 | # Should only be used with RunBuildTrigger |
| 594 | "a_key": "A String", |
| 595 | }, |
| 596 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 597 | "commitSha": "A String", # Explicit commit SHA to build. |
| 598 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 599 | # regex. |
| 600 | "branchName": "A String", # Regex matching branches to build. |
| 601 | # |
| 602 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 603 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 604 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 605 | # project ID requesting the build is assumed. |
| 606 | }, |
| 607 | "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any |
| 608 | # generations resolved. |
| 609 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 610 | # omitted, the latest generation will be used. |
| 611 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 612 | # [Bucket Name |
| 613 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 614 | "object": "A String", # Google Cloud Storage object containing the source. |
| 615 | # |
| 616 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 617 | # build. |
| 618 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 619 | "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that |
| 620 | # the original source integrity was maintained in the build. Note that |
| 621 | # `FileHashes` will only be populated if `BuildOptions` has requested a |
| 622 | # `SourceProvenanceHash`. |
| 623 | # |
| 624 | # The keys to this map are file paths used as build source and the values |
| 625 | # contain the hash values for those files. |
| 626 | # |
| 627 | # If the build source came in a single package such as a gzipped tarfile |
| 628 | # (`.tar.gz`), the `FileHash` will be for the single path to that file. |
| 629 | "a_key": { # Container message for hashes of byte content of files, used in |
| 630 | # SourceProvenance messages to verify integrity of source input to the build. |
| 631 | "fileHash": [ # Collection of file hashes. |
| 632 | { # Container message for hash values. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 633 | "value": "A String", # The hash value. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 634 | "type": "A String", # The type of hash that was performed. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 635 | }, |
| 636 | ], |
| 637 | }, |
| 638 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 639 | }, |
| 640 | "secrets": [ # Secrets to decrypt using Cloud Key Management Service. |
| 641 | { # Pairs a set of secret environment variables containing encrypted |
| 642 | # values with the Cloud KMS key to use to decrypt the value. |
| 643 | "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs. |
| 644 | "secretEnv": { # Map of environment variable name to its encrypted value. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 645 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 646 | # Secret environment variables must be unique across all of a build's |
| 647 | # secrets, and must be used by at least one build step. Values can be at most |
| 648 | # 64 KB in size. There can be at most 100 secret values across all of a |
| 649 | # build's secrets. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 650 | "a_key": "A String", |
| 651 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 652 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 653 | ], |
| 654 | "results": { # Artifacts created by the build pipeline. # Output only. Results of the build. |
| 655 | "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded. |
| 656 | "buildStepImages": [ # List of build step digests, in the order corresponding to build step |
| 657 | # indices. |
| 658 | "A String", |
| 659 | ], |
| 660 | "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts. |
| 661 | "startTime": "A String", # Start of time span. |
| 662 | "endTime": "A String", # End of time span. |
| 663 | }, |
| 664 | "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded. |
| 665 | "images": [ # Container images that were built as a part of the build. |
| 666 | { # An image built by the pipeline. |
| 667 | "digest": "A String", # Docker Registry 2.0 digest. |
| 668 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 669 | # presented to `docker push`. |
| 670 | "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image. |
| 671 | "startTime": "A String", # Start of time span. |
| 672 | "endTime": "A String", # End of time span. |
| 673 | }, |
| 674 | }, |
| 675 | ], |
| 676 | "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order |
| 677 | # corresponding to build step indices. |
| 678 | # |
| 679 | # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) |
| 680 | # can produce this output by writing to `$BUILDER_OUTPUT/output`. |
| 681 | # Only the first 4KB of data is stored. |
| 682 | "A String", |
| 683 | ], |
| 684 | }, |
| 685 | "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console. |
| 686 | "timing": { # Output only. Stores timing information for phases of the build. Valid keys |
| 687 | # are: |
| 688 | # |
| 689 | # * BUILD: time to execute all build steps |
| 690 | # * PUSH: time to push all specified images. |
| 691 | # * FETCHSOURCE: time to fetch source. |
| 692 | # |
| 693 | # If the build does not specify source or images, |
| 694 | # these keys will not be included. |
| 695 | "a_key": { # Start and end times for a build execution phase. |
| 696 | "startTime": "A String", # Start of time span. |
| 697 | "endTime": "A String", # End of time span. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 698 | }, |
| 699 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 700 | "finishTime": "A String", # Output only. Time at which execution of the build was finished. |
| 701 | # |
| 702 | # The difference between finish_time and start_time is the duration of the |
| 703 | # build's execution. |
| 704 | "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it |
| 705 | # was triggered automatically. |
| 706 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 707 | # granularity. If this amount of time elapses, work on the build will cease |
| 708 | # and the build status will be `TIMEOUT`. |
| 709 | # |
| 710 | # `timeout` starts ticking from `startTime`. |
| 711 | # |
| 712 | # Default time is ten minutes. |
| 713 | "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon |
| 714 | # successful completion of all build steps. |
| 715 | # successful completion of all build steps. |
| 716 | "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful |
| 717 | # completion of all build steps. |
| 718 | # |
| 719 | # Files in the workspace matching specified paths globs will be uploaded to |
| 720 | # the specified Cloud Storage location using the builder service account's |
| 721 | # credentials. |
| 722 | # |
| 723 | # The location and generation of the uploaded objects will be stored in the |
| 724 | # Build resource's results field. |
| 725 | # |
| 726 | # If any objects fail to be pushed, the build is marked FAILURE. |
| 727 | # completion of all build steps. |
| 728 | "location": "A String", # Cloud Storage bucket and optional object path, in the form |
| 729 | # "gs://bucket/path/to/somewhere/". (see [Bucket Name |
| 730 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 731 | # |
| 732 | # Files in the workspace matching any path pattern will be uploaded to |
| 733 | # Cloud Storage with this location as a prefix. |
| 734 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects. |
| 735 | "startTime": "A String", # Start of time span. |
| 736 | "endTime": "A String", # End of time span. |
| 737 | }, |
| 738 | "paths": [ # Path globs used to match files in the build's workspace. |
| 739 | "A String", |
| 740 | ], |
| 741 | }, |
| 742 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 743 | # steps. |
| 744 | # |
| 745 | # The images will be pushed using the builder service account's credentials. |
| 746 | # |
| 747 | # The digests of the pushed images will be stored in the Build resource's |
| 748 | # results field. |
| 749 | # |
| 750 | # If any of the images fail to be pushed, the build is marked FAILURE. |
| 751 | "A String", |
| 752 | ], |
| 753 | }, |
| 754 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 755 | # [Bucket Name |
| 756 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 757 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 758 | "steps": [ # Required. The operations to be performed on the workspace. |
| 759 | { # A step in the build pipeline. |
| 760 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 761 | # |
| 762 | # If the image used to run the step's container has an entrypoint, the `args` |
| 763 | # are used as arguments to that entrypoint. If the image does not define |
| 764 | # an entrypoint, the first element in args is used as the entrypoint, |
| 765 | # and the remainder will be used as arguments. |
| 766 | "A String", |
| 767 | ], |
| 768 | "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint. |
| 769 | # If unset, the image's default entrypoint is used. |
| 770 | "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key |
| 771 | # Management Service crypto key. These values must be specified in the |
| 772 | # build's `Secret`. |
| 773 | "A String", |
| 774 | ], |
| 775 | "status": "A String", # Output only. Status of the build step. At this time, build step status is |
| 776 | # only updated on build completion; step status is not updated in real-time |
| 777 | # as the build progresses. |
| 778 | "volumes": [ # List of volumes to mount into the build step. |
| 779 | # |
| 780 | # Each volume is created as an empty volume prior to execution of the |
| 781 | # build step. Upon completion of the build, volumes and their contents are |
| 782 | # discarded. |
| 783 | # |
| 784 | # Using a named volume in only one step is not valid as it is indicative |
| 785 | # of a build request with an incorrect configuration. |
| 786 | { # Volume describes a Docker container volume which is mounted into build steps |
| 787 | # in order to persist files across build step execution. |
| 788 | "path": "A String", # Path at which to mount the volume. |
| 789 | # |
| 790 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 791 | # same build step or with certain reserved volume paths. |
| 792 | "name": "A String", # Name of the volume to mount. |
| 793 | # |
| 794 | # Volume names must be unique per build step and must be valid names for |
| 795 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 796 | }, |
| 797 | ], |
| 798 | "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no |
| 799 | # time limit and will be allowed to continue to run until either it completes |
| 800 | # or the build itself times out. |
| 801 | "dir": "A String", # Working directory to use when running this step's container. |
| 802 | # |
| 803 | # If this value is a relative path, it is relative to the build's working |
| 804 | # directory. If this value is absolute, it may be outside the build's working |
| 805 | # directory, in which case the contents of the path may not be persisted |
| 806 | # across build step executions, unless a `volume` for that path is specified. |
| 807 | # |
| 808 | # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, |
| 809 | # which specifies an absolute path, the `RepoSource` `dir` is ignored for |
| 810 | # the step's execution. |
| 811 | "id": "A String", # Unique identifier for this build step, used in `wait_for` to |
| 812 | # reference this build step as a dependency. |
| 813 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 814 | # |
| 815 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 816 | # being given the value "VALUE". |
| 817 | "A String", |
| 818 | ], |
| 819 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 820 | # This build step will not start until all the build steps in `wait_for` |
| 821 | # have completed successfully. If `wait_for` is empty, this build step will |
| 822 | # start when all previous build steps in the `Build.Steps` list have |
| 823 | # completed successfully. |
| 824 | "A String", |
| 825 | ], |
| 826 | "name": "A String", # Required. The name of the container image that will run this particular |
| 827 | # build step. |
| 828 | # |
| 829 | # If the image is available in the host's Docker daemon's cache, it |
| 830 | # will be run directly. If not, the host will attempt to pull the image |
| 831 | # first, using the builder service account's credentials if necessary. |
| 832 | # |
| 833 | # The Docker daemon's cache will already have the latest versions of all of |
| 834 | # the officially supported build steps |
| 835 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 836 | # The Docker daemon will also have cached many of the layers for some popular |
| 837 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 838 | # attempt to use them. |
| 839 | # |
| 840 | # If you built an image in a previous build step, it will be stored in the |
| 841 | # host's Docker daemon's cache and is available to use as the name for a |
| 842 | # later build step. |
| 843 | "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's |
| 844 | # builder image only. |
| 845 | "startTime": "A String", # Start of time span. |
| 846 | "endTime": "A String", # End of time span. |
| 847 | }, |
| 848 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step. |
| 849 | "startTime": "A String", # Start of time span. |
| 850 | "endTime": "A String", # End of time span. |
| 851 | }, |
| 852 | }, |
| 853 | ], |
| 854 | "id": "A String", # Output only. Unique identifier of the build. |
| 855 | "status": "A String", # Output only. Status of the build. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 856 | "images": [ # A list of images to be pushed upon the successful completion of all build |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 857 | # steps. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 858 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 859 | # The images are pushed using the builder service account's credentials. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 860 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 861 | # The digests of the pushed images will be stored in the `Build` resource's |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 862 | # results field. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 863 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 864 | # If any of the images fail to be pushed, the build status is marked |
| 865 | # `FAILURE`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 866 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 867 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 868 | "projectId": "A String", # Output only. ID of the project. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 869 | "source": { # Location of the source in a supported storage service. # The location of the source files to build. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 870 | "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage. |
| 871 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 872 | # omitted, the latest generation will be used. |
| 873 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 874 | # [Bucket Name |
| 875 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 876 | "object": "A String", # Google Cloud Storage object containing the source. |
| 877 | # |
| 878 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 879 | # build. |
| 880 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 881 | "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source |
| 882 | # Repository. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 883 | "tagName": "A String", # Regex matching tags to build. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 884 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 885 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 886 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 887 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 888 | # |
| 889 | # This must be a relative path. If a step's `dir` is specified and is an |
| 890 | # absolute path, this value is ignored for that step's execution. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 891 | "substitutions": { # Substitutions to use in a triggered build. |
| 892 | # Should only be used with RunBuildTrigger |
| 893 | "a_key": "A String", |
| 894 | }, |
| 895 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 896 | "commitSha": "A String", # Explicit commit SHA to build. |
| 897 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 898 | # regex. |
| 899 | "branchName": "A String", # Regex matching branches to build. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 900 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 901 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 902 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 903 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 904 | # project ID requesting the build is assumed. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 905 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 906 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 907 | "tags": [ # Tags for annotation of a `Build`. These are not docker tags. |
| 908 | "A String", |
| 909 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 910 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 911 | "volumes": [ # Global list of volumes to mount for ALL build steps |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 912 | # |
| 913 | # Each volume is created as an empty volume prior to starting the build |
| 914 | # process. Upon completion of the build, volumes and their contents are |
| 915 | # discarded. Global volume names and paths cannot conflict with the volumes |
| 916 | # defined a build step. |
| 917 | # |
| 918 | # Using a global volume in a build with only one step is not valid as |
| 919 | # it is indicative of a build request with an incorrect configuration. |
| 920 | { # Volume describes a Docker container volume which is mounted into build steps |
| 921 | # in order to persist files across build step execution. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 922 | "path": "A String", # Path at which to mount the volume. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 923 | # |
| 924 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 925 | # same build step or with certain reserved volume paths. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 926 | "name": "A String", # Name of the volume to mount. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 927 | # |
| 928 | # Volume names must be unique per build step and must be valid names for |
| 929 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 930 | }, |
| 931 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 932 | "env": [ # A list of global environment variable definitions that will exist for all |
| 933 | # build steps in this build. If a variable is defined in both globally and in |
| 934 | # a build step, the variable will use the build step value. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 935 | # |
| 936 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 937 | # being given the value "VALUE". |
| 938 | "A String", |
| 939 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 940 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 941 | "A String", |
| 942 | ], |
| 943 | "machineType": "A String", # Compute Engine machine type on which to run the build. |
| 944 | "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud |
| 945 | # Storage. |
| 946 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 947 | "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution |
| 948 | # checks. |
| 949 | # |
| 950 | # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot |
| 951 | # be overridden in the build configuration file. |
| 952 | "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT* |
| 953 | # "disk free"; some of the space will be used by the operating system and |
| 954 | # build utilities. Also note that this is the minimum disk size that will be |
| 955 | # allocated for the build -- the build may run with a larger disk than |
| 956 | # requested. At present, the maximum disk size is 1000GB; builds that request |
| 957 | # more than the maximum are rejected with an error. |
| 958 | "workerPool": "A String", # Option to specify a `WorkerPool` for the build. |
| 959 | # Format: projects/{project}/workerPools/{workerPool} |
| 960 | # |
| 961 | # This field is experimental. |
| 962 | "logging": "A String", # Option to specify the logging mode, which determines if and where build |
| 963 | # logs are stored. |
| 964 | "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud |
| 965 | # Key Management Service crypto key. These values must be specified in the |
| 966 | # build's `Secret`. These variables will be available to all build steps |
| 967 | # in this build. |
| 968 | "A String", |
| 969 | ], |
| 970 | "dynamicSubstitutions": True or False, # Option to specify whether or not to apply bash style string |
| 971 | # operations to the substitutions. |
| 972 | # |
| 973 | # NOTE: this is always enabled for triggered builds and cannot be |
| 974 | # overridden in the build configuration file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 975 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 976 | "substitutions": { # Substitutions data for `Build` resource. |
| 977 | "a_key": "A String", |
| 978 | }, |
| 979 | "createTime": "A String", # Output only. Time at which the request to create the build was received. |
| 980 | "startTime": "A String", # Output only. Time at which execution of the build was started. |
| 981 | } |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 982 | |
| 983 | x__xgafv: string, V1 error format. |
| 984 | Allowed values |
| 985 | 1 - v1 error format |
| 986 | 2 - v2 error format |
| 987 | |
| 988 | Returns: |
| 989 | An object of the form: |
| 990 | |
| 991 | { # This resource represents a long-running operation that is the result of a |
| 992 | # network API call. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 993 | "response": { # The normal response of the operation in case of success. If the original |
| 994 | # method returns no data on success, such as `Delete`, the response is |
| 995 | # `google.protobuf.Empty`. If the original method is standard |
| 996 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 997 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 998 | # is the original method name. For example, if the original method name |
| 999 | # is `TakeSnapshot()`, the inferred response type is |
| 1000 | # `TakeSnapshotResponse`. |
| 1001 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1002 | }, |
| 1003 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 1004 | # contains progress information and common metadata such as create time. |
| 1005 | # Some services might not provide such metadata. Any method that returns a |
| 1006 | # long-running operation should document the metadata type, if any. |
| 1007 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1008 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1009 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 1010 | # originally returns it. If you use the default HTTP mapping, the |
| 1011 | # `name` should be a resource name ending with `operations/{unique_id}`. |
| 1012 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 1013 | # different programming environments, including REST APIs and RPC APIs. It is |
| 1014 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 1015 | # three pieces of data: error code, error message, and error details. |
| 1016 | # |
| 1017 | # You can find out more about this error model and how to work with it in the |
| 1018 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 1019 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 1020 | # user-facing error message should be localized and sent in the |
| 1021 | # google.rpc.Status.details field, or localized by the client. |
| 1022 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 1023 | # message types for APIs to use. |
| 1024 | { |
| 1025 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1026 | }, |
| 1027 | ], |
| 1028 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 1029 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1030 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1031 | # If `true`, the operation is completed, and either `error` or `response` is |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1032 | # available. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1033 | }</pre> |
| 1034 | </div> |
| 1035 | |
| 1036 | <div class="method"> |
| 1037 | <code class="details" id="get">get(projectId, id, x__xgafv=None)</code> |
| 1038 | <pre>Returns information about a previously requested build. |
| 1039 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1040 | The `Build` that is returned includes its status (such as `SUCCESS`, |
| 1041 | `FAILURE`, or `WORKING`), and timing information. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1042 | |
| 1043 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1044 | projectId: string, Required. ID of the project. (required) |
| 1045 | id: string, Required. ID of the build. (required) |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1046 | x__xgafv: string, V1 error format. |
| 1047 | Allowed values |
| 1048 | 1 - v1 error format |
| 1049 | 2 - v2 error format |
| 1050 | |
| 1051 | Returns: |
| 1052 | An object of the form: |
| 1053 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1054 | { # A build resource in the Cloud Build API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1055 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1056 | # At a high level, a `Build` describes where to find source code, how to build |
| 1057 | # it (for example, the builder image to run on the source), and where to store |
| 1058 | # the built artifacts. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1059 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1060 | # Fields can include the following variables, which will be expanded when the |
| 1061 | # build is created: |
| 1062 | # |
| 1063 | # - $PROJECT_ID: the project ID of the build. |
| 1064 | # - $BUILD_ID: the autogenerated ID of the build. |
| 1065 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 1066 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 1067 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 1068 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 1069 | # resolved from the specified branch or tag. |
| 1070 | # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. |
| 1071 | "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer |
| 1072 | # than this value, the build will expire and the build status will be |
| 1073 | # `EXPIRED`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1074 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1075 | # The TTL starts ticking from create_time. |
| 1076 | "statusDetail": "A String", # Output only. Customer-readable message about the current status. |
| 1077 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source. |
| 1078 | # some source was used for this build. |
| 1079 | "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any |
| 1080 | # revisions resolved. |
| 1081 | "tagName": "A String", # Regex matching tags to build. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1082 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1083 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1084 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1085 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1086 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1087 | # This must be a relative path. If a step's `dir` is specified and is an |
| 1088 | # absolute path, this value is ignored for that step's execution. |
| 1089 | "substitutions": { # Substitutions to use in a triggered build. |
| 1090 | # Should only be used with RunBuildTrigger |
| 1091 | "a_key": "A String", |
| 1092 | }, |
| 1093 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 1094 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1095 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 1096 | # regex. |
| 1097 | "branchName": "A String", # Regex matching branches to build. |
| 1098 | # |
| 1099 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1100 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1101 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 1102 | # project ID requesting the build is assumed. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1103 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1104 | "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any |
| 1105 | # generations resolved. |
| 1106 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1107 | # omitted, the latest generation will be used. |
| 1108 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 1109 | # [Bucket Name |
| 1110 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1111 | "object": "A String", # Google Cloud Storage object containing the source. |
| 1112 | # |
| 1113 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 1114 | # build. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1115 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1116 | "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that |
| 1117 | # the original source integrity was maintained in the build. Note that |
| 1118 | # `FileHashes` will only be populated if `BuildOptions` has requested a |
| 1119 | # `SourceProvenanceHash`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1120 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1121 | # The keys to this map are file paths used as build source and the values |
| 1122 | # contain the hash values for those files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1123 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1124 | # If the build source came in a single package such as a gzipped tarfile |
| 1125 | # (`.tar.gz`), the `FileHash` will be for the single path to that file. |
| 1126 | "a_key": { # Container message for hashes of byte content of files, used in |
| 1127 | # SourceProvenance messages to verify integrity of source input to the build. |
| 1128 | "fileHash": [ # Collection of file hashes. |
| 1129 | { # Container message for hash values. |
| 1130 | "value": "A String", # The hash value. |
| 1131 | "type": "A String", # The type of hash that was performed. |
| 1132 | }, |
| 1133 | ], |
| 1134 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1135 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1136 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1137 | "secrets": [ # Secrets to decrypt using Cloud Key Management Service. |
| 1138 | { # Pairs a set of secret environment variables containing encrypted |
| 1139 | # values with the Cloud KMS key to use to decrypt the value. |
| 1140 | "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs. |
| 1141 | "secretEnv": { # Map of environment variable name to its encrypted value. |
| 1142 | # |
| 1143 | # Secret environment variables must be unique across all of a build's |
| 1144 | # secrets, and must be used by at least one build step. Values can be at most |
| 1145 | # 64 KB in size. There can be at most 100 secret values across all of a |
| 1146 | # build's secrets. |
| 1147 | "a_key": "A String", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1148 | }, |
| 1149 | }, |
| 1150 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1151 | "results": { # Artifacts created by the build pipeline. # Output only. Results of the build. |
| 1152 | "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded. |
| 1153 | "buildStepImages": [ # List of build step digests, in the order corresponding to build step |
| 1154 | # indices. |
| 1155 | "A String", |
| 1156 | ], |
| 1157 | "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts. |
| 1158 | "startTime": "A String", # Start of time span. |
| 1159 | "endTime": "A String", # End of time span. |
| 1160 | }, |
| 1161 | "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded. |
| 1162 | "images": [ # Container images that were built as a part of the build. |
| 1163 | { # An image built by the pipeline. |
| 1164 | "digest": "A String", # Docker Registry 2.0 digest. |
| 1165 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 1166 | # presented to `docker push`. |
| 1167 | "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image. |
| 1168 | "startTime": "A String", # Start of time span. |
| 1169 | "endTime": "A String", # End of time span. |
| 1170 | }, |
| 1171 | }, |
| 1172 | ], |
| 1173 | "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order |
| 1174 | # corresponding to build step indices. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1175 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1176 | # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) |
| 1177 | # can produce this output by writing to `$BUILDER_OUTPUT/output`. |
| 1178 | # Only the first 4KB of data is stored. |
| 1179 | "A String", |
| 1180 | ], |
| 1181 | }, |
| 1182 | "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console. |
| 1183 | "timing": { # Output only. Stores timing information for phases of the build. Valid keys |
| 1184 | # are: |
| 1185 | # |
| 1186 | # * BUILD: time to execute all build steps |
| 1187 | # * PUSH: time to push all specified images. |
| 1188 | # * FETCHSOURCE: time to fetch source. |
| 1189 | # |
| 1190 | # If the build does not specify source or images, |
| 1191 | # these keys will not be included. |
| 1192 | "a_key": { # Start and end times for a build execution phase. |
| 1193 | "startTime": "A String", # Start of time span. |
| 1194 | "endTime": "A String", # End of time span. |
| 1195 | }, |
| 1196 | }, |
| 1197 | "finishTime": "A String", # Output only. Time at which execution of the build was finished. |
| 1198 | # |
| 1199 | # The difference between finish_time and start_time is the duration of the |
| 1200 | # build's execution. |
| 1201 | "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it |
| 1202 | # was triggered automatically. |
| 1203 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 1204 | # granularity. If this amount of time elapses, work on the build will cease |
| 1205 | # and the build status will be `TIMEOUT`. |
| 1206 | # |
| 1207 | # `timeout` starts ticking from `startTime`. |
| 1208 | # |
| 1209 | # Default time is ten minutes. |
| 1210 | "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon |
| 1211 | # successful completion of all build steps. |
| 1212 | # successful completion of all build steps. |
| 1213 | "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful |
| 1214 | # completion of all build steps. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1215 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1216 | # Files in the workspace matching specified paths globs will be uploaded to |
| 1217 | # the specified Cloud Storage location using the builder service account's |
| 1218 | # credentials. |
| 1219 | # |
| 1220 | # The location and generation of the uploaded objects will be stored in the |
| 1221 | # Build resource's results field. |
| 1222 | # |
| 1223 | # If any objects fail to be pushed, the build is marked FAILURE. |
| 1224 | # completion of all build steps. |
| 1225 | "location": "A String", # Cloud Storage bucket and optional object path, in the form |
| 1226 | # "gs://bucket/path/to/somewhere/". (see [Bucket Name |
| 1227 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1228 | # |
| 1229 | # Files in the workspace matching any path pattern will be uploaded to |
| 1230 | # Cloud Storage with this location as a prefix. |
| 1231 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects. |
| 1232 | "startTime": "A String", # Start of time span. |
| 1233 | "endTime": "A String", # End of time span. |
| 1234 | }, |
| 1235 | "paths": [ # Path globs used to match files in the build's workspace. |
| 1236 | "A String", |
| 1237 | ], |
| 1238 | }, |
| 1239 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 1240 | # steps. |
| 1241 | # |
| 1242 | # The images will be pushed using the builder service account's credentials. |
| 1243 | # |
| 1244 | # The digests of the pushed images will be stored in the Build resource's |
| 1245 | # results field. |
| 1246 | # |
| 1247 | # If any of the images fail to be pushed, the build is marked FAILURE. |
| 1248 | "A String", |
| 1249 | ], |
| 1250 | }, |
| 1251 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 1252 | # [Bucket Name |
| 1253 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1254 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 1255 | "steps": [ # Required. The operations to be performed on the workspace. |
| 1256 | { # A step in the build pipeline. |
| 1257 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 1258 | # |
| 1259 | # If the image used to run the step's container has an entrypoint, the `args` |
| 1260 | # are used as arguments to that entrypoint. If the image does not define |
| 1261 | # an entrypoint, the first element in args is used as the entrypoint, |
| 1262 | # and the remainder will be used as arguments. |
| 1263 | "A String", |
| 1264 | ], |
| 1265 | "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint. |
| 1266 | # If unset, the image's default entrypoint is used. |
| 1267 | "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key |
| 1268 | # Management Service crypto key. These values must be specified in the |
| 1269 | # build's `Secret`. |
| 1270 | "A String", |
| 1271 | ], |
| 1272 | "status": "A String", # Output only. Status of the build step. At this time, build step status is |
| 1273 | # only updated on build completion; step status is not updated in real-time |
| 1274 | # as the build progresses. |
| 1275 | "volumes": [ # List of volumes to mount into the build step. |
| 1276 | # |
| 1277 | # Each volume is created as an empty volume prior to execution of the |
| 1278 | # build step. Upon completion of the build, volumes and their contents are |
| 1279 | # discarded. |
| 1280 | # |
| 1281 | # Using a named volume in only one step is not valid as it is indicative |
| 1282 | # of a build request with an incorrect configuration. |
| 1283 | { # Volume describes a Docker container volume which is mounted into build steps |
| 1284 | # in order to persist files across build step execution. |
| 1285 | "path": "A String", # Path at which to mount the volume. |
| 1286 | # |
| 1287 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 1288 | # same build step or with certain reserved volume paths. |
| 1289 | "name": "A String", # Name of the volume to mount. |
| 1290 | # |
| 1291 | # Volume names must be unique per build step and must be valid names for |
| 1292 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 1293 | }, |
| 1294 | ], |
| 1295 | "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no |
| 1296 | # time limit and will be allowed to continue to run until either it completes |
| 1297 | # or the build itself times out. |
| 1298 | "dir": "A String", # Working directory to use when running this step's container. |
| 1299 | # |
| 1300 | # If this value is a relative path, it is relative to the build's working |
| 1301 | # directory. If this value is absolute, it may be outside the build's working |
| 1302 | # directory, in which case the contents of the path may not be persisted |
| 1303 | # across build step executions, unless a `volume` for that path is specified. |
| 1304 | # |
| 1305 | # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, |
| 1306 | # which specifies an absolute path, the `RepoSource` `dir` is ignored for |
| 1307 | # the step's execution. |
| 1308 | "id": "A String", # Unique identifier for this build step, used in `wait_for` to |
| 1309 | # reference this build step as a dependency. |
| 1310 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 1311 | # |
| 1312 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 1313 | # being given the value "VALUE". |
| 1314 | "A String", |
| 1315 | ], |
| 1316 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 1317 | # This build step will not start until all the build steps in `wait_for` |
| 1318 | # have completed successfully. If `wait_for` is empty, this build step will |
| 1319 | # start when all previous build steps in the `Build.Steps` list have |
| 1320 | # completed successfully. |
| 1321 | "A String", |
| 1322 | ], |
| 1323 | "name": "A String", # Required. The name of the container image that will run this particular |
| 1324 | # build step. |
| 1325 | # |
| 1326 | # If the image is available in the host's Docker daemon's cache, it |
| 1327 | # will be run directly. If not, the host will attempt to pull the image |
| 1328 | # first, using the builder service account's credentials if necessary. |
| 1329 | # |
| 1330 | # The Docker daemon's cache will already have the latest versions of all of |
| 1331 | # the officially supported build steps |
| 1332 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 1333 | # The Docker daemon will also have cached many of the layers for some popular |
| 1334 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 1335 | # attempt to use them. |
| 1336 | # |
| 1337 | # If you built an image in a previous build step, it will be stored in the |
| 1338 | # host's Docker daemon's cache and is available to use as the name for a |
| 1339 | # later build step. |
| 1340 | "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's |
| 1341 | # builder image only. |
| 1342 | "startTime": "A String", # Start of time span. |
| 1343 | "endTime": "A String", # End of time span. |
| 1344 | }, |
| 1345 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step. |
| 1346 | "startTime": "A String", # Start of time span. |
| 1347 | "endTime": "A String", # End of time span. |
| 1348 | }, |
| 1349 | }, |
| 1350 | ], |
| 1351 | "id": "A String", # Output only. Unique identifier of the build. |
| 1352 | "status": "A String", # Output only. Status of the build. |
| 1353 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 1354 | # steps. |
| 1355 | # |
| 1356 | # The images are pushed using the builder service account's credentials. |
| 1357 | # |
| 1358 | # The digests of the pushed images will be stored in the `Build` resource's |
| 1359 | # results field. |
| 1360 | # |
| 1361 | # If any of the images fail to be pushed, the build status is marked |
| 1362 | # `FAILURE`. |
| 1363 | "A String", |
| 1364 | ], |
| 1365 | "projectId": "A String", # Output only. ID of the project. |
| 1366 | "source": { # Location of the source in a supported storage service. # The location of the source files to build. |
| 1367 | "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage. |
| 1368 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1369 | # omitted, the latest generation will be used. |
| 1370 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 1371 | # [Bucket Name |
| 1372 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1373 | "object": "A String", # Google Cloud Storage object containing the source. |
| 1374 | # |
| 1375 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 1376 | # build. |
| 1377 | }, |
| 1378 | "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source |
| 1379 | # Repository. |
| 1380 | "tagName": "A String", # Regex matching tags to build. |
| 1381 | # |
| 1382 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1383 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1384 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 1385 | # |
| 1386 | # This must be a relative path. If a step's `dir` is specified and is an |
| 1387 | # absolute path, this value is ignored for that step's execution. |
| 1388 | "substitutions": { # Substitutions to use in a triggered build. |
| 1389 | # Should only be used with RunBuildTrigger |
| 1390 | "a_key": "A String", |
| 1391 | }, |
| 1392 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 1393 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1394 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 1395 | # regex. |
| 1396 | "branchName": "A String", # Regex matching branches to build. |
| 1397 | # |
| 1398 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1399 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1400 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 1401 | # project ID requesting the build is assumed. |
| 1402 | }, |
| 1403 | }, |
| 1404 | "tags": [ # Tags for annotation of a `Build`. These are not docker tags. |
| 1405 | "A String", |
| 1406 | ], |
| 1407 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 1408 | "volumes": [ # Global list of volumes to mount for ALL build steps |
| 1409 | # |
| 1410 | # Each volume is created as an empty volume prior to starting the build |
| 1411 | # process. Upon completion of the build, volumes and their contents are |
| 1412 | # discarded. Global volume names and paths cannot conflict with the volumes |
| 1413 | # defined a build step. |
| 1414 | # |
| 1415 | # Using a global volume in a build with only one step is not valid as |
| 1416 | # it is indicative of a build request with an incorrect configuration. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1417 | { # Volume describes a Docker container volume which is mounted into build steps |
| 1418 | # in order to persist files across build step execution. |
| 1419 | "path": "A String", # Path at which to mount the volume. |
| 1420 | # |
| 1421 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 1422 | # same build step or with certain reserved volume paths. |
| 1423 | "name": "A String", # Name of the volume to mount. |
| 1424 | # |
| 1425 | # Volume names must be unique per build step and must be valid names for |
| 1426 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 1427 | }, |
| 1428 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1429 | "env": [ # A list of global environment variable definitions that will exist for all |
| 1430 | # build steps in this build. If a variable is defined in both globally and in |
| 1431 | # a build step, the variable will use the build step value. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1432 | # |
| 1433 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 1434 | # being given the value "VALUE". |
| 1435 | "A String", |
| 1436 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1437 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 1438 | "A String", |
| 1439 | ], |
| 1440 | "machineType": "A String", # Compute Engine machine type on which to run the build. |
| 1441 | "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud |
| 1442 | # Storage. |
| 1443 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 1444 | "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution |
| 1445 | # checks. |
| 1446 | # |
| 1447 | # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot |
| 1448 | # be overridden in the build configuration file. |
| 1449 | "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT* |
| 1450 | # "disk free"; some of the space will be used by the operating system and |
| 1451 | # build utilities. Also note that this is the minimum disk size that will be |
| 1452 | # allocated for the build -- the build may run with a larger disk than |
| 1453 | # requested. At present, the maximum disk size is 1000GB; builds that request |
| 1454 | # more than the maximum are rejected with an error. |
| 1455 | "workerPool": "A String", # Option to specify a `WorkerPool` for the build. |
| 1456 | # Format: projects/{project}/workerPools/{workerPool} |
| 1457 | # |
| 1458 | # This field is experimental. |
| 1459 | "logging": "A String", # Option to specify the logging mode, which determines if and where build |
| 1460 | # logs are stored. |
| 1461 | "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud |
| 1462 | # Key Management Service crypto key. These values must be specified in the |
| 1463 | # build's `Secret`. These variables will be available to all build steps |
| 1464 | # in this build. |
| 1465 | "A String", |
| 1466 | ], |
| 1467 | "dynamicSubstitutions": True or False, # Option to specify whether or not to apply bash style string |
| 1468 | # operations to the substitutions. |
| 1469 | # |
| 1470 | # NOTE: this is always enabled for triggered builds and cannot be |
| 1471 | # overridden in the build configuration file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1472 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1473 | "substitutions": { # Substitutions data for `Build` resource. |
| 1474 | "a_key": "A String", |
| 1475 | }, |
| 1476 | "createTime": "A String", # Output only. Time at which the request to create the build was received. |
| 1477 | "startTime": "A String", # Output only. Time at which execution of the build was started. |
| 1478 | }</pre> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1479 | </div> |
| 1480 | |
| 1481 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1482 | <code class="details" id="list">list(projectId, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1483 | <pre>Lists previously requested builds. |
| 1484 | |
| 1485 | Previously requested builds may still be in-progress, or may have finished |
| 1486 | successfully or unsuccessfully. |
| 1487 | |
| 1488 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1489 | projectId: string, Required. ID of the project. (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1490 | filter: string, The raw filter text to constrain the results. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1491 | pageToken: string, Token to provide to skip to a particular spot in the list. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1492 | pageSize: integer, Number of results to return in the list. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1493 | x__xgafv: string, V1 error format. |
| 1494 | Allowed values |
| 1495 | 1 - v1 error format |
| 1496 | 2 - v2 error format |
| 1497 | |
| 1498 | Returns: |
| 1499 | An object of the form: |
| 1500 | |
| 1501 | { # Response including listed builds. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1502 | "nextPageToken": "A String", # Token to receive the next page of results. |
| 1503 | "builds": [ # Builds will be sorted by `create_time`, descending. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1504 | { # A build resource in the Cloud Build API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1505 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1506 | # At a high level, a `Build` describes where to find source code, how to build |
| 1507 | # it (for example, the builder image to run on the source), and where to store |
| 1508 | # the built artifacts. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1509 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1510 | # Fields can include the following variables, which will be expanded when the |
| 1511 | # build is created: |
| 1512 | # |
| 1513 | # - $PROJECT_ID: the project ID of the build. |
| 1514 | # - $BUILD_ID: the autogenerated ID of the build. |
| 1515 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 1516 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 1517 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 1518 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 1519 | # resolved from the specified branch or tag. |
| 1520 | # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. |
| 1521 | "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer |
| 1522 | # than this value, the build will expire and the build status will be |
| 1523 | # `EXPIRED`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1524 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1525 | # The TTL starts ticking from create_time. |
| 1526 | "statusDetail": "A String", # Output only. Customer-readable message about the current status. |
| 1527 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source. |
| 1528 | # some source was used for this build. |
| 1529 | "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any |
| 1530 | # revisions resolved. |
| 1531 | "tagName": "A String", # Regex matching tags to build. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1532 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1533 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1534 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1535 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1536 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1537 | # This must be a relative path. If a step's `dir` is specified and is an |
| 1538 | # absolute path, this value is ignored for that step's execution. |
| 1539 | "substitutions": { # Substitutions to use in a triggered build. |
| 1540 | # Should only be used with RunBuildTrigger |
| 1541 | "a_key": "A String", |
| 1542 | }, |
| 1543 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 1544 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1545 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 1546 | # regex. |
| 1547 | "branchName": "A String", # Regex matching branches to build. |
| 1548 | # |
| 1549 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1550 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1551 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 1552 | # project ID requesting the build is assumed. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1553 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1554 | "resolvedStorageSource": { # Location of the source in an archive file in Google Cloud Storage. # A copy of the build's `source.storage_source`, if exists, with any |
| 1555 | # generations resolved. |
| 1556 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1557 | # omitted, the latest generation will be used. |
| 1558 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 1559 | # [Bucket Name |
| 1560 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1561 | "object": "A String", # Google Cloud Storage object containing the source. |
| 1562 | # |
| 1563 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 1564 | # build. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1565 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1566 | "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that |
| 1567 | # the original source integrity was maintained in the build. Note that |
| 1568 | # `FileHashes` will only be populated if `BuildOptions` has requested a |
| 1569 | # `SourceProvenanceHash`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1570 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1571 | # The keys to this map are file paths used as build source and the values |
| 1572 | # contain the hash values for those files. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1573 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1574 | # If the build source came in a single package such as a gzipped tarfile |
| 1575 | # (`.tar.gz`), the `FileHash` will be for the single path to that file. |
| 1576 | "a_key": { # Container message for hashes of byte content of files, used in |
| 1577 | # SourceProvenance messages to verify integrity of source input to the build. |
| 1578 | "fileHash": [ # Collection of file hashes. |
| 1579 | { # Container message for hash values. |
| 1580 | "value": "A String", # The hash value. |
| 1581 | "type": "A String", # The type of hash that was performed. |
| 1582 | }, |
| 1583 | ], |
| 1584 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1585 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1586 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1587 | "secrets": [ # Secrets to decrypt using Cloud Key Management Service. |
| 1588 | { # Pairs a set of secret environment variables containing encrypted |
| 1589 | # values with the Cloud KMS key to use to decrypt the value. |
| 1590 | "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs. |
| 1591 | "secretEnv": { # Map of environment variable name to its encrypted value. |
| 1592 | # |
| 1593 | # Secret environment variables must be unique across all of a build's |
| 1594 | # secrets, and must be used by at least one build step. Values can be at most |
| 1595 | # 64 KB in size. There can be at most 100 secret values across all of a |
| 1596 | # build's secrets. |
| 1597 | "a_key": "A String", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1598 | }, |
| 1599 | }, |
| 1600 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1601 | "results": { # Artifacts created by the build pipeline. # Output only. Results of the build. |
| 1602 | "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded. |
| 1603 | "buildStepImages": [ # List of build step digests, in the order corresponding to build step |
| 1604 | # indices. |
| 1605 | "A String", |
| 1606 | ], |
| 1607 | "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts. |
| 1608 | "startTime": "A String", # Start of time span. |
| 1609 | "endTime": "A String", # End of time span. |
| 1610 | }, |
| 1611 | "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded. |
| 1612 | "images": [ # Container images that were built as a part of the build. |
| 1613 | { # An image built by the pipeline. |
| 1614 | "digest": "A String", # Docker Registry 2.0 digest. |
| 1615 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 1616 | # presented to `docker push`. |
| 1617 | "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image. |
| 1618 | "startTime": "A String", # Start of time span. |
| 1619 | "endTime": "A String", # End of time span. |
| 1620 | }, |
| 1621 | }, |
| 1622 | ], |
| 1623 | "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order |
| 1624 | # corresponding to build step indices. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1625 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1626 | # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) |
| 1627 | # can produce this output by writing to `$BUILDER_OUTPUT/output`. |
| 1628 | # Only the first 4KB of data is stored. |
| 1629 | "A String", |
| 1630 | ], |
| 1631 | }, |
| 1632 | "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console. |
| 1633 | "timing": { # Output only. Stores timing information for phases of the build. Valid keys |
| 1634 | # are: |
| 1635 | # |
| 1636 | # * BUILD: time to execute all build steps |
| 1637 | # * PUSH: time to push all specified images. |
| 1638 | # * FETCHSOURCE: time to fetch source. |
| 1639 | # |
| 1640 | # If the build does not specify source or images, |
| 1641 | # these keys will not be included. |
| 1642 | "a_key": { # Start and end times for a build execution phase. |
| 1643 | "startTime": "A String", # Start of time span. |
| 1644 | "endTime": "A String", # End of time span. |
| 1645 | }, |
| 1646 | }, |
| 1647 | "finishTime": "A String", # Output only. Time at which execution of the build was finished. |
| 1648 | # |
| 1649 | # The difference between finish_time and start_time is the duration of the |
| 1650 | # build's execution. |
| 1651 | "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it |
| 1652 | # was triggered automatically. |
| 1653 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 1654 | # granularity. If this amount of time elapses, work on the build will cease |
| 1655 | # and the build status will be `TIMEOUT`. |
| 1656 | # |
| 1657 | # `timeout` starts ticking from `startTime`. |
| 1658 | # |
| 1659 | # Default time is ten minutes. |
| 1660 | "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon |
| 1661 | # successful completion of all build steps. |
| 1662 | # successful completion of all build steps. |
| 1663 | "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful |
| 1664 | # completion of all build steps. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1665 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1666 | # Files in the workspace matching specified paths globs will be uploaded to |
| 1667 | # the specified Cloud Storage location using the builder service account's |
| 1668 | # credentials. |
| 1669 | # |
| 1670 | # The location and generation of the uploaded objects will be stored in the |
| 1671 | # Build resource's results field. |
| 1672 | # |
| 1673 | # If any objects fail to be pushed, the build is marked FAILURE. |
| 1674 | # completion of all build steps. |
| 1675 | "location": "A String", # Cloud Storage bucket and optional object path, in the form |
| 1676 | # "gs://bucket/path/to/somewhere/". (see [Bucket Name |
| 1677 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1678 | # |
| 1679 | # Files in the workspace matching any path pattern will be uploaded to |
| 1680 | # Cloud Storage with this location as a prefix. |
| 1681 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects. |
| 1682 | "startTime": "A String", # Start of time span. |
| 1683 | "endTime": "A String", # End of time span. |
| 1684 | }, |
| 1685 | "paths": [ # Path globs used to match files in the build's workspace. |
| 1686 | "A String", |
| 1687 | ], |
| 1688 | }, |
| 1689 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 1690 | # steps. |
| 1691 | # |
| 1692 | # The images will be pushed using the builder service account's credentials. |
| 1693 | # |
| 1694 | # The digests of the pushed images will be stored in the Build resource's |
| 1695 | # results field. |
| 1696 | # |
| 1697 | # If any of the images fail to be pushed, the build is marked FAILURE. |
| 1698 | "A String", |
| 1699 | ], |
| 1700 | }, |
| 1701 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 1702 | # [Bucket Name |
| 1703 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1704 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 1705 | "steps": [ # Required. The operations to be performed on the workspace. |
| 1706 | { # A step in the build pipeline. |
| 1707 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 1708 | # |
| 1709 | # If the image used to run the step's container has an entrypoint, the `args` |
| 1710 | # are used as arguments to that entrypoint. If the image does not define |
| 1711 | # an entrypoint, the first element in args is used as the entrypoint, |
| 1712 | # and the remainder will be used as arguments. |
| 1713 | "A String", |
| 1714 | ], |
| 1715 | "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint. |
| 1716 | # If unset, the image's default entrypoint is used. |
| 1717 | "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key |
| 1718 | # Management Service crypto key. These values must be specified in the |
| 1719 | # build's `Secret`. |
| 1720 | "A String", |
| 1721 | ], |
| 1722 | "status": "A String", # Output only. Status of the build step. At this time, build step status is |
| 1723 | # only updated on build completion; step status is not updated in real-time |
| 1724 | # as the build progresses. |
| 1725 | "volumes": [ # List of volumes to mount into the build step. |
| 1726 | # |
| 1727 | # Each volume is created as an empty volume prior to execution of the |
| 1728 | # build step. Upon completion of the build, volumes and their contents are |
| 1729 | # discarded. |
| 1730 | # |
| 1731 | # Using a named volume in only one step is not valid as it is indicative |
| 1732 | # of a build request with an incorrect configuration. |
| 1733 | { # Volume describes a Docker container volume which is mounted into build steps |
| 1734 | # in order to persist files across build step execution. |
| 1735 | "path": "A String", # Path at which to mount the volume. |
| 1736 | # |
| 1737 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 1738 | # same build step or with certain reserved volume paths. |
| 1739 | "name": "A String", # Name of the volume to mount. |
| 1740 | # |
| 1741 | # Volume names must be unique per build step and must be valid names for |
| 1742 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 1743 | }, |
| 1744 | ], |
| 1745 | "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no |
| 1746 | # time limit and will be allowed to continue to run until either it completes |
| 1747 | # or the build itself times out. |
| 1748 | "dir": "A String", # Working directory to use when running this step's container. |
| 1749 | # |
| 1750 | # If this value is a relative path, it is relative to the build's working |
| 1751 | # directory. If this value is absolute, it may be outside the build's working |
| 1752 | # directory, in which case the contents of the path may not be persisted |
| 1753 | # across build step executions, unless a `volume` for that path is specified. |
| 1754 | # |
| 1755 | # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, |
| 1756 | # which specifies an absolute path, the `RepoSource` `dir` is ignored for |
| 1757 | # the step's execution. |
| 1758 | "id": "A String", # Unique identifier for this build step, used in `wait_for` to |
| 1759 | # reference this build step as a dependency. |
| 1760 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 1761 | # |
| 1762 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 1763 | # being given the value "VALUE". |
| 1764 | "A String", |
| 1765 | ], |
| 1766 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 1767 | # This build step will not start until all the build steps in `wait_for` |
| 1768 | # have completed successfully. If `wait_for` is empty, this build step will |
| 1769 | # start when all previous build steps in the `Build.Steps` list have |
| 1770 | # completed successfully. |
| 1771 | "A String", |
| 1772 | ], |
| 1773 | "name": "A String", # Required. The name of the container image that will run this particular |
| 1774 | # build step. |
| 1775 | # |
| 1776 | # If the image is available in the host's Docker daemon's cache, it |
| 1777 | # will be run directly. If not, the host will attempt to pull the image |
| 1778 | # first, using the builder service account's credentials if necessary. |
| 1779 | # |
| 1780 | # The Docker daemon's cache will already have the latest versions of all of |
| 1781 | # the officially supported build steps |
| 1782 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 1783 | # The Docker daemon will also have cached many of the layers for some popular |
| 1784 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 1785 | # attempt to use them. |
| 1786 | # |
| 1787 | # If you built an image in a previous build step, it will be stored in the |
| 1788 | # host's Docker daemon's cache and is available to use as the name for a |
| 1789 | # later build step. |
| 1790 | "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's |
| 1791 | # builder image only. |
| 1792 | "startTime": "A String", # Start of time span. |
| 1793 | "endTime": "A String", # End of time span. |
| 1794 | }, |
| 1795 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step. |
| 1796 | "startTime": "A String", # Start of time span. |
| 1797 | "endTime": "A String", # End of time span. |
| 1798 | }, |
| 1799 | }, |
| 1800 | ], |
| 1801 | "id": "A String", # Output only. Unique identifier of the build. |
| 1802 | "status": "A String", # Output only. Status of the build. |
| 1803 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 1804 | # steps. |
| 1805 | # |
| 1806 | # The images are pushed using the builder service account's credentials. |
| 1807 | # |
| 1808 | # The digests of the pushed images will be stored in the `Build` resource's |
| 1809 | # results field. |
| 1810 | # |
| 1811 | # If any of the images fail to be pushed, the build status is marked |
| 1812 | # `FAILURE`. |
| 1813 | "A String", |
| 1814 | ], |
| 1815 | "projectId": "A String", # Output only. ID of the project. |
| 1816 | "source": { # Location of the source in a supported storage service. # The location of the source files to build. |
| 1817 | "storageSource": { # Location of the source in an archive file in Google Cloud Storage. # If provided, get the source from this location in Google Cloud Storage. |
| 1818 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1819 | # omitted, the latest generation will be used. |
| 1820 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 1821 | # [Bucket Name |
| 1822 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1823 | "object": "A String", # Google Cloud Storage object containing the source. |
| 1824 | # |
| 1825 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 1826 | # build. |
| 1827 | }, |
| 1828 | "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source |
| 1829 | # Repository. |
| 1830 | "tagName": "A String", # Regex matching tags to build. |
| 1831 | # |
| 1832 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1833 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1834 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 1835 | # |
| 1836 | # This must be a relative path. If a step's `dir` is specified and is an |
| 1837 | # absolute path, this value is ignored for that step's execution. |
| 1838 | "substitutions": { # Substitutions to use in a triggered build. |
| 1839 | # Should only be used with RunBuildTrigger |
| 1840 | "a_key": "A String", |
| 1841 | }, |
| 1842 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 1843 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1844 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 1845 | # regex. |
| 1846 | "branchName": "A String", # Regex matching branches to build. |
| 1847 | # |
| 1848 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1849 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1850 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 1851 | # project ID requesting the build is assumed. |
| 1852 | }, |
| 1853 | }, |
| 1854 | "tags": [ # Tags for annotation of a `Build`. These are not docker tags. |
| 1855 | "A String", |
| 1856 | ], |
| 1857 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 1858 | "volumes": [ # Global list of volumes to mount for ALL build steps |
| 1859 | # |
| 1860 | # Each volume is created as an empty volume prior to starting the build |
| 1861 | # process. Upon completion of the build, volumes and their contents are |
| 1862 | # discarded. Global volume names and paths cannot conflict with the volumes |
| 1863 | # defined a build step. |
| 1864 | # |
| 1865 | # Using a global volume in a build with only one step is not valid as |
| 1866 | # it is indicative of a build request with an incorrect configuration. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1867 | { # Volume describes a Docker container volume which is mounted into build steps |
| 1868 | # in order to persist files across build step execution. |
| 1869 | "path": "A String", # Path at which to mount the volume. |
| 1870 | # |
| 1871 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 1872 | # same build step or with certain reserved volume paths. |
| 1873 | "name": "A String", # Name of the volume to mount. |
| 1874 | # |
| 1875 | # Volume names must be unique per build step and must be valid names for |
| 1876 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 1877 | }, |
| 1878 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1879 | "env": [ # A list of global environment variable definitions that will exist for all |
| 1880 | # build steps in this build. If a variable is defined in both globally and in |
| 1881 | # a build step, the variable will use the build step value. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1882 | # |
| 1883 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 1884 | # being given the value "VALUE". |
| 1885 | "A String", |
| 1886 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1887 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 1888 | "A String", |
| 1889 | ], |
| 1890 | "machineType": "A String", # Compute Engine machine type on which to run the build. |
| 1891 | "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud |
| 1892 | # Storage. |
| 1893 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 1894 | "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution |
| 1895 | # checks. |
| 1896 | # |
| 1897 | # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot |
| 1898 | # be overridden in the build configuration file. |
| 1899 | "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT* |
| 1900 | # "disk free"; some of the space will be used by the operating system and |
| 1901 | # build utilities. Also note that this is the minimum disk size that will be |
| 1902 | # allocated for the build -- the build may run with a larger disk than |
| 1903 | # requested. At present, the maximum disk size is 1000GB; builds that request |
| 1904 | # more than the maximum are rejected with an error. |
| 1905 | "workerPool": "A String", # Option to specify a `WorkerPool` for the build. |
| 1906 | # Format: projects/{project}/workerPools/{workerPool} |
| 1907 | # |
| 1908 | # This field is experimental. |
| 1909 | "logging": "A String", # Option to specify the logging mode, which determines if and where build |
| 1910 | # logs are stored. |
| 1911 | "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud |
| 1912 | # Key Management Service crypto key. These values must be specified in the |
| 1913 | # build's `Secret`. These variables will be available to all build steps |
| 1914 | # in this build. |
| 1915 | "A String", |
| 1916 | ], |
| 1917 | "dynamicSubstitutions": True or False, # Option to specify whether or not to apply bash style string |
| 1918 | # operations to the substitutions. |
| 1919 | # |
| 1920 | # NOTE: this is always enabled for triggered builds and cannot be |
| 1921 | # overridden in the build configuration file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1922 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1923 | "substitutions": { # Substitutions data for `Build` resource. |
| 1924 | "a_key": "A String", |
| 1925 | }, |
| 1926 | "createTime": "A String", # Output only. Time at which the request to create the build was received. |
| 1927 | "startTime": "A String", # Output only. Time at which execution of the build was started. |
| 1928 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1929 | ], |
| 1930 | }</pre> |
| 1931 | </div> |
| 1932 | |
| 1933 | <div class="method"> |
| 1934 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 1935 | <pre>Retrieves the next page of results. |
| 1936 | |
| 1937 | Args: |
| 1938 | previous_request: The request for the previous page. (required) |
| 1939 | previous_response: The response from the request for the previous page. (required) |
| 1940 | |
| 1941 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1942 | A request object that you can call 'execute()' on to request the next |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1943 | page. Returns None if there are no more items in the collection. |
| 1944 | </pre> |
| 1945 | </div> |
| 1946 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1947 | <div class="method"> |
| 1948 | <code class="details" id="retry">retry(projectId, id, body=None, x__xgafv=None)</code> |
| 1949 | <pre>Creates a new build based on the specified build. |
| 1950 | |
| 1951 | This method creates a new build using the original build request, which may |
| 1952 | or may not result in an identical build. |
| 1953 | |
| 1954 | For triggered builds: |
| 1955 | |
| 1956 | * Triggered builds resolve to a precise revision; therefore a retry of a |
| 1957 | triggered build will result in a build that uses the same revision. |
| 1958 | |
| 1959 | For non-triggered builds that specify `RepoSource`: |
| 1960 | |
| 1961 | * If the original build built from the tip of a branch, the retried build |
| 1962 | will build from the tip of that branch, which may not be the same revision |
| 1963 | as the original build. |
| 1964 | * If the original build specified a commit sha or revision ID, the retried |
| 1965 | build will use the identical source. |
| 1966 | |
| 1967 | For builds that specify `StorageSource`: |
| 1968 | |
| 1969 | * If the original build pulled source from Google Cloud Storage without |
| 1970 | specifying the generation of the object, the new build will use the current |
| 1971 | object, which may be different from the original build source. |
| 1972 | * If the original build pulled source from Cloud Storage and specified the |
| 1973 | generation of the object, the new build will attempt to use the same |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1974 | object, which may or may not be available depending on the bucket's |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1975 | lifecycle management settings. |
| 1976 | |
| 1977 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1978 | projectId: string, Required. ID of the project. (required) |
| 1979 | id: string, Required. Build ID of the original build. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1980 | body: object, The request body. |
| 1981 | The object takes the form of: |
| 1982 | |
| 1983 | { # Specifies a build to retry. |
| 1984 | } |
| 1985 | |
| 1986 | x__xgafv: string, V1 error format. |
| 1987 | Allowed values |
| 1988 | 1 - v1 error format |
| 1989 | 2 - v2 error format |
| 1990 | |
| 1991 | Returns: |
| 1992 | An object of the form: |
| 1993 | |
| 1994 | { # This resource represents a long-running operation that is the result of a |
| 1995 | # network API call. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1996 | "response": { # The normal response of the operation in case of success. If the original |
| 1997 | # method returns no data on success, such as `Delete`, the response is |
| 1998 | # `google.protobuf.Empty`. If the original method is standard |
| 1999 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 2000 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 2001 | # is the original method name. For example, if the original method name |
| 2002 | # is `TakeSnapshot()`, the inferred response type is |
| 2003 | # `TakeSnapshotResponse`. |
| 2004 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 2005 | }, |
| 2006 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 2007 | # contains progress information and common metadata such as create time. |
| 2008 | # Some services might not provide such metadata. Any method that returns a |
| 2009 | # long-running operation should document the metadata type, if any. |
| 2010 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 2011 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2012 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 2013 | # originally returns it. If you use the default HTTP mapping, the |
| 2014 | # `name` should be a resource name ending with `operations/{unique_id}`. |
| 2015 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 2016 | # different programming environments, including REST APIs and RPC APIs. It is |
| 2017 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 2018 | # three pieces of data: error code, error message, and error details. |
| 2019 | # |
| 2020 | # You can find out more about this error model and how to work with it in the |
| 2021 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 2022 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 2023 | # user-facing error message should be localized and sent in the |
| 2024 | # google.rpc.Status.details field, or localized by the client. |
| 2025 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 2026 | # message types for APIs to use. |
| 2027 | { |
| 2028 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 2029 | }, |
| 2030 | ], |
| 2031 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 2032 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2033 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2034 | # If `true`, the operation is completed, and either `error` or `response` is |
| 2035 | # available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2036 | }</pre> |
| 2037 | </div> |
| 2038 | |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 2039 | </body></html> |