Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -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.triggers.html">triggers</a></h1> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#create">create(projectId, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 79 | <p class="firstline">Creates a new `BuildTrigger`.</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
| 81 | <code><a href="#delete">delete(projectId, triggerId, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 82 | <p class="firstline">Deletes a `BuildTrigger` by its project ID and trigger ID.</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(projectId, triggerId, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 85 | <p class="firstline">Returns information about a `BuildTrigger`.</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 86 | <p class="toc_element"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 87 | <code><a href="#list">list(projectId, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 88 | <p class="firstline">Lists existing `BuildTrigger`s.</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> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#patch">patch(projectId, triggerId, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Updates a `BuildTrigger` by its project ID and trigger ID.</p> |
| 95 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 96 | <code><a href="#run">run(projectId, triggerId, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <p class="firstline">Runs a `BuildTrigger` at a particular source revision.</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 100 | <code class="details" id="create">create(projectId, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 101 | <pre>Creates a new `BuildTrigger`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 102 | |
| 103 | This API is experimental. |
| 104 | |
| 105 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 106 | projectId: string, Required. ID of the project for which to configure automatic builds. (required) |
| 107 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 108 | The object takes the form of: |
| 109 | |
| 110 | { # Configuration for an automated build in response to source repository |
| 111 | # changes. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 112 | "substitutions": { # Substitutions for Build resource. The keys must match the following |
| 113 | # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the |
| 114 | # keys in bindings. |
| 115 | "a_key": "A String", |
| 116 | }, |
| 117 | "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. |
| 118 | # |
| 119 | # Branch and tag names in trigger templates are interpreted as regular |
| 120 | # expressions. Any branch or tag change that matches that regular expression |
| 121 | # will trigger a build. |
| 122 | # |
| 123 | # Mutually exclusive with `github`. |
| 124 | "tagName": "A String", # Regex matching tags to build. |
| 125 | # |
| 126 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 127 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 128 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 129 | # |
| 130 | # This must be a relative path. If a step's `dir` is specified and is an |
| 131 | # absolute path, this value is ignored for that step's execution. |
| 132 | "substitutions": { # Substitutions to use in a triggered build. |
| 133 | # Should only be used with RunBuildTrigger |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 134 | "a_key": "A String", |
| 135 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 136 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 137 | "commitSha": "A String", # Explicit commit SHA to build. |
| 138 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 139 | # regex. |
| 140 | "branchName": "A String", # Regex matching branches to build. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 141 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 142 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 143 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 144 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 145 | # project ID requesting the build is assumed. |
| 146 | }, |
| 147 | "id": "A String", # Output only. Unique identifier of the trigger. |
| 148 | "build": { # A build resource in the Cloud Build API. # Contents of the build template. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 149 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 150 | # At a high level, a `Build` describes where to find source code, how to build |
| 151 | # it (for example, the builder image to run on the source), and where to store |
| 152 | # the built artifacts. |
| 153 | # |
| 154 | # Fields can include the following variables, which will be expanded when the |
| 155 | # build is created: |
| 156 | # |
| 157 | # - $PROJECT_ID: the project ID of the build. |
| 158 | # - $BUILD_ID: the autogenerated ID of the build. |
| 159 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 160 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 161 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 162 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 163 | # resolved from the specified branch or tag. |
| 164 | # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. |
| 165 | "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer |
| 166 | # than this value, the build will expire and the build status will be |
| 167 | # `EXPIRED`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 168 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 169 | # The TTL starts ticking from create_time. |
| 170 | "statusDetail": "A String", # Output only. Customer-readable message about the current status. |
| 171 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source. |
| 172 | # some source was used for this build. |
| 173 | "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any |
| 174 | # revisions resolved. |
| 175 | "tagName": "A String", # Regex matching tags to build. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 176 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 177 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 178 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 179 | "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] | 180 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 181 | # This must be a relative path. If a step's `dir` is specified and is an |
| 182 | # absolute path, this value is ignored for that step's execution. |
| 183 | "substitutions": { # Substitutions to use in a triggered build. |
| 184 | # Should only be used with RunBuildTrigger |
| 185 | "a_key": "A String", |
| 186 | }, |
| 187 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 188 | "commitSha": "A String", # Explicit commit SHA to build. |
| 189 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 190 | # regex. |
| 191 | "branchName": "A String", # Regex matching branches to build. |
| 192 | # |
| 193 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 194 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 195 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 196 | # project ID requesting the build is assumed. |
| 197 | }, |
| 198 | "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 |
| 199 | # generations resolved. |
| 200 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 201 | # omitted, the latest generation will be used. |
| 202 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 203 | # [Bucket Name |
| 204 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 205 | "object": "A String", # Google Cloud Storage object containing the source. |
| 206 | # |
| 207 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 208 | # build. |
| 209 | }, |
| 210 | "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that |
| 211 | # the original source integrity was maintained in the build. Note that |
| 212 | # `FileHashes` will only be populated if `BuildOptions` has requested a |
| 213 | # `SourceProvenanceHash`. |
| 214 | # |
| 215 | # The keys to this map are file paths used as build source and the values |
| 216 | # contain the hash values for those files. |
| 217 | # |
| 218 | # If the build source came in a single package such as a gzipped tarfile |
| 219 | # (`.tar.gz`), the `FileHash` will be for the single path to that file. |
| 220 | "a_key": { # Container message for hashes of byte content of files, used in |
| 221 | # SourceProvenance messages to verify integrity of source input to the build. |
| 222 | "fileHash": [ # Collection of file hashes. |
| 223 | { # Container message for hash values. |
| 224 | "value": "A String", # The hash value. |
| 225 | "type": "A String", # The type of hash that was performed. |
| 226 | }, |
| 227 | ], |
| 228 | }, |
| 229 | }, |
| 230 | }, |
| 231 | "secrets": [ # Secrets to decrypt using Cloud Key Management Service. |
| 232 | { # Pairs a set of secret environment variables containing encrypted |
| 233 | # values with the Cloud KMS key to use to decrypt the value. |
| 234 | "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs. |
| 235 | "secretEnv": { # Map of environment variable name to its encrypted value. |
| 236 | # |
| 237 | # Secret environment variables must be unique across all of a build's |
| 238 | # secrets, and must be used by at least one build step. Values can be at most |
| 239 | # 64 KB in size. There can be at most 100 secret values across all of a |
| 240 | # build's secrets. |
| 241 | "a_key": "A String", |
| 242 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 243 | }, |
| 244 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 245 | "results": { # Artifacts created by the build pipeline. # Output only. Results of the build. |
| 246 | "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded. |
| 247 | "buildStepImages": [ # List of build step digests, in the order corresponding to build step |
| 248 | # indices. |
| 249 | "A String", |
| 250 | ], |
| 251 | "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 252 | "startTime": "A String", # Start of time span. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 253 | "endTime": "A String", # End of time span. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 254 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 255 | "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded. |
| 256 | "images": [ # Container images that were built as a part of the build. |
| 257 | { # An image built by the pipeline. |
| 258 | "digest": "A String", # Docker Registry 2.0 digest. |
| 259 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 260 | # presented to `docker push`. |
| 261 | "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image. |
| 262 | "startTime": "A String", # Start of time span. |
| 263 | "endTime": "A String", # End of time span. |
| 264 | }, |
| 265 | }, |
| 266 | ], |
| 267 | "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order |
| 268 | # corresponding to build step indices. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 269 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 270 | # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) |
| 271 | # can produce this output by writing to `$BUILDER_OUTPUT/output`. |
| 272 | # Only the first 4KB of data is stored. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 273 | "A String", |
| 274 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 275 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 276 | "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console. |
| 277 | "timing": { # Output only. Stores timing information for phases of the build. Valid keys |
| 278 | # are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 279 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 280 | # * BUILD: time to execute all build steps |
| 281 | # * PUSH: time to push all specified images. |
| 282 | # * FETCHSOURCE: time to fetch source. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 283 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 284 | # If the build does not specify source or images, |
| 285 | # these keys will not be included. |
| 286 | "a_key": { # Start and end times for a build execution phase. |
| 287 | "startTime": "A String", # Start of time span. |
| 288 | "endTime": "A String", # End of time span. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 289 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 290 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 291 | "finishTime": "A String", # Output only. Time at which execution of the build was finished. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 292 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 293 | # The difference between finish_time and start_time is the duration of the |
| 294 | # build's execution. |
| 295 | "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it |
| 296 | # was triggered automatically. |
| 297 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 298 | # granularity. If this amount of time elapses, work on the build will cease |
| 299 | # and the build status will be `TIMEOUT`. |
| 300 | # |
| 301 | # `timeout` starts ticking from `startTime`. |
| 302 | # |
| 303 | # Default time is ten minutes. |
| 304 | "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon |
| 305 | # successful completion of all build steps. |
| 306 | # successful completion of all build steps. |
| 307 | "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful |
| 308 | # completion of all build steps. |
| 309 | # |
| 310 | # Files in the workspace matching specified paths globs will be uploaded to |
| 311 | # the specified Cloud Storage location using the builder service account's |
| 312 | # credentials. |
| 313 | # |
| 314 | # The location and generation of the uploaded objects will be stored in the |
| 315 | # Build resource's results field. |
| 316 | # |
| 317 | # If any objects fail to be pushed, the build is marked FAILURE. |
| 318 | # completion of all build steps. |
| 319 | "location": "A String", # Cloud Storage bucket and optional object path, in the form |
| 320 | # "gs://bucket/path/to/somewhere/". (see [Bucket Name |
| 321 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 322 | # |
| 323 | # Files in the workspace matching any path pattern will be uploaded to |
| 324 | # Cloud Storage with this location as a prefix. |
| 325 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 326 | "startTime": "A String", # Start of time span. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 327 | "endTime": "A String", # End of time span. |
| 328 | }, |
| 329 | "paths": [ # Path globs used to match files in the build's workspace. |
| 330 | "A String", |
| 331 | ], |
| 332 | }, |
| 333 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 334 | # steps. |
| 335 | # |
| 336 | # The images will be pushed using the builder service account's credentials. |
| 337 | # |
| 338 | # The digests of the pushed images will be stored in the Build resource's |
| 339 | # results field. |
| 340 | # |
| 341 | # If any of the images fail to be pushed, the build is marked FAILURE. |
| 342 | "A String", |
| 343 | ], |
| 344 | }, |
| 345 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 346 | # [Bucket Name |
| 347 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 348 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 349 | "steps": [ # Required. The operations to be performed on the workspace. |
| 350 | { # A step in the build pipeline. |
| 351 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 352 | # |
| 353 | # If the image used to run the step's container has an entrypoint, the `args` |
| 354 | # are used as arguments to that entrypoint. If the image does not define |
| 355 | # an entrypoint, the first element in args is used as the entrypoint, |
| 356 | # and the remainder will be used as arguments. |
| 357 | "A String", |
| 358 | ], |
| 359 | "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint. |
| 360 | # If unset, the image's default entrypoint is used. |
| 361 | "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key |
| 362 | # Management Service crypto key. These values must be specified in the |
| 363 | # build's `Secret`. |
| 364 | "A String", |
| 365 | ], |
| 366 | "status": "A String", # Output only. Status of the build step. At this time, build step status is |
| 367 | # only updated on build completion; step status is not updated in real-time |
| 368 | # as the build progresses. |
| 369 | "volumes": [ # List of volumes to mount into the build step. |
| 370 | # |
| 371 | # Each volume is created as an empty volume prior to execution of the |
| 372 | # build step. Upon completion of the build, volumes and their contents are |
| 373 | # discarded. |
| 374 | # |
| 375 | # Using a named volume in only one step is not valid as it is indicative |
| 376 | # of a build request with an incorrect configuration. |
| 377 | { # Volume describes a Docker container volume which is mounted into build steps |
| 378 | # in order to persist files across build step execution. |
| 379 | "path": "A String", # Path at which to mount the volume. |
| 380 | # |
| 381 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 382 | # same build step or with certain reserved volume paths. |
| 383 | "name": "A String", # Name of the volume to mount. |
| 384 | # |
| 385 | # Volume names must be unique per build step and must be valid names for |
| 386 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 387 | }, |
| 388 | ], |
| 389 | "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no |
| 390 | # time limit and will be allowed to continue to run until either it completes |
| 391 | # or the build itself times out. |
| 392 | "dir": "A String", # Working directory to use when running this step's container. |
| 393 | # |
| 394 | # If this value is a relative path, it is relative to the build's working |
| 395 | # directory. If this value is absolute, it may be outside the build's working |
| 396 | # directory, in which case the contents of the path may not be persisted |
| 397 | # across build step executions, unless a `volume` for that path is specified. |
| 398 | # |
| 399 | # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, |
| 400 | # which specifies an absolute path, the `RepoSource` `dir` is ignored for |
| 401 | # the step's execution. |
| 402 | "id": "A String", # Unique identifier for this build step, used in `wait_for` to |
| 403 | # reference this build step as a dependency. |
| 404 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 405 | # |
| 406 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 407 | # being given the value "VALUE". |
| 408 | "A String", |
| 409 | ], |
| 410 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 411 | # This build step will not start until all the build steps in `wait_for` |
| 412 | # have completed successfully. If `wait_for` is empty, this build step will |
| 413 | # start when all previous build steps in the `Build.Steps` list have |
| 414 | # completed successfully. |
| 415 | "A String", |
| 416 | ], |
| 417 | "name": "A String", # Required. The name of the container image that will run this particular |
| 418 | # build step. |
| 419 | # |
| 420 | # If the image is available in the host's Docker daemon's cache, it |
| 421 | # will be run directly. If not, the host will attempt to pull the image |
| 422 | # first, using the builder service account's credentials if necessary. |
| 423 | # |
| 424 | # The Docker daemon's cache will already have the latest versions of all of |
| 425 | # the officially supported build steps |
| 426 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 427 | # The Docker daemon will also have cached many of the layers for some popular |
| 428 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 429 | # attempt to use them. |
| 430 | # |
| 431 | # If you built an image in a previous build step, it will be stored in the |
| 432 | # host's Docker daemon's cache and is available to use as the name for a |
| 433 | # later build step. |
| 434 | "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's |
| 435 | # builder image only. |
| 436 | "startTime": "A String", # Start of time span. |
| 437 | "endTime": "A String", # End of time span. |
| 438 | }, |
| 439 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step. |
| 440 | "startTime": "A String", # Start of time span. |
| 441 | "endTime": "A String", # End of time span. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 442 | }, |
| 443 | }, |
| 444 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 445 | "id": "A String", # Output only. Unique identifier of the build. |
| 446 | "status": "A String", # Output only. Status of the build. |
| 447 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 448 | # steps. |
| 449 | # |
| 450 | # The images are pushed using the builder service account's credentials. |
| 451 | # |
| 452 | # The digests of the pushed images will be stored in the `Build` resource's |
| 453 | # results field. |
| 454 | # |
| 455 | # If any of the images fail to be pushed, the build status is marked |
| 456 | # `FAILURE`. |
| 457 | "A String", |
| 458 | ], |
| 459 | "projectId": "A String", # Output only. ID of the project. |
| 460 | "source": { # Location of the source in a supported storage service. # The location of the source files to build. |
| 461 | "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. |
| 462 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 463 | # omitted, the latest generation will be used. |
| 464 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 465 | # [Bucket Name |
| 466 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 467 | "object": "A String", # Google Cloud Storage object containing the source. |
| 468 | # |
| 469 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 470 | # build. |
| 471 | }, |
| 472 | "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source |
| 473 | # Repository. |
| 474 | "tagName": "A String", # Regex matching tags to build. |
| 475 | # |
| 476 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 477 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 478 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 479 | # |
| 480 | # This must be a relative path. If a step's `dir` is specified and is an |
| 481 | # absolute path, this value is ignored for that step's execution. |
| 482 | "substitutions": { # Substitutions to use in a triggered build. |
| 483 | # Should only be used with RunBuildTrigger |
| 484 | "a_key": "A String", |
| 485 | }, |
| 486 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 487 | "commitSha": "A String", # Explicit commit SHA to build. |
| 488 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 489 | # regex. |
| 490 | "branchName": "A String", # Regex matching branches to build. |
| 491 | # |
| 492 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 493 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 494 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 495 | # project ID requesting the build is assumed. |
| 496 | }, |
| 497 | }, |
| 498 | "tags": [ # Tags for annotation of a `Build`. These are not docker tags. |
| 499 | "A String", |
| 500 | ], |
| 501 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 502 | "volumes": [ # Global list of volumes to mount for ALL build steps |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 503 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 504 | # Each volume is created as an empty volume prior to starting the build |
| 505 | # process. Upon completion of the build, volumes and their contents are |
| 506 | # discarded. Global volume names and paths cannot conflict with the volumes |
| 507 | # defined a build step. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 508 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 509 | # Using a global volume in a build with only one step is not valid as |
| 510 | # it is indicative of a build request with an incorrect configuration. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 511 | { # Volume describes a Docker container volume which is mounted into build steps |
| 512 | # in order to persist files across build step execution. |
| 513 | "path": "A String", # Path at which to mount the volume. |
| 514 | # |
| 515 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 516 | # same build step or with certain reserved volume paths. |
| 517 | "name": "A String", # Name of the volume to mount. |
| 518 | # |
| 519 | # Volume names must be unique per build step and must be valid names for |
| 520 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 521 | }, |
| 522 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 523 | "env": [ # A list of global environment variable definitions that will exist for all |
| 524 | # build steps in this build. If a variable is defined in both globally and in |
| 525 | # a build step, the variable will use the build step value. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 526 | # |
| 527 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 528 | # being given the value "VALUE". |
| 529 | "A String", |
| 530 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 531 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 532 | "A String", |
| 533 | ], |
| 534 | "machineType": "A String", # Compute Engine machine type on which to run the build. |
| 535 | "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud |
| 536 | # Storage. |
| 537 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 538 | "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution |
| 539 | # checks. |
| 540 | # |
| 541 | # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot |
| 542 | # be overridden in the build configuration file. |
| 543 | "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT* |
| 544 | # "disk free"; some of the space will be used by the operating system and |
| 545 | # build utilities. Also note that this is the minimum disk size that will be |
| 546 | # allocated for the build -- the build may run with a larger disk than |
| 547 | # requested. At present, the maximum disk size is 1000GB; builds that request |
| 548 | # more than the maximum are rejected with an error. |
| 549 | "workerPool": "A String", # Option to specify a `WorkerPool` for the build. |
| 550 | # Format: projects/{project}/workerPools/{workerPool} |
| 551 | # |
| 552 | # This field is experimental. |
| 553 | "logging": "A String", # Option to specify the logging mode, which determines if and where build |
| 554 | # logs are stored. |
| 555 | "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud |
| 556 | # Key Management Service crypto key. These values must be specified in the |
| 557 | # build's `Secret`. These variables will be available to all build steps |
| 558 | # in this build. |
| 559 | "A String", |
| 560 | ], |
| 561 | "dynamicSubstitutions": True or False, # Option to specify whether or not to apply bash style string |
| 562 | # operations to the substitutions. |
| 563 | # |
| 564 | # NOTE: this is always enabled for triggered builds and cannot be |
| 565 | # overridden in the build configuration file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 566 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 567 | "substitutions": { # Substitutions data for `Build` resource. |
| 568 | "a_key": "A String", |
| 569 | }, |
| 570 | "createTime": "A String", # Output only. Time at which the request to create the build was received. |
| 571 | "startTime": "A String", # Output only. Time at which execution of the build was started. |
| 572 | }, |
| 573 | "ignoredFiles": [ # ignored_files and included_files are file glob matches using |
| 574 | # https://golang.org/pkg/path/filepath/#Match extended with support for "**". |
| 575 | # |
| 576 | # If ignored_files and changed files are both empty, then they are |
| 577 | # not used to determine whether or not to trigger a build. |
| 578 | # |
| 579 | # If ignored_files is not empty, then we ignore any files that match |
| 580 | # any of the ignored_file globs. If the change has no files that are |
| 581 | # outside of the ignored_files globs, then we do not trigger a build. |
| 582 | "A String", |
| 583 | ], |
| 584 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 585 | # template. |
| 586 | "disabled": True or False, # If true, the trigger will never automatically execute a build. |
| 587 | "name": "A String", # User-assigned name of the trigger. Must be unique within the project. |
| 588 | # Trigger names must meet the following requirements: |
| 589 | # |
| 590 | # + They must contain only alphanumeric characters and dashes. |
| 591 | # + They can be 1-64 characters long. |
| 592 | # + They must begin and end with an alphanumeric character. |
| 593 | "tags": [ # Tags for annotation of a `BuildTrigger` |
| 594 | "A String", |
| 595 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 596 | "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates |
| 597 | # a build whenever a GitHub event is received. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 598 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 599 | # Mutually exclusive with `trigger_template`. |
| 600 | # build whenever a GitHub event is received. |
| 601 | # |
| 602 | # This message is experimental. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 603 | "installationId": "A String", # The installationID that emits the GitHub event. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 604 | "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests. |
| 605 | # Requests. |
| 606 | "branch": "A String", # Regex of branches to match. |
| 607 | # |
| 608 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 609 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 610 | "commentControl": "A String", # Configure builds to run whether a repository owner or collaborator need to |
| 611 | # comment `/gcbrun`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 612 | "invertRegex": True or False, # If true, branches that do NOT match the git_ref will trigger a build. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 613 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 614 | "name": "A String", # Name of the repository. For example: The name for |
| 615 | # https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". |
| 616 | "owner": "A String", # Owner of the repository. For example: The owner for |
| 617 | # https://github.com/googlecloudplatform/cloud-builders is |
| 618 | # "googlecloudplatform". |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 619 | "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags. |
| 620 | "branch": "A String", # Regexes matching branches to build. |
| 621 | # |
| 622 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 623 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 624 | "invertRegex": True or False, # When true, only trigger a build if the revision regex does NOT match the |
| 625 | # git_ref regex. |
| 626 | "tag": "A String", # Regexes matching tags to build. |
| 627 | # |
| 628 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 629 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 630 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 631 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 632 | "createTime": "A String", # Output only. Time when the trigger was created. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 633 | "includedFiles": [ # If any of the files altered in the commit pass the ignored_files |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 634 | # filter and included_files is empty, then as far as this filter is |
| 635 | # concerned, we should trigger the build. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 636 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 637 | # If any of the files altered in the commit pass the ignored_files |
| 638 | # filter and included_files is not empty, then we make sure that at |
| 639 | # least one of those files matches a included_files glob. If not, |
| 640 | # then we do not trigger a build. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 641 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 642 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 643 | "description": "A String", # Human-readable description of this trigger. |
| 644 | } |
| 645 | |
| 646 | x__xgafv: string, V1 error format. |
| 647 | Allowed values |
| 648 | 1 - v1 error format |
| 649 | 2 - v2 error format |
| 650 | |
| 651 | Returns: |
| 652 | An object of the form: |
| 653 | |
| 654 | { # Configuration for an automated build in response to source repository |
| 655 | # changes. |
| 656 | "substitutions": { # Substitutions for Build resource. The keys must match the following |
| 657 | # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the |
| 658 | # keys in bindings. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 659 | "a_key": "A String", |
| 660 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 661 | "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. |
| 662 | # |
| 663 | # Branch and tag names in trigger templates are interpreted as regular |
| 664 | # expressions. Any branch or tag change that matches that regular expression |
| 665 | # will trigger a build. |
| 666 | # |
| 667 | # Mutually exclusive with `github`. |
| 668 | "tagName": "A String", # Regex matching tags to build. |
| 669 | # |
| 670 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 671 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 672 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 673 | # |
| 674 | # This must be a relative path. If a step's `dir` is specified and is an |
| 675 | # absolute path, this value is ignored for that step's execution. |
| 676 | "substitutions": { # Substitutions to use in a triggered build. |
| 677 | # Should only be used with RunBuildTrigger |
| 678 | "a_key": "A String", |
| 679 | }, |
| 680 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 681 | "commitSha": "A String", # Explicit commit SHA to build. |
| 682 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 683 | # regex. |
| 684 | "branchName": "A String", # Regex matching branches to build. |
| 685 | # |
| 686 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 687 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 688 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 689 | # project ID requesting the build is assumed. |
| 690 | }, |
| 691 | "id": "A String", # Output only. Unique identifier of the trigger. |
| 692 | "build": { # A build resource in the Cloud Build API. # Contents of the build template. |
| 693 | # |
| 694 | # At a high level, a `Build` describes where to find source code, how to build |
| 695 | # it (for example, the builder image to run on the source), and where to store |
| 696 | # the built artifacts. |
| 697 | # |
| 698 | # Fields can include the following variables, which will be expanded when the |
| 699 | # build is created: |
| 700 | # |
| 701 | # - $PROJECT_ID: the project ID of the build. |
| 702 | # - $BUILD_ID: the autogenerated ID of the build. |
| 703 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 704 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 705 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 706 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 707 | # resolved from the specified branch or tag. |
| 708 | # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. |
| 709 | "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer |
| 710 | # than this value, the build will expire and the build status will be |
| 711 | # `EXPIRED`. |
| 712 | # |
| 713 | # The TTL starts ticking from create_time. |
| 714 | "statusDetail": "A String", # Output only. Customer-readable message about the current status. |
| 715 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source. |
| 716 | # some source was used for this build. |
| 717 | "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any |
| 718 | # revisions resolved. |
| 719 | "tagName": "A String", # Regex matching tags to build. |
| 720 | # |
| 721 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 722 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 723 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 724 | # |
| 725 | # This must be a relative path. If a step's `dir` is specified and is an |
| 726 | # absolute path, this value is ignored for that step's execution. |
| 727 | "substitutions": { # Substitutions to use in a triggered build. |
| 728 | # Should only be used with RunBuildTrigger |
| 729 | "a_key": "A String", |
| 730 | }, |
| 731 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 732 | "commitSha": "A String", # Explicit commit SHA to build. |
| 733 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 734 | # regex. |
| 735 | "branchName": "A String", # Regex matching branches to build. |
| 736 | # |
| 737 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 738 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 739 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 740 | # project ID requesting the build is assumed. |
| 741 | }, |
| 742 | "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 |
| 743 | # generations resolved. |
| 744 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 745 | # omitted, the latest generation will be used. |
| 746 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 747 | # [Bucket Name |
| 748 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 749 | "object": "A String", # Google Cloud Storage object containing the source. |
| 750 | # |
| 751 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 752 | # build. |
| 753 | }, |
| 754 | "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that |
| 755 | # the original source integrity was maintained in the build. Note that |
| 756 | # `FileHashes` will only be populated if `BuildOptions` has requested a |
| 757 | # `SourceProvenanceHash`. |
| 758 | # |
| 759 | # The keys to this map are file paths used as build source and the values |
| 760 | # contain the hash values for those files. |
| 761 | # |
| 762 | # If the build source came in a single package such as a gzipped tarfile |
| 763 | # (`.tar.gz`), the `FileHash` will be for the single path to that file. |
| 764 | "a_key": { # Container message for hashes of byte content of files, used in |
| 765 | # SourceProvenance messages to verify integrity of source input to the build. |
| 766 | "fileHash": [ # Collection of file hashes. |
| 767 | { # Container message for hash values. |
| 768 | "value": "A String", # The hash value. |
| 769 | "type": "A String", # The type of hash that was performed. |
| 770 | }, |
| 771 | ], |
| 772 | }, |
| 773 | }, |
| 774 | }, |
| 775 | "secrets": [ # Secrets to decrypt using Cloud Key Management Service. |
| 776 | { # Pairs a set of secret environment variables containing encrypted |
| 777 | # values with the Cloud KMS key to use to decrypt the value. |
| 778 | "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs. |
| 779 | "secretEnv": { # Map of environment variable name to its encrypted value. |
| 780 | # |
| 781 | # Secret environment variables must be unique across all of a build's |
| 782 | # secrets, and must be used by at least one build step. Values can be at most |
| 783 | # 64 KB in size. There can be at most 100 secret values across all of a |
| 784 | # build's secrets. |
| 785 | "a_key": "A String", |
| 786 | }, |
| 787 | }, |
| 788 | ], |
| 789 | "results": { # Artifacts created by the build pipeline. # Output only. Results of the build. |
| 790 | "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded. |
| 791 | "buildStepImages": [ # List of build step digests, in the order corresponding to build step |
| 792 | # indices. |
| 793 | "A String", |
| 794 | ], |
| 795 | "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts. |
| 796 | "startTime": "A String", # Start of time span. |
| 797 | "endTime": "A String", # End of time span. |
| 798 | }, |
| 799 | "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded. |
| 800 | "images": [ # Container images that were built as a part of the build. |
| 801 | { # An image built by the pipeline. |
| 802 | "digest": "A String", # Docker Registry 2.0 digest. |
| 803 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 804 | # presented to `docker push`. |
| 805 | "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image. |
| 806 | "startTime": "A String", # Start of time span. |
| 807 | "endTime": "A String", # End of time span. |
| 808 | }, |
| 809 | }, |
| 810 | ], |
| 811 | "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order |
| 812 | # corresponding to build step indices. |
| 813 | # |
| 814 | # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) |
| 815 | # can produce this output by writing to `$BUILDER_OUTPUT/output`. |
| 816 | # Only the first 4KB of data is stored. |
| 817 | "A String", |
| 818 | ], |
| 819 | }, |
| 820 | "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console. |
| 821 | "timing": { # Output only. Stores timing information for phases of the build. Valid keys |
| 822 | # are: |
| 823 | # |
| 824 | # * BUILD: time to execute all build steps |
| 825 | # * PUSH: time to push all specified images. |
| 826 | # * FETCHSOURCE: time to fetch source. |
| 827 | # |
| 828 | # If the build does not specify source or images, |
| 829 | # these keys will not be included. |
| 830 | "a_key": { # Start and end times for a build execution phase. |
| 831 | "startTime": "A String", # Start of time span. |
| 832 | "endTime": "A String", # End of time span. |
| 833 | }, |
| 834 | }, |
| 835 | "finishTime": "A String", # Output only. Time at which execution of the build was finished. |
| 836 | # |
| 837 | # The difference between finish_time and start_time is the duration of the |
| 838 | # build's execution. |
| 839 | "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it |
| 840 | # was triggered automatically. |
| 841 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 842 | # granularity. If this amount of time elapses, work on the build will cease |
| 843 | # and the build status will be `TIMEOUT`. |
| 844 | # |
| 845 | # `timeout` starts ticking from `startTime`. |
| 846 | # |
| 847 | # Default time is ten minutes. |
| 848 | "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon |
| 849 | # successful completion of all build steps. |
| 850 | # successful completion of all build steps. |
| 851 | "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful |
| 852 | # completion of all build steps. |
| 853 | # |
| 854 | # Files in the workspace matching specified paths globs will be uploaded to |
| 855 | # the specified Cloud Storage location using the builder service account's |
| 856 | # credentials. |
| 857 | # |
| 858 | # The location and generation of the uploaded objects will be stored in the |
| 859 | # Build resource's results field. |
| 860 | # |
| 861 | # If any objects fail to be pushed, the build is marked FAILURE. |
| 862 | # completion of all build steps. |
| 863 | "location": "A String", # Cloud Storage bucket and optional object path, in the form |
| 864 | # "gs://bucket/path/to/somewhere/". (see [Bucket Name |
| 865 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 866 | # |
| 867 | # Files in the workspace matching any path pattern will be uploaded to |
| 868 | # Cloud Storage with this location as a prefix. |
| 869 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects. |
| 870 | "startTime": "A String", # Start of time span. |
| 871 | "endTime": "A String", # End of time span. |
| 872 | }, |
| 873 | "paths": [ # Path globs used to match files in the build's workspace. |
| 874 | "A String", |
| 875 | ], |
| 876 | }, |
| 877 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 878 | # steps. |
| 879 | # |
| 880 | # The images will be pushed using the builder service account's credentials. |
| 881 | # |
| 882 | # The digests of the pushed images will be stored in the Build resource's |
| 883 | # results field. |
| 884 | # |
| 885 | # If any of the images fail to be pushed, the build is marked FAILURE. |
| 886 | "A String", |
| 887 | ], |
| 888 | }, |
| 889 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 890 | # [Bucket Name |
| 891 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 892 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 893 | "steps": [ # Required. The operations to be performed on the workspace. |
| 894 | { # A step in the build pipeline. |
| 895 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 896 | # |
| 897 | # If the image used to run the step's container has an entrypoint, the `args` |
| 898 | # are used as arguments to that entrypoint. If the image does not define |
| 899 | # an entrypoint, the first element in args is used as the entrypoint, |
| 900 | # and the remainder will be used as arguments. |
| 901 | "A String", |
| 902 | ], |
| 903 | "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint. |
| 904 | # If unset, the image's default entrypoint is used. |
| 905 | "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key |
| 906 | # Management Service crypto key. These values must be specified in the |
| 907 | # build's `Secret`. |
| 908 | "A String", |
| 909 | ], |
| 910 | "status": "A String", # Output only. Status of the build step. At this time, build step status is |
| 911 | # only updated on build completion; step status is not updated in real-time |
| 912 | # as the build progresses. |
| 913 | "volumes": [ # List of volumes to mount into the build step. |
| 914 | # |
| 915 | # Each volume is created as an empty volume prior to execution of the |
| 916 | # build step. Upon completion of the build, volumes and their contents are |
| 917 | # discarded. |
| 918 | # |
| 919 | # Using a named volume in only one step is not valid as it is indicative |
| 920 | # of a build request with an incorrect configuration. |
| 921 | { # Volume describes a Docker container volume which is mounted into build steps |
| 922 | # in order to persist files across build step execution. |
| 923 | "path": "A String", # Path at which to mount the volume. |
| 924 | # |
| 925 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 926 | # same build step or with certain reserved volume paths. |
| 927 | "name": "A String", # Name of the volume to mount. |
| 928 | # |
| 929 | # Volume names must be unique per build step and must be valid names for |
| 930 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 931 | }, |
| 932 | ], |
| 933 | "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no |
| 934 | # time limit and will be allowed to continue to run until either it completes |
| 935 | # or the build itself times out. |
| 936 | "dir": "A String", # Working directory to use when running this step's container. |
| 937 | # |
| 938 | # If this value is a relative path, it is relative to the build's working |
| 939 | # directory. If this value is absolute, it may be outside the build's working |
| 940 | # directory, in which case the contents of the path may not be persisted |
| 941 | # across build step executions, unless a `volume` for that path is specified. |
| 942 | # |
| 943 | # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, |
| 944 | # which specifies an absolute path, the `RepoSource` `dir` is ignored for |
| 945 | # the step's execution. |
| 946 | "id": "A String", # Unique identifier for this build step, used in `wait_for` to |
| 947 | # reference this build step as a dependency. |
| 948 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 949 | # |
| 950 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 951 | # being given the value "VALUE". |
| 952 | "A String", |
| 953 | ], |
| 954 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 955 | # This build step will not start until all the build steps in `wait_for` |
| 956 | # have completed successfully. If `wait_for` is empty, this build step will |
| 957 | # start when all previous build steps in the `Build.Steps` list have |
| 958 | # completed successfully. |
| 959 | "A String", |
| 960 | ], |
| 961 | "name": "A String", # Required. The name of the container image that will run this particular |
| 962 | # build step. |
| 963 | # |
| 964 | # If the image is available in the host's Docker daemon's cache, it |
| 965 | # will be run directly. If not, the host will attempt to pull the image |
| 966 | # first, using the builder service account's credentials if necessary. |
| 967 | # |
| 968 | # The Docker daemon's cache will already have the latest versions of all of |
| 969 | # the officially supported build steps |
| 970 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 971 | # The Docker daemon will also have cached many of the layers for some popular |
| 972 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 973 | # attempt to use them. |
| 974 | # |
| 975 | # If you built an image in a previous build step, it will be stored in the |
| 976 | # host's Docker daemon's cache and is available to use as the name for a |
| 977 | # later build step. |
| 978 | "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's |
| 979 | # builder image only. |
| 980 | "startTime": "A String", # Start of time span. |
| 981 | "endTime": "A String", # End of time span. |
| 982 | }, |
| 983 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step. |
| 984 | "startTime": "A String", # Start of time span. |
| 985 | "endTime": "A String", # End of time span. |
| 986 | }, |
| 987 | }, |
| 988 | ], |
| 989 | "id": "A String", # Output only. Unique identifier of the build. |
| 990 | "status": "A String", # Output only. Status of the build. |
| 991 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 992 | # steps. |
| 993 | # |
| 994 | # The images are pushed using the builder service account's credentials. |
| 995 | # |
| 996 | # The digests of the pushed images will be stored in the `Build` resource's |
| 997 | # results field. |
| 998 | # |
| 999 | # If any of the images fail to be pushed, the build status is marked |
| 1000 | # `FAILURE`. |
| 1001 | "A String", |
| 1002 | ], |
| 1003 | "projectId": "A String", # Output only. ID of the project. |
| 1004 | "source": { # Location of the source in a supported storage service. # The location of the source files to build. |
| 1005 | "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. |
| 1006 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1007 | # omitted, the latest generation will be used. |
| 1008 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 1009 | # [Bucket Name |
| 1010 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1011 | "object": "A String", # Google Cloud Storage object containing the source. |
| 1012 | # |
| 1013 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 1014 | # build. |
| 1015 | }, |
| 1016 | "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source |
| 1017 | # Repository. |
| 1018 | "tagName": "A String", # Regex matching tags to build. |
| 1019 | # |
| 1020 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1021 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1022 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 1023 | # |
| 1024 | # This must be a relative path. If a step's `dir` is specified and is an |
| 1025 | # absolute path, this value is ignored for that step's execution. |
| 1026 | "substitutions": { # Substitutions to use in a triggered build. |
| 1027 | # Should only be used with RunBuildTrigger |
| 1028 | "a_key": "A String", |
| 1029 | }, |
| 1030 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 1031 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1032 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 1033 | # regex. |
| 1034 | "branchName": "A String", # Regex matching branches to build. |
| 1035 | # |
| 1036 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1037 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1038 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 1039 | # project ID requesting the build is assumed. |
| 1040 | }, |
| 1041 | }, |
| 1042 | "tags": [ # Tags for annotation of a `Build`. These are not docker tags. |
| 1043 | "A String", |
| 1044 | ], |
| 1045 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 1046 | "volumes": [ # Global list of volumes to mount for ALL build steps |
| 1047 | # |
| 1048 | # Each volume is created as an empty volume prior to starting the build |
| 1049 | # process. Upon completion of the build, volumes and their contents are |
| 1050 | # discarded. Global volume names and paths cannot conflict with the volumes |
| 1051 | # defined a build step. |
| 1052 | # |
| 1053 | # Using a global volume in a build with only one step is not valid as |
| 1054 | # it is indicative of a build request with an incorrect configuration. |
| 1055 | { # Volume describes a Docker container volume which is mounted into build steps |
| 1056 | # in order to persist files across build step execution. |
| 1057 | "path": "A String", # Path at which to mount the volume. |
| 1058 | # |
| 1059 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 1060 | # same build step or with certain reserved volume paths. |
| 1061 | "name": "A String", # Name of the volume to mount. |
| 1062 | # |
| 1063 | # Volume names must be unique per build step and must be valid names for |
| 1064 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 1065 | }, |
| 1066 | ], |
| 1067 | "env": [ # A list of global environment variable definitions that will exist for all |
| 1068 | # build steps in this build. If a variable is defined in both globally and in |
| 1069 | # a build step, the variable will use the build step value. |
| 1070 | # |
| 1071 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 1072 | # being given the value "VALUE". |
| 1073 | "A String", |
| 1074 | ], |
| 1075 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 1076 | "A String", |
| 1077 | ], |
| 1078 | "machineType": "A String", # Compute Engine machine type on which to run the build. |
| 1079 | "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud |
| 1080 | # Storage. |
| 1081 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 1082 | "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution |
| 1083 | # checks. |
| 1084 | # |
| 1085 | # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot |
| 1086 | # be overridden in the build configuration file. |
| 1087 | "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT* |
| 1088 | # "disk free"; some of the space will be used by the operating system and |
| 1089 | # build utilities. Also note that this is the minimum disk size that will be |
| 1090 | # allocated for the build -- the build may run with a larger disk than |
| 1091 | # requested. At present, the maximum disk size is 1000GB; builds that request |
| 1092 | # more than the maximum are rejected with an error. |
| 1093 | "workerPool": "A String", # Option to specify a `WorkerPool` for the build. |
| 1094 | # Format: projects/{project}/workerPools/{workerPool} |
| 1095 | # |
| 1096 | # This field is experimental. |
| 1097 | "logging": "A String", # Option to specify the logging mode, which determines if and where build |
| 1098 | # logs are stored. |
| 1099 | "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud |
| 1100 | # Key Management Service crypto key. These values must be specified in the |
| 1101 | # build's `Secret`. These variables will be available to all build steps |
| 1102 | # in this build. |
| 1103 | "A String", |
| 1104 | ], |
| 1105 | "dynamicSubstitutions": True or False, # Option to specify whether or not to apply bash style string |
| 1106 | # operations to the substitutions. |
| 1107 | # |
| 1108 | # NOTE: this is always enabled for triggered builds and cannot be |
| 1109 | # overridden in the build configuration file. |
| 1110 | }, |
| 1111 | "substitutions": { # Substitutions data for `Build` resource. |
| 1112 | "a_key": "A String", |
| 1113 | }, |
| 1114 | "createTime": "A String", # Output only. Time at which the request to create the build was received. |
| 1115 | "startTime": "A String", # Output only. Time at which execution of the build was started. |
| 1116 | }, |
| 1117 | "ignoredFiles": [ # ignored_files and included_files are file glob matches using |
| 1118 | # https://golang.org/pkg/path/filepath/#Match extended with support for "**". |
| 1119 | # |
| 1120 | # If ignored_files and changed files are both empty, then they are |
| 1121 | # not used to determine whether or not to trigger a build. |
| 1122 | # |
| 1123 | # If ignored_files is not empty, then we ignore any files that match |
| 1124 | # any of the ignored_file globs. If the change has no files that are |
| 1125 | # outside of the ignored_files globs, then we do not trigger a build. |
| 1126 | "A String", |
| 1127 | ], |
| 1128 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 1129 | # template. |
| 1130 | "disabled": True or False, # If true, the trigger will never automatically execute a build. |
| 1131 | "name": "A String", # User-assigned name of the trigger. Must be unique within the project. |
| 1132 | # Trigger names must meet the following requirements: |
| 1133 | # |
| 1134 | # + They must contain only alphanumeric characters and dashes. |
| 1135 | # + They can be 1-64 characters long. |
| 1136 | # + They must begin and end with an alphanumeric character. |
| 1137 | "tags": [ # Tags for annotation of a `BuildTrigger` |
| 1138 | "A String", |
| 1139 | ], |
| 1140 | "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates |
| 1141 | # a build whenever a GitHub event is received. |
| 1142 | # |
| 1143 | # Mutually exclusive with `trigger_template`. |
| 1144 | # build whenever a GitHub event is received. |
| 1145 | # |
| 1146 | # This message is experimental. |
| 1147 | "installationId": "A String", # The installationID that emits the GitHub event. |
| 1148 | "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests. |
| 1149 | # Requests. |
| 1150 | "branch": "A String", # Regex of branches to match. |
| 1151 | # |
| 1152 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1153 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1154 | "commentControl": "A String", # Configure builds to run whether a repository owner or collaborator need to |
| 1155 | # comment `/gcbrun`. |
| 1156 | "invertRegex": True or False, # If true, branches that do NOT match the git_ref will trigger a build. |
| 1157 | }, |
| 1158 | "name": "A String", # Name of the repository. For example: The name for |
| 1159 | # https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". |
| 1160 | "owner": "A String", # Owner of the repository. For example: The owner for |
| 1161 | # https://github.com/googlecloudplatform/cloud-builders is |
| 1162 | # "googlecloudplatform". |
| 1163 | "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags. |
| 1164 | "branch": "A String", # Regexes matching branches to build. |
| 1165 | # |
| 1166 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1167 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1168 | "invertRegex": True or False, # When true, only trigger a build if the revision regex does NOT match the |
| 1169 | # git_ref regex. |
| 1170 | "tag": "A String", # Regexes matching tags to build. |
| 1171 | # |
| 1172 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1173 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1174 | }, |
| 1175 | }, |
| 1176 | "createTime": "A String", # Output only. Time when the trigger was created. |
| 1177 | "includedFiles": [ # If any of the files altered in the commit pass the ignored_files |
| 1178 | # filter and included_files is empty, then as far as this filter is |
| 1179 | # concerned, we should trigger the build. |
| 1180 | # |
| 1181 | # If any of the files altered in the commit pass the ignored_files |
| 1182 | # filter and included_files is not empty, then we make sure that at |
| 1183 | # least one of those files matches a included_files glob. If not, |
| 1184 | # then we do not trigger a build. |
| 1185 | "A String", |
| 1186 | ], |
| 1187 | "description": "A String", # Human-readable description of this trigger. |
| 1188 | }</pre> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1189 | </div> |
| 1190 | |
| 1191 | <div class="method"> |
| 1192 | <code class="details" id="delete">delete(projectId, triggerId, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1193 | <pre>Deletes a `BuildTrigger` by its project ID and trigger ID. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1194 | |
| 1195 | This API is experimental. |
| 1196 | |
| 1197 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1198 | projectId: string, Required. ID of the project that owns the trigger. (required) |
| 1199 | triggerId: string, Required. ID of the `BuildTrigger` to delete. (required) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1200 | x__xgafv: string, V1 error format. |
| 1201 | Allowed values |
| 1202 | 1 - v1 error format |
| 1203 | 2 - v2 error format |
| 1204 | |
| 1205 | Returns: |
| 1206 | An object of the form: |
| 1207 | |
| 1208 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 1209 | # empty messages in your APIs. A typical example is to use it as the request |
| 1210 | # or the response type of an API method. For instance: |
| 1211 | # |
| 1212 | # service Foo { |
| 1213 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 1214 | # } |
| 1215 | # |
| 1216 | # The JSON representation for `Empty` is empty JSON object `{}`. |
| 1217 | }</pre> |
| 1218 | </div> |
| 1219 | |
| 1220 | <div class="method"> |
| 1221 | <code class="details" id="get">get(projectId, triggerId, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1222 | <pre>Returns information about a `BuildTrigger`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1223 | |
| 1224 | This API is experimental. |
| 1225 | |
| 1226 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1227 | projectId: string, Required. ID of the project that owns the trigger. (required) |
| 1228 | triggerId: string, Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. (required) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1229 | x__xgafv: string, V1 error format. |
| 1230 | Allowed values |
| 1231 | 1 - v1 error format |
| 1232 | 2 - v2 error format |
| 1233 | |
| 1234 | Returns: |
| 1235 | An object of the form: |
| 1236 | |
| 1237 | { # Configuration for an automated build in response to source repository |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1238 | # changes. |
| 1239 | "substitutions": { # Substitutions for Build resource. The keys must match the following |
| 1240 | # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the |
| 1241 | # keys in bindings. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1242 | "a_key": "A String", |
| 1243 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1244 | "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1245 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1246 | # Branch and tag names in trigger templates are interpreted as regular |
| 1247 | # expressions. Any branch or tag change that matches that regular expression |
| 1248 | # will trigger a build. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1249 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1250 | # Mutually exclusive with `github`. |
| 1251 | "tagName": "A String", # Regex matching tags to build. |
| 1252 | # |
| 1253 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1254 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1255 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 1256 | # |
| 1257 | # This must be a relative path. If a step's `dir` is specified and is an |
| 1258 | # absolute path, this value is ignored for that step's execution. |
| 1259 | "substitutions": { # Substitutions to use in a triggered build. |
| 1260 | # Should only be used with RunBuildTrigger |
| 1261 | "a_key": "A String", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1262 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1263 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 1264 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1265 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 1266 | # regex. |
| 1267 | "branchName": "A String", # Regex matching branches to build. |
| 1268 | # |
| 1269 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1270 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1271 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 1272 | # project ID requesting the build is assumed. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1273 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1274 | "id": "A String", # Output only. Unique identifier of the trigger. |
| 1275 | "build": { # A build resource in the Cloud Build API. # Contents of the build template. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1276 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1277 | # At a high level, a `Build` describes where to find source code, how to build |
| 1278 | # it (for example, the builder image to run on the source), and where to store |
| 1279 | # the built artifacts. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1280 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1281 | # Fields can include the following variables, which will be expanded when the |
| 1282 | # build is created: |
| 1283 | # |
| 1284 | # - $PROJECT_ID: the project ID of the build. |
| 1285 | # - $BUILD_ID: the autogenerated ID of the build. |
| 1286 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 1287 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 1288 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 1289 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 1290 | # resolved from the specified branch or tag. |
| 1291 | # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. |
| 1292 | "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer |
| 1293 | # than this value, the build will expire and the build status will be |
| 1294 | # `EXPIRED`. |
| 1295 | # |
| 1296 | # The TTL starts ticking from create_time. |
| 1297 | "statusDetail": "A String", # Output only. Customer-readable message about the current status. |
| 1298 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source. |
| 1299 | # some source was used for this build. |
| 1300 | "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any |
| 1301 | # revisions resolved. |
| 1302 | "tagName": "A String", # Regex matching tags to build. |
| 1303 | # |
| 1304 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1305 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1306 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 1307 | # |
| 1308 | # This must be a relative path. If a step's `dir` is specified and is an |
| 1309 | # absolute path, this value is ignored for that step's execution. |
| 1310 | "substitutions": { # Substitutions to use in a triggered build. |
| 1311 | # Should only be used with RunBuildTrigger |
| 1312 | "a_key": "A String", |
| 1313 | }, |
| 1314 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 1315 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1316 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 1317 | # regex. |
| 1318 | "branchName": "A String", # Regex matching branches to build. |
| 1319 | # |
| 1320 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1321 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1322 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 1323 | # project ID requesting the build is assumed. |
| 1324 | }, |
| 1325 | "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 |
| 1326 | # generations resolved. |
| 1327 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1328 | # omitted, the latest generation will be used. |
| 1329 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 1330 | # [Bucket Name |
| 1331 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1332 | "object": "A String", # Google Cloud Storage object containing the source. |
| 1333 | # |
| 1334 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 1335 | # build. |
| 1336 | }, |
| 1337 | "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that |
| 1338 | # the original source integrity was maintained in the build. Note that |
| 1339 | # `FileHashes` will only be populated if `BuildOptions` has requested a |
| 1340 | # `SourceProvenanceHash`. |
| 1341 | # |
| 1342 | # The keys to this map are file paths used as build source and the values |
| 1343 | # contain the hash values for those files. |
| 1344 | # |
| 1345 | # If the build source came in a single package such as a gzipped tarfile |
| 1346 | # (`.tar.gz`), the `FileHash` will be for the single path to that file. |
| 1347 | "a_key": { # Container message for hashes of byte content of files, used in |
| 1348 | # SourceProvenance messages to verify integrity of source input to the build. |
| 1349 | "fileHash": [ # Collection of file hashes. |
| 1350 | { # Container message for hash values. |
| 1351 | "value": "A String", # The hash value. |
| 1352 | "type": "A String", # The type of hash that was performed. |
| 1353 | }, |
| 1354 | ], |
| 1355 | }, |
| 1356 | }, |
| 1357 | }, |
| 1358 | "secrets": [ # Secrets to decrypt using Cloud Key Management Service. |
| 1359 | { # Pairs a set of secret environment variables containing encrypted |
| 1360 | # values with the Cloud KMS key to use to decrypt the value. |
| 1361 | "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs. |
| 1362 | "secretEnv": { # Map of environment variable name to its encrypted value. |
| 1363 | # |
| 1364 | # Secret environment variables must be unique across all of a build's |
| 1365 | # secrets, and must be used by at least one build step. Values can be at most |
| 1366 | # 64 KB in size. There can be at most 100 secret values across all of a |
| 1367 | # build's secrets. |
| 1368 | "a_key": "A String", |
| 1369 | }, |
| 1370 | }, |
| 1371 | ], |
| 1372 | "results": { # Artifacts created by the build pipeline. # Output only. Results of the build. |
| 1373 | "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded. |
| 1374 | "buildStepImages": [ # List of build step digests, in the order corresponding to build step |
| 1375 | # indices. |
| 1376 | "A String", |
| 1377 | ], |
| 1378 | "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts. |
| 1379 | "startTime": "A String", # Start of time span. |
| 1380 | "endTime": "A String", # End of time span. |
| 1381 | }, |
| 1382 | "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded. |
| 1383 | "images": [ # Container images that were built as a part of the build. |
| 1384 | { # An image built by the pipeline. |
| 1385 | "digest": "A String", # Docker Registry 2.0 digest. |
| 1386 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 1387 | # presented to `docker push`. |
| 1388 | "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image. |
| 1389 | "startTime": "A String", # Start of time span. |
| 1390 | "endTime": "A String", # End of time span. |
| 1391 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1392 | }, |
| 1393 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1394 | "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order |
| 1395 | # corresponding to build step indices. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1396 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1397 | # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) |
| 1398 | # can produce this output by writing to `$BUILDER_OUTPUT/output`. |
| 1399 | # Only the first 4KB of data is stored. |
| 1400 | "A String", |
| 1401 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1402 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1403 | "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console. |
| 1404 | "timing": { # Output only. Stores timing information for phases of the build. Valid keys |
| 1405 | # are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1406 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1407 | # * BUILD: time to execute all build steps |
| 1408 | # * PUSH: time to push all specified images. |
| 1409 | # * FETCHSOURCE: time to fetch source. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1410 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1411 | # If the build does not specify source or images, |
| 1412 | # these keys will not be included. |
| 1413 | "a_key": { # Start and end times for a build execution phase. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1414 | "startTime": "A String", # Start of time span. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1415 | "endTime": "A String", # End of time span. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1416 | }, |
| 1417 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1418 | "finishTime": "A String", # Output only. Time at which execution of the build was finished. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1419 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1420 | # The difference between finish_time and start_time is the duration of the |
| 1421 | # build's execution. |
| 1422 | "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it |
| 1423 | # was triggered automatically. |
| 1424 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 1425 | # granularity. If this amount of time elapses, work on the build will cease |
| 1426 | # and the build status will be `TIMEOUT`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1427 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1428 | # `timeout` starts ticking from `startTime`. |
| 1429 | # |
| 1430 | # Default time is ten minutes. |
| 1431 | "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon |
| 1432 | # successful completion of all build steps. |
| 1433 | # successful completion of all build steps. |
| 1434 | "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful |
| 1435 | # completion of all build steps. |
| 1436 | # |
| 1437 | # Files in the workspace matching specified paths globs will be uploaded to |
| 1438 | # the specified Cloud Storage location using the builder service account's |
| 1439 | # credentials. |
| 1440 | # |
| 1441 | # The location and generation of the uploaded objects will be stored in the |
| 1442 | # Build resource's results field. |
| 1443 | # |
| 1444 | # If any objects fail to be pushed, the build is marked FAILURE. |
| 1445 | # completion of all build steps. |
| 1446 | "location": "A String", # Cloud Storage bucket and optional object path, in the form |
| 1447 | # "gs://bucket/path/to/somewhere/". (see [Bucket Name |
| 1448 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1449 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1450 | # Files in the workspace matching any path pattern will be uploaded to |
| 1451 | # Cloud Storage with this location as a prefix. |
| 1452 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects. |
| 1453 | "startTime": "A String", # Start of time span. |
| 1454 | "endTime": "A String", # End of time span. |
| 1455 | }, |
| 1456 | "paths": [ # Path globs used to match files in the build's workspace. |
| 1457 | "A String", |
| 1458 | ], |
| 1459 | }, |
| 1460 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 1461 | # steps. |
| 1462 | # |
| 1463 | # The images will be pushed using the builder service account's credentials. |
| 1464 | # |
| 1465 | # The digests of the pushed images will be stored in the Build resource's |
| 1466 | # results field. |
| 1467 | # |
| 1468 | # If any of the images fail to be pushed, the build is marked FAILURE. |
| 1469 | "A String", |
| 1470 | ], |
| 1471 | }, |
| 1472 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 1473 | # [Bucket Name |
| 1474 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1475 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 1476 | "steps": [ # Required. The operations to be performed on the workspace. |
| 1477 | { # A step in the build pipeline. |
| 1478 | "args": [ # A list of arguments that will be presented to the step when it is started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1479 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1480 | # If the image used to run the step's container has an entrypoint, the `args` |
| 1481 | # are used as arguments to that entrypoint. If the image does not define |
| 1482 | # an entrypoint, the first element in args is used as the entrypoint, |
| 1483 | # and the remainder will be used as arguments. |
| 1484 | "A String", |
| 1485 | ], |
| 1486 | "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint. |
| 1487 | # If unset, the image's default entrypoint is used. |
| 1488 | "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key |
| 1489 | # Management Service crypto key. These values must be specified in the |
| 1490 | # build's `Secret`. |
| 1491 | "A String", |
| 1492 | ], |
| 1493 | "status": "A String", # Output only. Status of the build step. At this time, build step status is |
| 1494 | # only updated on build completion; step status is not updated in real-time |
| 1495 | # as the build progresses. |
| 1496 | "volumes": [ # List of volumes to mount into the build step. |
| 1497 | # |
| 1498 | # Each volume is created as an empty volume prior to execution of the |
| 1499 | # build step. Upon completion of the build, volumes and their contents are |
| 1500 | # discarded. |
| 1501 | # |
| 1502 | # Using a named volume in only one step is not valid as it is indicative |
| 1503 | # of a build request with an incorrect configuration. |
| 1504 | { # Volume describes a Docker container volume which is mounted into build steps |
| 1505 | # in order to persist files across build step execution. |
| 1506 | "path": "A String", # Path at which to mount the volume. |
| 1507 | # |
| 1508 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 1509 | # same build step or with certain reserved volume paths. |
| 1510 | "name": "A String", # Name of the volume to mount. |
| 1511 | # |
| 1512 | # Volume names must be unique per build step and must be valid names for |
| 1513 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 1514 | }, |
| 1515 | ], |
| 1516 | "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no |
| 1517 | # time limit and will be allowed to continue to run until either it completes |
| 1518 | # or the build itself times out. |
| 1519 | "dir": "A String", # Working directory to use when running this step's container. |
| 1520 | # |
| 1521 | # If this value is a relative path, it is relative to the build's working |
| 1522 | # directory. If this value is absolute, it may be outside the build's working |
| 1523 | # directory, in which case the contents of the path may not be persisted |
| 1524 | # across build step executions, unless a `volume` for that path is specified. |
| 1525 | # |
| 1526 | # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, |
| 1527 | # which specifies an absolute path, the `RepoSource` `dir` is ignored for |
| 1528 | # the step's execution. |
| 1529 | "id": "A String", # Unique identifier for this build step, used in `wait_for` to |
| 1530 | # reference this build step as a dependency. |
| 1531 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 1532 | # |
| 1533 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 1534 | # being given the value "VALUE". |
| 1535 | "A String", |
| 1536 | ], |
| 1537 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 1538 | # This build step will not start until all the build steps in `wait_for` |
| 1539 | # have completed successfully. If `wait_for` is empty, this build step will |
| 1540 | # start when all previous build steps in the `Build.Steps` list have |
| 1541 | # completed successfully. |
| 1542 | "A String", |
| 1543 | ], |
| 1544 | "name": "A String", # Required. The name of the container image that will run this particular |
| 1545 | # build step. |
| 1546 | # |
| 1547 | # If the image is available in the host's Docker daemon's cache, it |
| 1548 | # will be run directly. If not, the host will attempt to pull the image |
| 1549 | # first, using the builder service account's credentials if necessary. |
| 1550 | # |
| 1551 | # The Docker daemon's cache will already have the latest versions of all of |
| 1552 | # the officially supported build steps |
| 1553 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 1554 | # The Docker daemon will also have cached many of the layers for some popular |
| 1555 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 1556 | # attempt to use them. |
| 1557 | # |
| 1558 | # If you built an image in a previous build step, it will be stored in the |
| 1559 | # host's Docker daemon's cache and is available to use as the name for a |
| 1560 | # later build step. |
| 1561 | "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's |
| 1562 | # builder image only. |
| 1563 | "startTime": "A String", # Start of time span. |
| 1564 | "endTime": "A String", # End of time span. |
| 1565 | }, |
| 1566 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step. |
| 1567 | "startTime": "A String", # Start of time span. |
| 1568 | "endTime": "A String", # End of time span. |
| 1569 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1570 | }, |
| 1571 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1572 | "id": "A String", # Output only. Unique identifier of the build. |
| 1573 | "status": "A String", # Output only. Status of the build. |
| 1574 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 1575 | # steps. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1576 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1577 | # The images are pushed using the builder service account's credentials. |
| 1578 | # |
| 1579 | # The digests of the pushed images will be stored in the `Build` resource's |
| 1580 | # results field. |
| 1581 | # |
| 1582 | # If any of the images fail to be pushed, the build status is marked |
| 1583 | # `FAILURE`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1584 | "A String", |
| 1585 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1586 | "projectId": "A String", # Output only. ID of the project. |
| 1587 | "source": { # Location of the source in a supported storage service. # The location of the source files to build. |
| 1588 | "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. |
| 1589 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1590 | # omitted, the latest generation will be used. |
| 1591 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 1592 | # [Bucket Name |
| 1593 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1594 | "object": "A String", # Google Cloud Storage object containing the source. |
| 1595 | # |
| 1596 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 1597 | # build. |
| 1598 | }, |
| 1599 | "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source |
| 1600 | # Repository. |
| 1601 | "tagName": "A String", # Regex matching tags to build. |
| 1602 | # |
| 1603 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1604 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1605 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 1606 | # |
| 1607 | # This must be a relative path. If a step's `dir` is specified and is an |
| 1608 | # absolute path, this value is ignored for that step's execution. |
| 1609 | "substitutions": { # Substitutions to use in a triggered build. |
| 1610 | # Should only be used with RunBuildTrigger |
| 1611 | "a_key": "A String", |
| 1612 | }, |
| 1613 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 1614 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1615 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 1616 | # regex. |
| 1617 | "branchName": "A String", # Regex matching branches to build. |
| 1618 | # |
| 1619 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1620 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1621 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 1622 | # project ID requesting the build is assumed. |
| 1623 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1624 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1625 | "tags": [ # Tags for annotation of a `Build`. These are not docker tags. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1626 | "A String", |
| 1627 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1628 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 1629 | "volumes": [ # Global list of volumes to mount for ALL build steps |
| 1630 | # |
| 1631 | # Each volume is created as an empty volume prior to starting the build |
| 1632 | # process. Upon completion of the build, volumes and their contents are |
| 1633 | # discarded. Global volume names and paths cannot conflict with the volumes |
| 1634 | # defined a build step. |
| 1635 | # |
| 1636 | # Using a global volume in a build with only one step is not valid as |
| 1637 | # it is indicative of a build request with an incorrect configuration. |
| 1638 | { # Volume describes a Docker container volume which is mounted into build steps |
| 1639 | # in order to persist files across build step execution. |
| 1640 | "path": "A String", # Path at which to mount the volume. |
| 1641 | # |
| 1642 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 1643 | # same build step or with certain reserved volume paths. |
| 1644 | "name": "A String", # Name of the volume to mount. |
| 1645 | # |
| 1646 | # Volume names must be unique per build step and must be valid names for |
| 1647 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 1648 | }, |
| 1649 | ], |
| 1650 | "env": [ # A list of global environment variable definitions that will exist for all |
| 1651 | # build steps in this build. If a variable is defined in both globally and in |
| 1652 | # a build step, the variable will use the build step value. |
| 1653 | # |
| 1654 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 1655 | # being given the value "VALUE". |
| 1656 | "A String", |
| 1657 | ], |
| 1658 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 1659 | "A String", |
| 1660 | ], |
| 1661 | "machineType": "A String", # Compute Engine machine type on which to run the build. |
| 1662 | "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud |
| 1663 | # Storage. |
| 1664 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 1665 | "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution |
| 1666 | # checks. |
| 1667 | # |
| 1668 | # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot |
| 1669 | # be overridden in the build configuration file. |
| 1670 | "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT* |
| 1671 | # "disk free"; some of the space will be used by the operating system and |
| 1672 | # build utilities. Also note that this is the minimum disk size that will be |
| 1673 | # allocated for the build -- the build may run with a larger disk than |
| 1674 | # requested. At present, the maximum disk size is 1000GB; builds that request |
| 1675 | # more than the maximum are rejected with an error. |
| 1676 | "workerPool": "A String", # Option to specify a `WorkerPool` for the build. |
| 1677 | # Format: projects/{project}/workerPools/{workerPool} |
| 1678 | # |
| 1679 | # This field is experimental. |
| 1680 | "logging": "A String", # Option to specify the logging mode, which determines if and where build |
| 1681 | # logs are stored. |
| 1682 | "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud |
| 1683 | # Key Management Service crypto key. These values must be specified in the |
| 1684 | # build's `Secret`. These variables will be available to all build steps |
| 1685 | # in this build. |
| 1686 | "A String", |
| 1687 | ], |
| 1688 | "dynamicSubstitutions": True or False, # Option to specify whether or not to apply bash style string |
| 1689 | # operations to the substitutions. |
| 1690 | # |
| 1691 | # NOTE: this is always enabled for triggered builds and cannot be |
| 1692 | # overridden in the build configuration file. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1693 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1694 | "substitutions": { # Substitutions data for `Build` resource. |
| 1695 | "a_key": "A String", |
| 1696 | }, |
| 1697 | "createTime": "A String", # Output only. Time at which the request to create the build was received. |
| 1698 | "startTime": "A String", # Output only. Time at which execution of the build was started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1699 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1700 | "ignoredFiles": [ # ignored_files and included_files are file glob matches using |
| 1701 | # https://golang.org/pkg/path/filepath/#Match extended with support for "**". |
| 1702 | # |
| 1703 | # If ignored_files and changed files are both empty, then they are |
| 1704 | # not used to determine whether or not to trigger a build. |
| 1705 | # |
| 1706 | # If ignored_files is not empty, then we ignore any files that match |
| 1707 | # any of the ignored_file globs. If the change has no files that are |
| 1708 | # outside of the ignored_files globs, then we do not trigger a build. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1709 | "A String", |
| 1710 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1711 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 1712 | # template. |
| 1713 | "disabled": True or False, # If true, the trigger will never automatically execute a build. |
| 1714 | "name": "A String", # User-assigned name of the trigger. Must be unique within the project. |
| 1715 | # Trigger names must meet the following requirements: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1716 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1717 | # + They must contain only alphanumeric characters and dashes. |
| 1718 | # + They can be 1-64 characters long. |
| 1719 | # + They must begin and end with an alphanumeric character. |
| 1720 | "tags": [ # Tags for annotation of a `BuildTrigger` |
| 1721 | "A String", |
| 1722 | ], |
| 1723 | "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates |
| 1724 | # a build whenever a GitHub event is received. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1725 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1726 | # Mutually exclusive with `trigger_template`. |
| 1727 | # build whenever a GitHub event is received. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1728 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1729 | # This message is experimental. |
| 1730 | "installationId": "A String", # The installationID that emits the GitHub event. |
| 1731 | "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests. |
| 1732 | # Requests. |
| 1733 | "branch": "A String", # Regex of branches to match. |
| 1734 | # |
| 1735 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1736 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1737 | "commentControl": "A String", # Configure builds to run whether a repository owner or collaborator need to |
| 1738 | # comment `/gcbrun`. |
| 1739 | "invertRegex": True or False, # If true, branches that do NOT match the git_ref will trigger a build. |
| 1740 | }, |
| 1741 | "name": "A String", # Name of the repository. For example: The name for |
| 1742 | # https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". |
| 1743 | "owner": "A String", # Owner of the repository. For example: The owner for |
| 1744 | # https://github.com/googlecloudplatform/cloud-builders is |
| 1745 | # "googlecloudplatform". |
| 1746 | "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags. |
| 1747 | "branch": "A String", # Regexes matching branches to build. |
| 1748 | # |
| 1749 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1750 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1751 | "invertRegex": True or False, # When true, only trigger a build if the revision regex does NOT match the |
| 1752 | # git_ref regex. |
| 1753 | "tag": "A String", # Regexes matching tags to build. |
| 1754 | # |
| 1755 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1756 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1757 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1758 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1759 | "createTime": "A String", # Output only. Time when the trigger was created. |
| 1760 | "includedFiles": [ # If any of the files altered in the commit pass the ignored_files |
| 1761 | # filter and included_files is empty, then as far as this filter is |
| 1762 | # concerned, we should trigger the build. |
| 1763 | # |
| 1764 | # If any of the files altered in the commit pass the ignored_files |
| 1765 | # filter and included_files is not empty, then we make sure that at |
| 1766 | # least one of those files matches a included_files glob. If not, |
| 1767 | # then we do not trigger a build. |
| 1768 | "A String", |
| 1769 | ], |
| 1770 | "description": "A String", # Human-readable description of this trigger. |
| 1771 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1772 | </div> |
| 1773 | |
| 1774 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1775 | <code class="details" id="list">list(projectId, pageToken=None, pageSize=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1776 | <pre>Lists existing `BuildTrigger`s. |
| 1777 | |
| 1778 | This API is experimental. |
| 1779 | |
| 1780 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1781 | projectId: string, Required. ID of the project for which to list BuildTriggers. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1782 | pageToken: string, Token to provide to skip to a particular spot in the list. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1783 | pageSize: integer, Number of results to return in the list. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1784 | x__xgafv: string, V1 error format. |
| 1785 | Allowed values |
| 1786 | 1 - v1 error format |
| 1787 | 2 - v2 error format |
| 1788 | |
| 1789 | Returns: |
| 1790 | An object of the form: |
| 1791 | |
| 1792 | { # Response containing existing `BuildTriggers`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1793 | "triggers": [ # `BuildTriggers` for the project, sorted by `create_time` descending. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1794 | { # Configuration for an automated build in response to source repository |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1795 | # changes. |
| 1796 | "substitutions": { # Substitutions for Build resource. The keys must match the following |
| 1797 | # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the |
| 1798 | # keys in bindings. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1799 | "a_key": "A String", |
| 1800 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1801 | "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1802 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1803 | # Branch and tag names in trigger templates are interpreted as regular |
| 1804 | # expressions. Any branch or tag change that matches that regular expression |
| 1805 | # will trigger a build. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1806 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1807 | # Mutually exclusive with `github`. |
| 1808 | "tagName": "A String", # Regex matching tags to build. |
| 1809 | # |
| 1810 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1811 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1812 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 1813 | # |
| 1814 | # This must be a relative path. If a step's `dir` is specified and is an |
| 1815 | # absolute path, this value is ignored for that step's execution. |
| 1816 | "substitutions": { # Substitutions to use in a triggered build. |
| 1817 | # Should only be used with RunBuildTrigger |
| 1818 | "a_key": "A String", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1819 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1820 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 1821 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1822 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 1823 | # regex. |
| 1824 | "branchName": "A String", # Regex matching branches to build. |
| 1825 | # |
| 1826 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1827 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1828 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 1829 | # project ID requesting the build is assumed. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1830 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1831 | "id": "A String", # Output only. Unique identifier of the trigger. |
| 1832 | "build": { # A build resource in the Cloud Build API. # Contents of the build template. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1833 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1834 | # At a high level, a `Build` describes where to find source code, how to build |
| 1835 | # it (for example, the builder image to run on the source), and where to store |
| 1836 | # the built artifacts. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1837 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1838 | # Fields can include the following variables, which will be expanded when the |
| 1839 | # build is created: |
| 1840 | # |
| 1841 | # - $PROJECT_ID: the project ID of the build. |
| 1842 | # - $BUILD_ID: the autogenerated ID of the build. |
| 1843 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 1844 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 1845 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 1846 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 1847 | # resolved from the specified branch or tag. |
| 1848 | # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. |
| 1849 | "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer |
| 1850 | # than this value, the build will expire and the build status will be |
| 1851 | # `EXPIRED`. |
| 1852 | # |
| 1853 | # The TTL starts ticking from create_time. |
| 1854 | "statusDetail": "A String", # Output only. Customer-readable message about the current status. |
| 1855 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source. |
| 1856 | # some source was used for this build. |
| 1857 | "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any |
| 1858 | # revisions resolved. |
| 1859 | "tagName": "A String", # Regex matching tags to build. |
| 1860 | # |
| 1861 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1862 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1863 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 1864 | # |
| 1865 | # This must be a relative path. If a step's `dir` is specified and is an |
| 1866 | # absolute path, this value is ignored for that step's execution. |
| 1867 | "substitutions": { # Substitutions to use in a triggered build. |
| 1868 | # Should only be used with RunBuildTrigger |
| 1869 | "a_key": "A String", |
| 1870 | }, |
| 1871 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 1872 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1873 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 1874 | # regex. |
| 1875 | "branchName": "A String", # Regex matching branches to build. |
| 1876 | # |
| 1877 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 1878 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 1879 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 1880 | # project ID requesting the build is assumed. |
| 1881 | }, |
| 1882 | "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 |
| 1883 | # generations resolved. |
| 1884 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1885 | # omitted, the latest generation will be used. |
| 1886 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 1887 | # [Bucket Name |
| 1888 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1889 | "object": "A String", # Google Cloud Storage object containing the source. |
| 1890 | # |
| 1891 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 1892 | # build. |
| 1893 | }, |
| 1894 | "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that |
| 1895 | # the original source integrity was maintained in the build. Note that |
| 1896 | # `FileHashes` will only be populated if `BuildOptions` has requested a |
| 1897 | # `SourceProvenanceHash`. |
| 1898 | # |
| 1899 | # The keys to this map are file paths used as build source and the values |
| 1900 | # contain the hash values for those files. |
| 1901 | # |
| 1902 | # If the build source came in a single package such as a gzipped tarfile |
| 1903 | # (`.tar.gz`), the `FileHash` will be for the single path to that file. |
| 1904 | "a_key": { # Container message for hashes of byte content of files, used in |
| 1905 | # SourceProvenance messages to verify integrity of source input to the build. |
| 1906 | "fileHash": [ # Collection of file hashes. |
| 1907 | { # Container message for hash values. |
| 1908 | "value": "A String", # The hash value. |
| 1909 | "type": "A String", # The type of hash that was performed. |
| 1910 | }, |
| 1911 | ], |
| 1912 | }, |
| 1913 | }, |
| 1914 | }, |
| 1915 | "secrets": [ # Secrets to decrypt using Cloud Key Management Service. |
| 1916 | { # Pairs a set of secret environment variables containing encrypted |
| 1917 | # values with the Cloud KMS key to use to decrypt the value. |
| 1918 | "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs. |
| 1919 | "secretEnv": { # Map of environment variable name to its encrypted value. |
| 1920 | # |
| 1921 | # Secret environment variables must be unique across all of a build's |
| 1922 | # secrets, and must be used by at least one build step. Values can be at most |
| 1923 | # 64 KB in size. There can be at most 100 secret values across all of a |
| 1924 | # build's secrets. |
| 1925 | "a_key": "A String", |
| 1926 | }, |
| 1927 | }, |
| 1928 | ], |
| 1929 | "results": { # Artifacts created by the build pipeline. # Output only. Results of the build. |
| 1930 | "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded. |
| 1931 | "buildStepImages": [ # List of build step digests, in the order corresponding to build step |
| 1932 | # indices. |
| 1933 | "A String", |
| 1934 | ], |
| 1935 | "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts. |
| 1936 | "startTime": "A String", # Start of time span. |
| 1937 | "endTime": "A String", # End of time span. |
| 1938 | }, |
| 1939 | "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded. |
| 1940 | "images": [ # Container images that were built as a part of the build. |
| 1941 | { # An image built by the pipeline. |
| 1942 | "digest": "A String", # Docker Registry 2.0 digest. |
| 1943 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 1944 | # presented to `docker push`. |
| 1945 | "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image. |
| 1946 | "startTime": "A String", # Start of time span. |
| 1947 | "endTime": "A String", # End of time span. |
| 1948 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1949 | }, |
| 1950 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1951 | "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order |
| 1952 | # corresponding to build step indices. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1953 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1954 | # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) |
| 1955 | # can produce this output by writing to `$BUILDER_OUTPUT/output`. |
| 1956 | # Only the first 4KB of data is stored. |
| 1957 | "A String", |
| 1958 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1959 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1960 | "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console. |
| 1961 | "timing": { # Output only. Stores timing information for phases of the build. Valid keys |
| 1962 | # are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1963 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1964 | # * BUILD: time to execute all build steps |
| 1965 | # * PUSH: time to push all specified images. |
| 1966 | # * FETCHSOURCE: time to fetch source. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1967 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1968 | # If the build does not specify source or images, |
| 1969 | # these keys will not be included. |
| 1970 | "a_key": { # Start and end times for a build execution phase. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1971 | "startTime": "A String", # Start of time span. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1972 | "endTime": "A String", # End of time span. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1973 | }, |
| 1974 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1975 | "finishTime": "A String", # Output only. Time at which execution of the build was finished. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1976 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1977 | # The difference between finish_time and start_time is the duration of the |
| 1978 | # build's execution. |
| 1979 | "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it |
| 1980 | # was triggered automatically. |
| 1981 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 1982 | # granularity. If this amount of time elapses, work on the build will cease |
| 1983 | # and the build status will be `TIMEOUT`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1984 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1985 | # `timeout` starts ticking from `startTime`. |
| 1986 | # |
| 1987 | # Default time is ten minutes. |
| 1988 | "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon |
| 1989 | # successful completion of all build steps. |
| 1990 | # successful completion of all build steps. |
| 1991 | "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful |
| 1992 | # completion of all build steps. |
| 1993 | # |
| 1994 | # Files in the workspace matching specified paths globs will be uploaded to |
| 1995 | # the specified Cloud Storage location using the builder service account's |
| 1996 | # credentials. |
| 1997 | # |
| 1998 | # The location and generation of the uploaded objects will be stored in the |
| 1999 | # Build resource's results field. |
| 2000 | # |
| 2001 | # If any objects fail to be pushed, the build is marked FAILURE. |
| 2002 | # completion of all build steps. |
| 2003 | "location": "A String", # Cloud Storage bucket and optional object path, in the form |
| 2004 | # "gs://bucket/path/to/somewhere/". (see [Bucket Name |
| 2005 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2006 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2007 | # Files in the workspace matching any path pattern will be uploaded to |
| 2008 | # Cloud Storage with this location as a prefix. |
| 2009 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects. |
| 2010 | "startTime": "A String", # Start of time span. |
| 2011 | "endTime": "A String", # End of time span. |
| 2012 | }, |
| 2013 | "paths": [ # Path globs used to match files in the build's workspace. |
| 2014 | "A String", |
| 2015 | ], |
| 2016 | }, |
| 2017 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 2018 | # steps. |
| 2019 | # |
| 2020 | # The images will be pushed using the builder service account's credentials. |
| 2021 | # |
| 2022 | # The digests of the pushed images will be stored in the Build resource's |
| 2023 | # results field. |
| 2024 | # |
| 2025 | # If any of the images fail to be pushed, the build is marked FAILURE. |
| 2026 | "A String", |
| 2027 | ], |
| 2028 | }, |
| 2029 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 2030 | # [Bucket Name |
| 2031 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 2032 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 2033 | "steps": [ # Required. The operations to be performed on the workspace. |
| 2034 | { # A step in the build pipeline. |
| 2035 | "args": [ # A list of arguments that will be presented to the step when it is started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2036 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2037 | # If the image used to run the step's container has an entrypoint, the `args` |
| 2038 | # are used as arguments to that entrypoint. If the image does not define |
| 2039 | # an entrypoint, the first element in args is used as the entrypoint, |
| 2040 | # and the remainder will be used as arguments. |
| 2041 | "A String", |
| 2042 | ], |
| 2043 | "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint. |
| 2044 | # If unset, the image's default entrypoint is used. |
| 2045 | "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key |
| 2046 | # Management Service crypto key. These values must be specified in the |
| 2047 | # build's `Secret`. |
| 2048 | "A String", |
| 2049 | ], |
| 2050 | "status": "A String", # Output only. Status of the build step. At this time, build step status is |
| 2051 | # only updated on build completion; step status is not updated in real-time |
| 2052 | # as the build progresses. |
| 2053 | "volumes": [ # List of volumes to mount into the build step. |
| 2054 | # |
| 2055 | # Each volume is created as an empty volume prior to execution of the |
| 2056 | # build step. Upon completion of the build, volumes and their contents are |
| 2057 | # discarded. |
| 2058 | # |
| 2059 | # Using a named volume in only one step is not valid as it is indicative |
| 2060 | # of a build request with an incorrect configuration. |
| 2061 | { # Volume describes a Docker container volume which is mounted into build steps |
| 2062 | # in order to persist files across build step execution. |
| 2063 | "path": "A String", # Path at which to mount the volume. |
| 2064 | # |
| 2065 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 2066 | # same build step or with certain reserved volume paths. |
| 2067 | "name": "A String", # Name of the volume to mount. |
| 2068 | # |
| 2069 | # Volume names must be unique per build step and must be valid names for |
| 2070 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 2071 | }, |
| 2072 | ], |
| 2073 | "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no |
| 2074 | # time limit and will be allowed to continue to run until either it completes |
| 2075 | # or the build itself times out. |
| 2076 | "dir": "A String", # Working directory to use when running this step's container. |
| 2077 | # |
| 2078 | # If this value is a relative path, it is relative to the build's working |
| 2079 | # directory. If this value is absolute, it may be outside the build's working |
| 2080 | # directory, in which case the contents of the path may not be persisted |
| 2081 | # across build step executions, unless a `volume` for that path is specified. |
| 2082 | # |
| 2083 | # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, |
| 2084 | # which specifies an absolute path, the `RepoSource` `dir` is ignored for |
| 2085 | # the step's execution. |
| 2086 | "id": "A String", # Unique identifier for this build step, used in `wait_for` to |
| 2087 | # reference this build step as a dependency. |
| 2088 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 2089 | # |
| 2090 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 2091 | # being given the value "VALUE". |
| 2092 | "A String", |
| 2093 | ], |
| 2094 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 2095 | # This build step will not start until all the build steps in `wait_for` |
| 2096 | # have completed successfully. If `wait_for` is empty, this build step will |
| 2097 | # start when all previous build steps in the `Build.Steps` list have |
| 2098 | # completed successfully. |
| 2099 | "A String", |
| 2100 | ], |
| 2101 | "name": "A String", # Required. The name of the container image that will run this particular |
| 2102 | # build step. |
| 2103 | # |
| 2104 | # If the image is available in the host's Docker daemon's cache, it |
| 2105 | # will be run directly. If not, the host will attempt to pull the image |
| 2106 | # first, using the builder service account's credentials if necessary. |
| 2107 | # |
| 2108 | # The Docker daemon's cache will already have the latest versions of all of |
| 2109 | # the officially supported build steps |
| 2110 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 2111 | # The Docker daemon will also have cached many of the layers for some popular |
| 2112 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 2113 | # attempt to use them. |
| 2114 | # |
| 2115 | # If you built an image in a previous build step, it will be stored in the |
| 2116 | # host's Docker daemon's cache and is available to use as the name for a |
| 2117 | # later build step. |
| 2118 | "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's |
| 2119 | # builder image only. |
| 2120 | "startTime": "A String", # Start of time span. |
| 2121 | "endTime": "A String", # End of time span. |
| 2122 | }, |
| 2123 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step. |
| 2124 | "startTime": "A String", # Start of time span. |
| 2125 | "endTime": "A String", # End of time span. |
| 2126 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2127 | }, |
| 2128 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2129 | "id": "A String", # Output only. Unique identifier of the build. |
| 2130 | "status": "A String", # Output only. Status of the build. |
| 2131 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 2132 | # steps. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2133 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2134 | # The images are pushed using the builder service account's credentials. |
| 2135 | # |
| 2136 | # The digests of the pushed images will be stored in the `Build` resource's |
| 2137 | # results field. |
| 2138 | # |
| 2139 | # If any of the images fail to be pushed, the build status is marked |
| 2140 | # `FAILURE`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2141 | "A String", |
| 2142 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2143 | "projectId": "A String", # Output only. ID of the project. |
| 2144 | "source": { # Location of the source in a supported storage service. # The location of the source files to build. |
| 2145 | "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. |
| 2146 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 2147 | # omitted, the latest generation will be used. |
| 2148 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 2149 | # [Bucket Name |
| 2150 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 2151 | "object": "A String", # Google Cloud Storage object containing the source. |
| 2152 | # |
| 2153 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 2154 | # build. |
| 2155 | }, |
| 2156 | "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source |
| 2157 | # Repository. |
| 2158 | "tagName": "A String", # Regex matching tags to build. |
| 2159 | # |
| 2160 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2161 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2162 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 2163 | # |
| 2164 | # This must be a relative path. If a step's `dir` is specified and is an |
| 2165 | # absolute path, this value is ignored for that step's execution. |
| 2166 | "substitutions": { # Substitutions to use in a triggered build. |
| 2167 | # Should only be used with RunBuildTrigger |
| 2168 | "a_key": "A String", |
| 2169 | }, |
| 2170 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 2171 | "commitSha": "A String", # Explicit commit SHA to build. |
| 2172 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 2173 | # regex. |
| 2174 | "branchName": "A String", # Regex matching branches to build. |
| 2175 | # |
| 2176 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2177 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2178 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 2179 | # project ID requesting the build is assumed. |
| 2180 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2181 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2182 | "tags": [ # Tags for annotation of a `Build`. These are not docker tags. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2183 | "A String", |
| 2184 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2185 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 2186 | "volumes": [ # Global list of volumes to mount for ALL build steps |
| 2187 | # |
| 2188 | # Each volume is created as an empty volume prior to starting the build |
| 2189 | # process. Upon completion of the build, volumes and their contents are |
| 2190 | # discarded. Global volume names and paths cannot conflict with the volumes |
| 2191 | # defined a build step. |
| 2192 | # |
| 2193 | # Using a global volume in a build with only one step is not valid as |
| 2194 | # it is indicative of a build request with an incorrect configuration. |
| 2195 | { # Volume describes a Docker container volume which is mounted into build steps |
| 2196 | # in order to persist files across build step execution. |
| 2197 | "path": "A String", # Path at which to mount the volume. |
| 2198 | # |
| 2199 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 2200 | # same build step or with certain reserved volume paths. |
| 2201 | "name": "A String", # Name of the volume to mount. |
| 2202 | # |
| 2203 | # Volume names must be unique per build step and must be valid names for |
| 2204 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 2205 | }, |
| 2206 | ], |
| 2207 | "env": [ # A list of global environment variable definitions that will exist for all |
| 2208 | # build steps in this build. If a variable is defined in both globally and in |
| 2209 | # a build step, the variable will use the build step value. |
| 2210 | # |
| 2211 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 2212 | # being given the value "VALUE". |
| 2213 | "A String", |
| 2214 | ], |
| 2215 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 2216 | "A String", |
| 2217 | ], |
| 2218 | "machineType": "A String", # Compute Engine machine type on which to run the build. |
| 2219 | "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud |
| 2220 | # Storage. |
| 2221 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 2222 | "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution |
| 2223 | # checks. |
| 2224 | # |
| 2225 | # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot |
| 2226 | # be overridden in the build configuration file. |
| 2227 | "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT* |
| 2228 | # "disk free"; some of the space will be used by the operating system and |
| 2229 | # build utilities. Also note that this is the minimum disk size that will be |
| 2230 | # allocated for the build -- the build may run with a larger disk than |
| 2231 | # requested. At present, the maximum disk size is 1000GB; builds that request |
| 2232 | # more than the maximum are rejected with an error. |
| 2233 | "workerPool": "A String", # Option to specify a `WorkerPool` for the build. |
| 2234 | # Format: projects/{project}/workerPools/{workerPool} |
| 2235 | # |
| 2236 | # This field is experimental. |
| 2237 | "logging": "A String", # Option to specify the logging mode, which determines if and where build |
| 2238 | # logs are stored. |
| 2239 | "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud |
| 2240 | # Key Management Service crypto key. These values must be specified in the |
| 2241 | # build's `Secret`. These variables will be available to all build steps |
| 2242 | # in this build. |
| 2243 | "A String", |
| 2244 | ], |
| 2245 | "dynamicSubstitutions": True or False, # Option to specify whether or not to apply bash style string |
| 2246 | # operations to the substitutions. |
| 2247 | # |
| 2248 | # NOTE: this is always enabled for triggered builds and cannot be |
| 2249 | # overridden in the build configuration file. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2250 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2251 | "substitutions": { # Substitutions data for `Build` resource. |
| 2252 | "a_key": "A String", |
| 2253 | }, |
| 2254 | "createTime": "A String", # Output only. Time at which the request to create the build was received. |
| 2255 | "startTime": "A String", # Output only. Time at which execution of the build was started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2256 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2257 | "ignoredFiles": [ # ignored_files and included_files are file glob matches using |
| 2258 | # https://golang.org/pkg/path/filepath/#Match extended with support for "**". |
| 2259 | # |
| 2260 | # If ignored_files and changed files are both empty, then they are |
| 2261 | # not used to determine whether or not to trigger a build. |
| 2262 | # |
| 2263 | # If ignored_files is not empty, then we ignore any files that match |
| 2264 | # any of the ignored_file globs. If the change has no files that are |
| 2265 | # outside of the ignored_files globs, then we do not trigger a build. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2266 | "A String", |
| 2267 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2268 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 2269 | # template. |
| 2270 | "disabled": True or False, # If true, the trigger will never automatically execute a build. |
| 2271 | "name": "A String", # User-assigned name of the trigger. Must be unique within the project. |
| 2272 | # Trigger names must meet the following requirements: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2273 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2274 | # + They must contain only alphanumeric characters and dashes. |
| 2275 | # + They can be 1-64 characters long. |
| 2276 | # + They must begin and end with an alphanumeric character. |
| 2277 | "tags": [ # Tags for annotation of a `BuildTrigger` |
| 2278 | "A String", |
| 2279 | ], |
| 2280 | "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates |
| 2281 | # a build whenever a GitHub event is received. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2282 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2283 | # Mutually exclusive with `trigger_template`. |
| 2284 | # build whenever a GitHub event is received. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2285 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2286 | # This message is experimental. |
| 2287 | "installationId": "A String", # The installationID that emits the GitHub event. |
| 2288 | "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests. |
| 2289 | # Requests. |
| 2290 | "branch": "A String", # Regex of branches to match. |
| 2291 | # |
| 2292 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2293 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2294 | "commentControl": "A String", # Configure builds to run whether a repository owner or collaborator need to |
| 2295 | # comment `/gcbrun`. |
| 2296 | "invertRegex": True or False, # If true, branches that do NOT match the git_ref will trigger a build. |
| 2297 | }, |
| 2298 | "name": "A String", # Name of the repository. For example: The name for |
| 2299 | # https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". |
| 2300 | "owner": "A String", # Owner of the repository. For example: The owner for |
| 2301 | # https://github.com/googlecloudplatform/cloud-builders is |
| 2302 | # "googlecloudplatform". |
| 2303 | "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags. |
| 2304 | "branch": "A String", # Regexes matching branches to build. |
| 2305 | # |
| 2306 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2307 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2308 | "invertRegex": True or False, # When true, only trigger a build if the revision regex does NOT match the |
| 2309 | # git_ref regex. |
| 2310 | "tag": "A String", # Regexes matching tags to build. |
| 2311 | # |
| 2312 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2313 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2314 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2315 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2316 | "createTime": "A String", # Output only. Time when the trigger was created. |
| 2317 | "includedFiles": [ # If any of the files altered in the commit pass the ignored_files |
| 2318 | # filter and included_files is empty, then as far as this filter is |
| 2319 | # concerned, we should trigger the build. |
| 2320 | # |
| 2321 | # If any of the files altered in the commit pass the ignored_files |
| 2322 | # filter and included_files is not empty, then we make sure that at |
| 2323 | # least one of those files matches a included_files glob. If not, |
| 2324 | # then we do not trigger a build. |
| 2325 | "A String", |
| 2326 | ], |
| 2327 | "description": "A String", # Human-readable description of this trigger. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2328 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2329 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2330 | "nextPageToken": "A String", # Token to receive the next page of results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2331 | }</pre> |
| 2332 | </div> |
| 2333 | |
| 2334 | <div class="method"> |
| 2335 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 2336 | <pre>Retrieves the next page of results. |
| 2337 | |
| 2338 | Args: |
| 2339 | previous_request: The request for the previous page. (required) |
| 2340 | previous_response: The response from the request for the previous page. (required) |
| 2341 | |
| 2342 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2343 | A request object that you can call 'execute()' on to request the next |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2344 | page. Returns None if there are no more items in the collection. |
| 2345 | </pre> |
| 2346 | </div> |
| 2347 | |
| 2348 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2349 | <code class="details" id="patch">patch(projectId, triggerId, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2350 | <pre>Updates a `BuildTrigger` by its project ID and trigger ID. |
| 2351 | |
| 2352 | This API is experimental. |
| 2353 | |
| 2354 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2355 | projectId: string, Required. ID of the project that owns the trigger. (required) |
| 2356 | triggerId: string, Required. ID of the `BuildTrigger` to update. (required) |
| 2357 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2358 | The object takes the form of: |
| 2359 | |
| 2360 | { # Configuration for an automated build in response to source repository |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2361 | # changes. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2362 | "substitutions": { # Substitutions for Build resource. The keys must match the following |
| 2363 | # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the |
| 2364 | # keys in bindings. |
| 2365 | "a_key": "A String", |
| 2366 | }, |
| 2367 | "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. |
| 2368 | # |
| 2369 | # Branch and tag names in trigger templates are interpreted as regular |
| 2370 | # expressions. Any branch or tag change that matches that regular expression |
| 2371 | # will trigger a build. |
| 2372 | # |
| 2373 | # Mutually exclusive with `github`. |
| 2374 | "tagName": "A String", # Regex matching tags to build. |
| 2375 | # |
| 2376 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2377 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2378 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 2379 | # |
| 2380 | # This must be a relative path. If a step's `dir` is specified and is an |
| 2381 | # absolute path, this value is ignored for that step's execution. |
| 2382 | "substitutions": { # Substitutions to use in a triggered build. |
| 2383 | # Should only be used with RunBuildTrigger |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2384 | "a_key": "A String", |
| 2385 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2386 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 2387 | "commitSha": "A String", # Explicit commit SHA to build. |
| 2388 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 2389 | # regex. |
| 2390 | "branchName": "A String", # Regex matching branches to build. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2391 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2392 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2393 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2394 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 2395 | # project ID requesting the build is assumed. |
| 2396 | }, |
| 2397 | "id": "A String", # Output only. Unique identifier of the trigger. |
| 2398 | "build": { # A build resource in the Cloud Build API. # Contents of the build template. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2399 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2400 | # At a high level, a `Build` describes where to find source code, how to build |
| 2401 | # it (for example, the builder image to run on the source), and where to store |
| 2402 | # the built artifacts. |
| 2403 | # |
| 2404 | # Fields can include the following variables, which will be expanded when the |
| 2405 | # build is created: |
| 2406 | # |
| 2407 | # - $PROJECT_ID: the project ID of the build. |
| 2408 | # - $BUILD_ID: the autogenerated ID of the build. |
| 2409 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 2410 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 2411 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 2412 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 2413 | # resolved from the specified branch or tag. |
| 2414 | # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. |
| 2415 | "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer |
| 2416 | # than this value, the build will expire and the build status will be |
| 2417 | # `EXPIRED`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2418 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2419 | # The TTL starts ticking from create_time. |
| 2420 | "statusDetail": "A String", # Output only. Customer-readable message about the current status. |
| 2421 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source. |
| 2422 | # some source was used for this build. |
| 2423 | "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any |
| 2424 | # revisions resolved. |
| 2425 | "tagName": "A String", # Regex matching tags to build. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2426 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2427 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2428 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2429 | "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] | 2430 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2431 | # This must be a relative path. If a step's `dir` is specified and is an |
| 2432 | # absolute path, this value is ignored for that step's execution. |
| 2433 | "substitutions": { # Substitutions to use in a triggered build. |
| 2434 | # Should only be used with RunBuildTrigger |
| 2435 | "a_key": "A String", |
| 2436 | }, |
| 2437 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 2438 | "commitSha": "A String", # Explicit commit SHA to build. |
| 2439 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 2440 | # regex. |
| 2441 | "branchName": "A String", # Regex matching branches to build. |
| 2442 | # |
| 2443 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2444 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2445 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 2446 | # project ID requesting the build is assumed. |
| 2447 | }, |
| 2448 | "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 |
| 2449 | # generations resolved. |
| 2450 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 2451 | # omitted, the latest generation will be used. |
| 2452 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 2453 | # [Bucket Name |
| 2454 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 2455 | "object": "A String", # Google Cloud Storage object containing the source. |
| 2456 | # |
| 2457 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 2458 | # build. |
| 2459 | }, |
| 2460 | "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that |
| 2461 | # the original source integrity was maintained in the build. Note that |
| 2462 | # `FileHashes` will only be populated if `BuildOptions` has requested a |
| 2463 | # `SourceProvenanceHash`. |
| 2464 | # |
| 2465 | # The keys to this map are file paths used as build source and the values |
| 2466 | # contain the hash values for those files. |
| 2467 | # |
| 2468 | # If the build source came in a single package such as a gzipped tarfile |
| 2469 | # (`.tar.gz`), the `FileHash` will be for the single path to that file. |
| 2470 | "a_key": { # Container message for hashes of byte content of files, used in |
| 2471 | # SourceProvenance messages to verify integrity of source input to the build. |
| 2472 | "fileHash": [ # Collection of file hashes. |
| 2473 | { # Container message for hash values. |
| 2474 | "value": "A String", # The hash value. |
| 2475 | "type": "A String", # The type of hash that was performed. |
| 2476 | }, |
| 2477 | ], |
| 2478 | }, |
| 2479 | }, |
| 2480 | }, |
| 2481 | "secrets": [ # Secrets to decrypt using Cloud Key Management Service. |
| 2482 | { # Pairs a set of secret environment variables containing encrypted |
| 2483 | # values with the Cloud KMS key to use to decrypt the value. |
| 2484 | "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs. |
| 2485 | "secretEnv": { # Map of environment variable name to its encrypted value. |
| 2486 | # |
| 2487 | # Secret environment variables must be unique across all of a build's |
| 2488 | # secrets, and must be used by at least one build step. Values can be at most |
| 2489 | # 64 KB in size. There can be at most 100 secret values across all of a |
| 2490 | # build's secrets. |
| 2491 | "a_key": "A String", |
| 2492 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2493 | }, |
| 2494 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2495 | "results": { # Artifacts created by the build pipeline. # Output only. Results of the build. |
| 2496 | "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded. |
| 2497 | "buildStepImages": [ # List of build step digests, in the order corresponding to build step |
| 2498 | # indices. |
| 2499 | "A String", |
| 2500 | ], |
| 2501 | "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2502 | "startTime": "A String", # Start of time span. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2503 | "endTime": "A String", # End of time span. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2504 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2505 | "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded. |
| 2506 | "images": [ # Container images that were built as a part of the build. |
| 2507 | { # An image built by the pipeline. |
| 2508 | "digest": "A String", # Docker Registry 2.0 digest. |
| 2509 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 2510 | # presented to `docker push`. |
| 2511 | "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image. |
| 2512 | "startTime": "A String", # Start of time span. |
| 2513 | "endTime": "A String", # End of time span. |
| 2514 | }, |
| 2515 | }, |
| 2516 | ], |
| 2517 | "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order |
| 2518 | # corresponding to build step indices. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2519 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2520 | # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) |
| 2521 | # can produce this output by writing to `$BUILDER_OUTPUT/output`. |
| 2522 | # Only the first 4KB of data is stored. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2523 | "A String", |
| 2524 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2525 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2526 | "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console. |
| 2527 | "timing": { # Output only. Stores timing information for phases of the build. Valid keys |
| 2528 | # are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2529 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2530 | # * BUILD: time to execute all build steps |
| 2531 | # * PUSH: time to push all specified images. |
| 2532 | # * FETCHSOURCE: time to fetch source. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2533 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2534 | # If the build does not specify source or images, |
| 2535 | # these keys will not be included. |
| 2536 | "a_key": { # Start and end times for a build execution phase. |
| 2537 | "startTime": "A String", # Start of time span. |
| 2538 | "endTime": "A String", # End of time span. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2539 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2540 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2541 | "finishTime": "A String", # Output only. Time at which execution of the build was finished. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2542 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2543 | # The difference between finish_time and start_time is the duration of the |
| 2544 | # build's execution. |
| 2545 | "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it |
| 2546 | # was triggered automatically. |
| 2547 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 2548 | # granularity. If this amount of time elapses, work on the build will cease |
| 2549 | # and the build status will be `TIMEOUT`. |
| 2550 | # |
| 2551 | # `timeout` starts ticking from `startTime`. |
| 2552 | # |
| 2553 | # Default time is ten minutes. |
| 2554 | "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon |
| 2555 | # successful completion of all build steps. |
| 2556 | # successful completion of all build steps. |
| 2557 | "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful |
| 2558 | # completion of all build steps. |
| 2559 | # |
| 2560 | # Files in the workspace matching specified paths globs will be uploaded to |
| 2561 | # the specified Cloud Storage location using the builder service account's |
| 2562 | # credentials. |
| 2563 | # |
| 2564 | # The location and generation of the uploaded objects will be stored in the |
| 2565 | # Build resource's results field. |
| 2566 | # |
| 2567 | # If any objects fail to be pushed, the build is marked FAILURE. |
| 2568 | # completion of all build steps. |
| 2569 | "location": "A String", # Cloud Storage bucket and optional object path, in the form |
| 2570 | # "gs://bucket/path/to/somewhere/". (see [Bucket Name |
| 2571 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 2572 | # |
| 2573 | # Files in the workspace matching any path pattern will be uploaded to |
| 2574 | # Cloud Storage with this location as a prefix. |
| 2575 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2576 | "startTime": "A String", # Start of time span. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2577 | "endTime": "A String", # End of time span. |
| 2578 | }, |
| 2579 | "paths": [ # Path globs used to match files in the build's workspace. |
| 2580 | "A String", |
| 2581 | ], |
| 2582 | }, |
| 2583 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 2584 | # steps. |
| 2585 | # |
| 2586 | # The images will be pushed using the builder service account's credentials. |
| 2587 | # |
| 2588 | # The digests of the pushed images will be stored in the Build resource's |
| 2589 | # results field. |
| 2590 | # |
| 2591 | # If any of the images fail to be pushed, the build is marked FAILURE. |
| 2592 | "A String", |
| 2593 | ], |
| 2594 | }, |
| 2595 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 2596 | # [Bucket Name |
| 2597 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 2598 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 2599 | "steps": [ # Required. The operations to be performed on the workspace. |
| 2600 | { # A step in the build pipeline. |
| 2601 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 2602 | # |
| 2603 | # If the image used to run the step's container has an entrypoint, the `args` |
| 2604 | # are used as arguments to that entrypoint. If the image does not define |
| 2605 | # an entrypoint, the first element in args is used as the entrypoint, |
| 2606 | # and the remainder will be used as arguments. |
| 2607 | "A String", |
| 2608 | ], |
| 2609 | "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint. |
| 2610 | # If unset, the image's default entrypoint is used. |
| 2611 | "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key |
| 2612 | # Management Service crypto key. These values must be specified in the |
| 2613 | # build's `Secret`. |
| 2614 | "A String", |
| 2615 | ], |
| 2616 | "status": "A String", # Output only. Status of the build step. At this time, build step status is |
| 2617 | # only updated on build completion; step status is not updated in real-time |
| 2618 | # as the build progresses. |
| 2619 | "volumes": [ # List of volumes to mount into the build step. |
| 2620 | # |
| 2621 | # Each volume is created as an empty volume prior to execution of the |
| 2622 | # build step. Upon completion of the build, volumes and their contents are |
| 2623 | # discarded. |
| 2624 | # |
| 2625 | # Using a named volume in only one step is not valid as it is indicative |
| 2626 | # of a build request with an incorrect configuration. |
| 2627 | { # Volume describes a Docker container volume which is mounted into build steps |
| 2628 | # in order to persist files across build step execution. |
| 2629 | "path": "A String", # Path at which to mount the volume. |
| 2630 | # |
| 2631 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 2632 | # same build step or with certain reserved volume paths. |
| 2633 | "name": "A String", # Name of the volume to mount. |
| 2634 | # |
| 2635 | # Volume names must be unique per build step and must be valid names for |
| 2636 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 2637 | }, |
| 2638 | ], |
| 2639 | "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no |
| 2640 | # time limit and will be allowed to continue to run until either it completes |
| 2641 | # or the build itself times out. |
| 2642 | "dir": "A String", # Working directory to use when running this step's container. |
| 2643 | # |
| 2644 | # If this value is a relative path, it is relative to the build's working |
| 2645 | # directory. If this value is absolute, it may be outside the build's working |
| 2646 | # directory, in which case the contents of the path may not be persisted |
| 2647 | # across build step executions, unless a `volume` for that path is specified. |
| 2648 | # |
| 2649 | # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, |
| 2650 | # which specifies an absolute path, the `RepoSource` `dir` is ignored for |
| 2651 | # the step's execution. |
| 2652 | "id": "A String", # Unique identifier for this build step, used in `wait_for` to |
| 2653 | # reference this build step as a dependency. |
| 2654 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 2655 | # |
| 2656 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 2657 | # being given the value "VALUE". |
| 2658 | "A String", |
| 2659 | ], |
| 2660 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 2661 | # This build step will not start until all the build steps in `wait_for` |
| 2662 | # have completed successfully. If `wait_for` is empty, this build step will |
| 2663 | # start when all previous build steps in the `Build.Steps` list have |
| 2664 | # completed successfully. |
| 2665 | "A String", |
| 2666 | ], |
| 2667 | "name": "A String", # Required. The name of the container image that will run this particular |
| 2668 | # build step. |
| 2669 | # |
| 2670 | # If the image is available in the host's Docker daemon's cache, it |
| 2671 | # will be run directly. If not, the host will attempt to pull the image |
| 2672 | # first, using the builder service account's credentials if necessary. |
| 2673 | # |
| 2674 | # The Docker daemon's cache will already have the latest versions of all of |
| 2675 | # the officially supported build steps |
| 2676 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 2677 | # The Docker daemon will also have cached many of the layers for some popular |
| 2678 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 2679 | # attempt to use them. |
| 2680 | # |
| 2681 | # If you built an image in a previous build step, it will be stored in the |
| 2682 | # host's Docker daemon's cache and is available to use as the name for a |
| 2683 | # later build step. |
| 2684 | "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's |
| 2685 | # builder image only. |
| 2686 | "startTime": "A String", # Start of time span. |
| 2687 | "endTime": "A String", # End of time span. |
| 2688 | }, |
| 2689 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step. |
| 2690 | "startTime": "A String", # Start of time span. |
| 2691 | "endTime": "A String", # End of time span. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2692 | }, |
| 2693 | }, |
| 2694 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2695 | "id": "A String", # Output only. Unique identifier of the build. |
| 2696 | "status": "A String", # Output only. Status of the build. |
| 2697 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 2698 | # steps. |
| 2699 | # |
| 2700 | # The images are pushed using the builder service account's credentials. |
| 2701 | # |
| 2702 | # The digests of the pushed images will be stored in the `Build` resource's |
| 2703 | # results field. |
| 2704 | # |
| 2705 | # If any of the images fail to be pushed, the build status is marked |
| 2706 | # `FAILURE`. |
| 2707 | "A String", |
| 2708 | ], |
| 2709 | "projectId": "A String", # Output only. ID of the project. |
| 2710 | "source": { # Location of the source in a supported storage service. # The location of the source files to build. |
| 2711 | "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. |
| 2712 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 2713 | # omitted, the latest generation will be used. |
| 2714 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 2715 | # [Bucket Name |
| 2716 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 2717 | "object": "A String", # Google Cloud Storage object containing the source. |
| 2718 | # |
| 2719 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 2720 | # build. |
| 2721 | }, |
| 2722 | "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source |
| 2723 | # Repository. |
| 2724 | "tagName": "A String", # Regex matching tags to build. |
| 2725 | # |
| 2726 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2727 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2728 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 2729 | # |
| 2730 | # This must be a relative path. If a step's `dir` is specified and is an |
| 2731 | # absolute path, this value is ignored for that step's execution. |
| 2732 | "substitutions": { # Substitutions to use in a triggered build. |
| 2733 | # Should only be used with RunBuildTrigger |
| 2734 | "a_key": "A String", |
| 2735 | }, |
| 2736 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 2737 | "commitSha": "A String", # Explicit commit SHA to build. |
| 2738 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 2739 | # regex. |
| 2740 | "branchName": "A String", # Regex matching branches to build. |
| 2741 | # |
| 2742 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2743 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2744 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 2745 | # project ID requesting the build is assumed. |
| 2746 | }, |
| 2747 | }, |
| 2748 | "tags": [ # Tags for annotation of a `Build`. These are not docker tags. |
| 2749 | "A String", |
| 2750 | ], |
| 2751 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 2752 | "volumes": [ # Global list of volumes to mount for ALL build steps |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2753 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2754 | # Each volume is created as an empty volume prior to starting the build |
| 2755 | # process. Upon completion of the build, volumes and their contents are |
| 2756 | # discarded. Global volume names and paths cannot conflict with the volumes |
| 2757 | # defined a build step. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2758 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2759 | # Using a global volume in a build with only one step is not valid as |
| 2760 | # it is indicative of a build request with an incorrect configuration. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2761 | { # Volume describes a Docker container volume which is mounted into build steps |
| 2762 | # in order to persist files across build step execution. |
| 2763 | "path": "A String", # Path at which to mount the volume. |
| 2764 | # |
| 2765 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 2766 | # same build step or with certain reserved volume paths. |
| 2767 | "name": "A String", # Name of the volume to mount. |
| 2768 | # |
| 2769 | # Volume names must be unique per build step and must be valid names for |
| 2770 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 2771 | }, |
| 2772 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2773 | "env": [ # A list of global environment variable definitions that will exist for all |
| 2774 | # build steps in this build. If a variable is defined in both globally and in |
| 2775 | # a build step, the variable will use the build step value. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2776 | # |
| 2777 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 2778 | # being given the value "VALUE". |
| 2779 | "A String", |
| 2780 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2781 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 2782 | "A String", |
| 2783 | ], |
| 2784 | "machineType": "A String", # Compute Engine machine type on which to run the build. |
| 2785 | "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud |
| 2786 | # Storage. |
| 2787 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 2788 | "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution |
| 2789 | # checks. |
| 2790 | # |
| 2791 | # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot |
| 2792 | # be overridden in the build configuration file. |
| 2793 | "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT* |
| 2794 | # "disk free"; some of the space will be used by the operating system and |
| 2795 | # build utilities. Also note that this is the minimum disk size that will be |
| 2796 | # allocated for the build -- the build may run with a larger disk than |
| 2797 | # requested. At present, the maximum disk size is 1000GB; builds that request |
| 2798 | # more than the maximum are rejected with an error. |
| 2799 | "workerPool": "A String", # Option to specify a `WorkerPool` for the build. |
| 2800 | # Format: projects/{project}/workerPools/{workerPool} |
| 2801 | # |
| 2802 | # This field is experimental. |
| 2803 | "logging": "A String", # Option to specify the logging mode, which determines if and where build |
| 2804 | # logs are stored. |
| 2805 | "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud |
| 2806 | # Key Management Service crypto key. These values must be specified in the |
| 2807 | # build's `Secret`. These variables will be available to all build steps |
| 2808 | # in this build. |
| 2809 | "A String", |
| 2810 | ], |
| 2811 | "dynamicSubstitutions": True or False, # Option to specify whether or not to apply bash style string |
| 2812 | # operations to the substitutions. |
| 2813 | # |
| 2814 | # NOTE: this is always enabled for triggered builds and cannot be |
| 2815 | # overridden in the build configuration file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2816 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2817 | "substitutions": { # Substitutions data for `Build` resource. |
| 2818 | "a_key": "A String", |
| 2819 | }, |
| 2820 | "createTime": "A String", # Output only. Time at which the request to create the build was received. |
| 2821 | "startTime": "A String", # Output only. Time at which execution of the build was started. |
| 2822 | }, |
| 2823 | "ignoredFiles": [ # ignored_files and included_files are file glob matches using |
| 2824 | # https://golang.org/pkg/path/filepath/#Match extended with support for "**". |
| 2825 | # |
| 2826 | # If ignored_files and changed files are both empty, then they are |
| 2827 | # not used to determine whether or not to trigger a build. |
| 2828 | # |
| 2829 | # If ignored_files is not empty, then we ignore any files that match |
| 2830 | # any of the ignored_file globs. If the change has no files that are |
| 2831 | # outside of the ignored_files globs, then we do not trigger a build. |
| 2832 | "A String", |
| 2833 | ], |
| 2834 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 2835 | # template. |
| 2836 | "disabled": True or False, # If true, the trigger will never automatically execute a build. |
| 2837 | "name": "A String", # User-assigned name of the trigger. Must be unique within the project. |
| 2838 | # Trigger names must meet the following requirements: |
| 2839 | # |
| 2840 | # + They must contain only alphanumeric characters and dashes. |
| 2841 | # + They can be 1-64 characters long. |
| 2842 | # + They must begin and end with an alphanumeric character. |
| 2843 | "tags": [ # Tags for annotation of a `BuildTrigger` |
| 2844 | "A String", |
| 2845 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2846 | "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates |
| 2847 | # a build whenever a GitHub event is received. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2848 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2849 | # Mutually exclusive with `trigger_template`. |
| 2850 | # build whenever a GitHub event is received. |
| 2851 | # |
| 2852 | # This message is experimental. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2853 | "installationId": "A String", # The installationID that emits the GitHub event. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2854 | "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests. |
| 2855 | # Requests. |
| 2856 | "branch": "A String", # Regex of branches to match. |
| 2857 | # |
| 2858 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2859 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2860 | "commentControl": "A String", # Configure builds to run whether a repository owner or collaborator need to |
| 2861 | # comment `/gcbrun`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2862 | "invertRegex": True or False, # If true, branches that do NOT match the git_ref will trigger a build. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2863 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2864 | "name": "A String", # Name of the repository. For example: The name for |
| 2865 | # https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". |
| 2866 | "owner": "A String", # Owner of the repository. For example: The owner for |
| 2867 | # https://github.com/googlecloudplatform/cloud-builders is |
| 2868 | # "googlecloudplatform". |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2869 | "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags. |
| 2870 | "branch": "A String", # Regexes matching branches to build. |
| 2871 | # |
| 2872 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2873 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2874 | "invertRegex": True or False, # When true, only trigger a build if the revision regex does NOT match the |
| 2875 | # git_ref regex. |
| 2876 | "tag": "A String", # Regexes matching tags to build. |
| 2877 | # |
| 2878 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2879 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2880 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2881 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2882 | "createTime": "A String", # Output only. Time when the trigger was created. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2883 | "includedFiles": [ # If any of the files altered in the commit pass the ignored_files |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2884 | # filter and included_files is empty, then as far as this filter is |
| 2885 | # concerned, we should trigger the build. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2886 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2887 | # If any of the files altered in the commit pass the ignored_files |
| 2888 | # filter and included_files is not empty, then we make sure that at |
| 2889 | # least one of those files matches a included_files glob. If not, |
| 2890 | # then we do not trigger a build. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2891 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2892 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2893 | "description": "A String", # Human-readable description of this trigger. |
| 2894 | } |
| 2895 | |
| 2896 | x__xgafv: string, V1 error format. |
| 2897 | Allowed values |
| 2898 | 1 - v1 error format |
| 2899 | 2 - v2 error format |
| 2900 | |
| 2901 | Returns: |
| 2902 | An object of the form: |
| 2903 | |
| 2904 | { # Configuration for an automated build in response to source repository |
| 2905 | # changes. |
| 2906 | "substitutions": { # Substitutions for Build resource. The keys must match the following |
| 2907 | # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the |
| 2908 | # keys in bindings. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2909 | "a_key": "A String", |
| 2910 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2911 | "triggerTemplate": { # Location of the source in a Google Cloud Source Repository. # Template describing the types of source changes to trigger a build. |
| 2912 | # |
| 2913 | # Branch and tag names in trigger templates are interpreted as regular |
| 2914 | # expressions. Any branch or tag change that matches that regular expression |
| 2915 | # will trigger a build. |
| 2916 | # |
| 2917 | # Mutually exclusive with `github`. |
| 2918 | "tagName": "A String", # Regex matching tags to build. |
| 2919 | # |
| 2920 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2921 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2922 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 2923 | # |
| 2924 | # This must be a relative path. If a step's `dir` is specified and is an |
| 2925 | # absolute path, this value is ignored for that step's execution. |
| 2926 | "substitutions": { # Substitutions to use in a triggered build. |
| 2927 | # Should only be used with RunBuildTrigger |
| 2928 | "a_key": "A String", |
| 2929 | }, |
| 2930 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 2931 | "commitSha": "A String", # Explicit commit SHA to build. |
| 2932 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 2933 | # regex. |
| 2934 | "branchName": "A String", # Regex matching branches to build. |
| 2935 | # |
| 2936 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2937 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2938 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 2939 | # project ID requesting the build is assumed. |
| 2940 | }, |
| 2941 | "id": "A String", # Output only. Unique identifier of the trigger. |
| 2942 | "build": { # A build resource in the Cloud Build API. # Contents of the build template. |
| 2943 | # |
| 2944 | # At a high level, a `Build` describes where to find source code, how to build |
| 2945 | # it (for example, the builder image to run on the source), and where to store |
| 2946 | # the built artifacts. |
| 2947 | # |
| 2948 | # Fields can include the following variables, which will be expanded when the |
| 2949 | # build is created: |
| 2950 | # |
| 2951 | # - $PROJECT_ID: the project ID of the build. |
| 2952 | # - $BUILD_ID: the autogenerated ID of the build. |
| 2953 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 2954 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 2955 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 2956 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 2957 | # resolved from the specified branch or tag. |
| 2958 | # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. |
| 2959 | "queueTtl": "A String", # TTL in queue for this build. If provided and the build is enqueued longer |
| 2960 | # than this value, the build will expire and the build status will be |
| 2961 | # `EXPIRED`. |
| 2962 | # |
| 2963 | # The TTL starts ticking from create_time. |
| 2964 | "statusDetail": "A String", # Output only. Customer-readable message about the current status. |
| 2965 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # Output only. A permanent fixed identifier for source. |
| 2966 | # some source was used for this build. |
| 2967 | "resolvedRepoSource": { # Location of the source in a Google Cloud Source Repository. # A copy of the build's `source.repo_source`, if exists, with any |
| 2968 | # revisions resolved. |
| 2969 | "tagName": "A String", # Regex matching tags to build. |
| 2970 | # |
| 2971 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2972 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2973 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 2974 | # |
| 2975 | # This must be a relative path. If a step's `dir` is specified and is an |
| 2976 | # absolute path, this value is ignored for that step's execution. |
| 2977 | "substitutions": { # Substitutions to use in a triggered build. |
| 2978 | # Should only be used with RunBuildTrigger |
| 2979 | "a_key": "A String", |
| 2980 | }, |
| 2981 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 2982 | "commitSha": "A String", # Explicit commit SHA to build. |
| 2983 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 2984 | # regex. |
| 2985 | "branchName": "A String", # Regex matching branches to build. |
| 2986 | # |
| 2987 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 2988 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 2989 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 2990 | # project ID requesting the build is assumed. |
| 2991 | }, |
| 2992 | "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 |
| 2993 | # generations resolved. |
| 2994 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 2995 | # omitted, the latest generation will be used. |
| 2996 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 2997 | # [Bucket Name |
| 2998 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 2999 | "object": "A String", # Google Cloud Storage object containing the source. |
| 3000 | # |
| 3001 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 3002 | # build. |
| 3003 | }, |
| 3004 | "fileHashes": { # Output only. Hash(es) of the build source, which can be used to verify that |
| 3005 | # the original source integrity was maintained in the build. Note that |
| 3006 | # `FileHashes` will only be populated if `BuildOptions` has requested a |
| 3007 | # `SourceProvenanceHash`. |
| 3008 | # |
| 3009 | # The keys to this map are file paths used as build source and the values |
| 3010 | # contain the hash values for those files. |
| 3011 | # |
| 3012 | # If the build source came in a single package such as a gzipped tarfile |
| 3013 | # (`.tar.gz`), the `FileHash` will be for the single path to that file. |
| 3014 | "a_key": { # Container message for hashes of byte content of files, used in |
| 3015 | # SourceProvenance messages to verify integrity of source input to the build. |
| 3016 | "fileHash": [ # Collection of file hashes. |
| 3017 | { # Container message for hash values. |
| 3018 | "value": "A String", # The hash value. |
| 3019 | "type": "A String", # The type of hash that was performed. |
| 3020 | }, |
| 3021 | ], |
| 3022 | }, |
| 3023 | }, |
| 3024 | }, |
| 3025 | "secrets": [ # Secrets to decrypt using Cloud Key Management Service. |
| 3026 | { # Pairs a set of secret environment variables containing encrypted |
| 3027 | # values with the Cloud KMS key to use to decrypt the value. |
| 3028 | "kmsKeyName": "A String", # Cloud KMS key name to use to decrypt these envs. |
| 3029 | "secretEnv": { # Map of environment variable name to its encrypted value. |
| 3030 | # |
| 3031 | # Secret environment variables must be unique across all of a build's |
| 3032 | # secrets, and must be used by at least one build step. Values can be at most |
| 3033 | # 64 KB in size. There can be at most 100 secret values across all of a |
| 3034 | # build's secrets. |
| 3035 | "a_key": "A String", |
| 3036 | }, |
| 3037 | }, |
| 3038 | ], |
| 3039 | "results": { # Artifacts created by the build pipeline. # Output only. Results of the build. |
| 3040 | "numArtifacts": "A String", # Number of artifacts uploaded. Only populated when artifacts are uploaded. |
| 3041 | "buildStepImages": [ # List of build step digests, in the order corresponding to build step |
| 3042 | # indices. |
| 3043 | "A String", |
| 3044 | ], |
| 3045 | "artifactTiming": { # Start and end times for a build execution phase. # Time to push all non-container artifacts. |
| 3046 | "startTime": "A String", # Start of time span. |
| 3047 | "endTime": "A String", # End of time span. |
| 3048 | }, |
| 3049 | "artifactManifest": "A String", # Path to the artifact manifest. Only populated when artifacts are uploaded. |
| 3050 | "images": [ # Container images that were built as a part of the build. |
| 3051 | { # An image built by the pipeline. |
| 3052 | "digest": "A String", # Docker Registry 2.0 digest. |
| 3053 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 3054 | # presented to `docker push`. |
| 3055 | "pushTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing the specified image. |
| 3056 | "startTime": "A String", # Start of time span. |
| 3057 | "endTime": "A String", # End of time span. |
| 3058 | }, |
| 3059 | }, |
| 3060 | ], |
| 3061 | "buildStepOutputs": [ # List of build step outputs, produced by builder images, in the order |
| 3062 | # corresponding to build step indices. |
| 3063 | # |
| 3064 | # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) |
| 3065 | # can produce this output by writing to `$BUILDER_OUTPUT/output`. |
| 3066 | # Only the first 4KB of data is stored. |
| 3067 | "A String", |
| 3068 | ], |
| 3069 | }, |
| 3070 | "logUrl": "A String", # Output only. URL to logs for this build in Google Cloud Console. |
| 3071 | "timing": { # Output only. Stores timing information for phases of the build. Valid keys |
| 3072 | # are: |
| 3073 | # |
| 3074 | # * BUILD: time to execute all build steps |
| 3075 | # * PUSH: time to push all specified images. |
| 3076 | # * FETCHSOURCE: time to fetch source. |
| 3077 | # |
| 3078 | # If the build does not specify source or images, |
| 3079 | # these keys will not be included. |
| 3080 | "a_key": { # Start and end times for a build execution phase. |
| 3081 | "startTime": "A String", # Start of time span. |
| 3082 | "endTime": "A String", # End of time span. |
| 3083 | }, |
| 3084 | }, |
| 3085 | "finishTime": "A String", # Output only. Time at which execution of the build was finished. |
| 3086 | # |
| 3087 | # The difference between finish_time and start_time is the duration of the |
| 3088 | # build's execution. |
| 3089 | "buildTriggerId": "A String", # Output only. The ID of the `BuildTrigger` that triggered this build, if it |
| 3090 | # was triggered automatically. |
| 3091 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 3092 | # granularity. If this amount of time elapses, work on the build will cease |
| 3093 | # and the build status will be `TIMEOUT`. |
| 3094 | # |
| 3095 | # `timeout` starts ticking from `startTime`. |
| 3096 | # |
| 3097 | # Default time is ten minutes. |
| 3098 | "artifacts": { # Artifacts produced by a build that should be uploaded upon # Artifacts produced by the build that should be uploaded upon |
| 3099 | # successful completion of all build steps. |
| 3100 | # successful completion of all build steps. |
| 3101 | "objects": { # Files in the workspace to upload to Cloud Storage upon successful # A list of objects to be uploaded to Cloud Storage upon successful |
| 3102 | # completion of all build steps. |
| 3103 | # |
| 3104 | # Files in the workspace matching specified paths globs will be uploaded to |
| 3105 | # the specified Cloud Storage location using the builder service account's |
| 3106 | # credentials. |
| 3107 | # |
| 3108 | # The location and generation of the uploaded objects will be stored in the |
| 3109 | # Build resource's results field. |
| 3110 | # |
| 3111 | # If any objects fail to be pushed, the build is marked FAILURE. |
| 3112 | # completion of all build steps. |
| 3113 | "location": "A String", # Cloud Storage bucket and optional object path, in the form |
| 3114 | # "gs://bucket/path/to/somewhere/". (see [Bucket Name |
| 3115 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 3116 | # |
| 3117 | # Files in the workspace matching any path pattern will be uploaded to |
| 3118 | # Cloud Storage with this location as a prefix. |
| 3119 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for pushing all artifact objects. |
| 3120 | "startTime": "A String", # Start of time span. |
| 3121 | "endTime": "A String", # End of time span. |
| 3122 | }, |
| 3123 | "paths": [ # Path globs used to match files in the build's workspace. |
| 3124 | "A String", |
| 3125 | ], |
| 3126 | }, |
| 3127 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 3128 | # steps. |
| 3129 | # |
| 3130 | # The images will be pushed using the builder service account's credentials. |
| 3131 | # |
| 3132 | # The digests of the pushed images will be stored in the Build resource's |
| 3133 | # results field. |
| 3134 | # |
| 3135 | # If any of the images fail to be pushed, the build is marked FAILURE. |
| 3136 | "A String", |
| 3137 | ], |
| 3138 | }, |
| 3139 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 3140 | # [Bucket Name |
| 3141 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 3142 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 3143 | "steps": [ # Required. The operations to be performed on the workspace. |
| 3144 | { # A step in the build pipeline. |
| 3145 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 3146 | # |
| 3147 | # If the image used to run the step's container has an entrypoint, the `args` |
| 3148 | # are used as arguments to that entrypoint. If the image does not define |
| 3149 | # an entrypoint, the first element in args is used as the entrypoint, |
| 3150 | # and the remainder will be used as arguments. |
| 3151 | "A String", |
| 3152 | ], |
| 3153 | "entrypoint": "A String", # Entrypoint to be used instead of the build step image's default entrypoint. |
| 3154 | # If unset, the image's default entrypoint is used. |
| 3155 | "secretEnv": [ # A list of environment variables which are encrypted using a Cloud Key |
| 3156 | # Management Service crypto key. These values must be specified in the |
| 3157 | # build's `Secret`. |
| 3158 | "A String", |
| 3159 | ], |
| 3160 | "status": "A String", # Output only. Status of the build step. At this time, build step status is |
| 3161 | # only updated on build completion; step status is not updated in real-time |
| 3162 | # as the build progresses. |
| 3163 | "volumes": [ # List of volumes to mount into the build step. |
| 3164 | # |
| 3165 | # Each volume is created as an empty volume prior to execution of the |
| 3166 | # build step. Upon completion of the build, volumes and their contents are |
| 3167 | # discarded. |
| 3168 | # |
| 3169 | # Using a named volume in only one step is not valid as it is indicative |
| 3170 | # of a build request with an incorrect configuration. |
| 3171 | { # Volume describes a Docker container volume which is mounted into build steps |
| 3172 | # in order to persist files across build step execution. |
| 3173 | "path": "A String", # Path at which to mount the volume. |
| 3174 | # |
| 3175 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 3176 | # same build step or with certain reserved volume paths. |
| 3177 | "name": "A String", # Name of the volume to mount. |
| 3178 | # |
| 3179 | # Volume names must be unique per build step and must be valid names for |
| 3180 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 3181 | }, |
| 3182 | ], |
| 3183 | "timeout": "A String", # Time limit for executing this build step. If not defined, the step has no |
| 3184 | # time limit and will be allowed to continue to run until either it completes |
| 3185 | # or the build itself times out. |
| 3186 | "dir": "A String", # Working directory to use when running this step's container. |
| 3187 | # |
| 3188 | # If this value is a relative path, it is relative to the build's working |
| 3189 | # directory. If this value is absolute, it may be outside the build's working |
| 3190 | # directory, in which case the contents of the path may not be persisted |
| 3191 | # across build step executions, unless a `volume` for that path is specified. |
| 3192 | # |
| 3193 | # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, |
| 3194 | # which specifies an absolute path, the `RepoSource` `dir` is ignored for |
| 3195 | # the step's execution. |
| 3196 | "id": "A String", # Unique identifier for this build step, used in `wait_for` to |
| 3197 | # reference this build step as a dependency. |
| 3198 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 3199 | # |
| 3200 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 3201 | # being given the value "VALUE". |
| 3202 | "A String", |
| 3203 | ], |
| 3204 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 3205 | # This build step will not start until all the build steps in `wait_for` |
| 3206 | # have completed successfully. If `wait_for` is empty, this build step will |
| 3207 | # start when all previous build steps in the `Build.Steps` list have |
| 3208 | # completed successfully. |
| 3209 | "A String", |
| 3210 | ], |
| 3211 | "name": "A String", # Required. The name of the container image that will run this particular |
| 3212 | # build step. |
| 3213 | # |
| 3214 | # If the image is available in the host's Docker daemon's cache, it |
| 3215 | # will be run directly. If not, the host will attempt to pull the image |
| 3216 | # first, using the builder service account's credentials if necessary. |
| 3217 | # |
| 3218 | # The Docker daemon's cache will already have the latest versions of all of |
| 3219 | # the officially supported build steps |
| 3220 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 3221 | # The Docker daemon will also have cached many of the layers for some popular |
| 3222 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 3223 | # attempt to use them. |
| 3224 | # |
| 3225 | # If you built an image in a previous build step, it will be stored in the |
| 3226 | # host's Docker daemon's cache and is available to use as the name for a |
| 3227 | # later build step. |
| 3228 | "pullTiming": { # Start and end times for a build execution phase. # Output only. Stores timing information for pulling this build step's |
| 3229 | # builder image only. |
| 3230 | "startTime": "A String", # Start of time span. |
| 3231 | "endTime": "A String", # End of time span. |
| 3232 | }, |
| 3233 | "timing": { # Start and end times for a build execution phase. # Output only. Stores timing information for executing this build step. |
| 3234 | "startTime": "A String", # Start of time span. |
| 3235 | "endTime": "A String", # End of time span. |
| 3236 | }, |
| 3237 | }, |
| 3238 | ], |
| 3239 | "id": "A String", # Output only. Unique identifier of the build. |
| 3240 | "status": "A String", # Output only. Status of the build. |
| 3241 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 3242 | # steps. |
| 3243 | # |
| 3244 | # The images are pushed using the builder service account's credentials. |
| 3245 | # |
| 3246 | # The digests of the pushed images will be stored in the `Build` resource's |
| 3247 | # results field. |
| 3248 | # |
| 3249 | # If any of the images fail to be pushed, the build status is marked |
| 3250 | # `FAILURE`. |
| 3251 | "A String", |
| 3252 | ], |
| 3253 | "projectId": "A String", # Output only. ID of the project. |
| 3254 | "source": { # Location of the source in a supported storage service. # The location of the source files to build. |
| 3255 | "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. |
| 3256 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 3257 | # omitted, the latest generation will be used. |
| 3258 | "bucket": "A String", # Google Cloud Storage bucket containing the source (see |
| 3259 | # [Bucket Name |
| 3260 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 3261 | "object": "A String", # Google Cloud Storage object containing the source. |
| 3262 | # |
| 3263 | # This object must be a gzipped archive file (`.tar.gz`) containing source to |
| 3264 | # build. |
| 3265 | }, |
| 3266 | "repoSource": { # Location of the source in a Google Cloud Source Repository. # If provided, get the source from this location in a Cloud Source |
| 3267 | # Repository. |
| 3268 | "tagName": "A String", # Regex matching tags to build. |
| 3269 | # |
| 3270 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 3271 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 3272 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 3273 | # |
| 3274 | # This must be a relative path. If a step's `dir` is specified and is an |
| 3275 | # absolute path, this value is ignored for that step's execution. |
| 3276 | "substitutions": { # Substitutions to use in a triggered build. |
| 3277 | # Should only be used with RunBuildTrigger |
| 3278 | "a_key": "A String", |
| 3279 | }, |
| 3280 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 3281 | "commitSha": "A String", # Explicit commit SHA to build. |
| 3282 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 3283 | # regex. |
| 3284 | "branchName": "A String", # Regex matching branches to build. |
| 3285 | # |
| 3286 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 3287 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 3288 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 3289 | # project ID requesting the build is assumed. |
| 3290 | }, |
| 3291 | }, |
| 3292 | "tags": [ # Tags for annotation of a `Build`. These are not docker tags. |
| 3293 | "A String", |
| 3294 | ], |
| 3295 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 3296 | "volumes": [ # Global list of volumes to mount for ALL build steps |
| 3297 | # |
| 3298 | # Each volume is created as an empty volume prior to starting the build |
| 3299 | # process. Upon completion of the build, volumes and their contents are |
| 3300 | # discarded. Global volume names and paths cannot conflict with the volumes |
| 3301 | # defined a build step. |
| 3302 | # |
| 3303 | # Using a global volume in a build with only one step is not valid as |
| 3304 | # it is indicative of a build request with an incorrect configuration. |
| 3305 | { # Volume describes a Docker container volume which is mounted into build steps |
| 3306 | # in order to persist files across build step execution. |
| 3307 | "path": "A String", # Path at which to mount the volume. |
| 3308 | # |
| 3309 | # Paths must be absolute and cannot conflict with other volume paths on the |
| 3310 | # same build step or with certain reserved volume paths. |
| 3311 | "name": "A String", # Name of the volume to mount. |
| 3312 | # |
| 3313 | # Volume names must be unique per build step and must be valid names for |
| 3314 | # Docker volumes. Each named volume must be used by at least two build steps. |
| 3315 | }, |
| 3316 | ], |
| 3317 | "env": [ # A list of global environment variable definitions that will exist for all |
| 3318 | # build steps in this build. If a variable is defined in both globally and in |
| 3319 | # a build step, the variable will use the build step value. |
| 3320 | # |
| 3321 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 3322 | # being given the value "VALUE". |
| 3323 | "A String", |
| 3324 | ], |
| 3325 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 3326 | "A String", |
| 3327 | ], |
| 3328 | "machineType": "A String", # Compute Engine machine type on which to run the build. |
| 3329 | "logStreamingOption": "A String", # Option to define build log streaming behavior to Google Cloud |
| 3330 | # Storage. |
| 3331 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 3332 | "substitutionOption": "A String", # Option to specify behavior when there is an error in the substitution |
| 3333 | # checks. |
| 3334 | # |
| 3335 | # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot |
| 3336 | # be overridden in the build configuration file. |
| 3337 | "diskSizeGb": "A String", # Requested disk size for the VM that runs the build. Note that this is *NOT* |
| 3338 | # "disk free"; some of the space will be used by the operating system and |
| 3339 | # build utilities. Also note that this is the minimum disk size that will be |
| 3340 | # allocated for the build -- the build may run with a larger disk than |
| 3341 | # requested. At present, the maximum disk size is 1000GB; builds that request |
| 3342 | # more than the maximum are rejected with an error. |
| 3343 | "workerPool": "A String", # Option to specify a `WorkerPool` for the build. |
| 3344 | # Format: projects/{project}/workerPools/{workerPool} |
| 3345 | # |
| 3346 | # This field is experimental. |
| 3347 | "logging": "A String", # Option to specify the logging mode, which determines if and where build |
| 3348 | # logs are stored. |
| 3349 | "secretEnv": [ # A list of global environment variables, which are encrypted using a Cloud |
| 3350 | # Key Management Service crypto key. These values must be specified in the |
| 3351 | # build's `Secret`. These variables will be available to all build steps |
| 3352 | # in this build. |
| 3353 | "A String", |
| 3354 | ], |
| 3355 | "dynamicSubstitutions": True or False, # Option to specify whether or not to apply bash style string |
| 3356 | # operations to the substitutions. |
| 3357 | # |
| 3358 | # NOTE: this is always enabled for triggered builds and cannot be |
| 3359 | # overridden in the build configuration file. |
| 3360 | }, |
| 3361 | "substitutions": { # Substitutions data for `Build` resource. |
| 3362 | "a_key": "A String", |
| 3363 | }, |
| 3364 | "createTime": "A String", # Output only. Time at which the request to create the build was received. |
| 3365 | "startTime": "A String", # Output only. Time at which execution of the build was started. |
| 3366 | }, |
| 3367 | "ignoredFiles": [ # ignored_files and included_files are file glob matches using |
| 3368 | # https://golang.org/pkg/path/filepath/#Match extended with support for "**". |
| 3369 | # |
| 3370 | # If ignored_files and changed files are both empty, then they are |
| 3371 | # not used to determine whether or not to trigger a build. |
| 3372 | # |
| 3373 | # If ignored_files is not empty, then we ignore any files that match |
| 3374 | # any of the ignored_file globs. If the change has no files that are |
| 3375 | # outside of the ignored_files globs, then we do not trigger a build. |
| 3376 | "A String", |
| 3377 | ], |
| 3378 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 3379 | # template. |
| 3380 | "disabled": True or False, # If true, the trigger will never automatically execute a build. |
| 3381 | "name": "A String", # User-assigned name of the trigger. Must be unique within the project. |
| 3382 | # Trigger names must meet the following requirements: |
| 3383 | # |
| 3384 | # + They must contain only alphanumeric characters and dashes. |
| 3385 | # + They can be 1-64 characters long. |
| 3386 | # + They must begin and end with an alphanumeric character. |
| 3387 | "tags": [ # Tags for annotation of a `BuildTrigger` |
| 3388 | "A String", |
| 3389 | ], |
| 3390 | "github": { # GitHubEventsConfig describes the configuration of a trigger that creates a # GitHubEventsConfig describes the configuration of a trigger that creates |
| 3391 | # a build whenever a GitHub event is received. |
| 3392 | # |
| 3393 | # Mutually exclusive with `trigger_template`. |
| 3394 | # build whenever a GitHub event is received. |
| 3395 | # |
| 3396 | # This message is experimental. |
| 3397 | "installationId": "A String", # The installationID that emits the GitHub event. |
| 3398 | "pullRequest": { # PullRequestFilter contains filter properties for matching GitHub Pull # filter to match changes in pull requests. |
| 3399 | # Requests. |
| 3400 | "branch": "A String", # Regex of branches to match. |
| 3401 | # |
| 3402 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 3403 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 3404 | "commentControl": "A String", # Configure builds to run whether a repository owner or collaborator need to |
| 3405 | # comment `/gcbrun`. |
| 3406 | "invertRegex": True or False, # If true, branches that do NOT match the git_ref will trigger a build. |
| 3407 | }, |
| 3408 | "name": "A String", # Name of the repository. For example: The name for |
| 3409 | # https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". |
| 3410 | "owner": "A String", # Owner of the repository. For example: The owner for |
| 3411 | # https://github.com/googlecloudplatform/cloud-builders is |
| 3412 | # "googlecloudplatform". |
| 3413 | "push": { # Push contains filter properties for matching GitHub git pushes. # filter to match changes in refs like branches, tags. |
| 3414 | "branch": "A String", # Regexes matching branches to build. |
| 3415 | # |
| 3416 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 3417 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 3418 | "invertRegex": True or False, # When true, only trigger a build if the revision regex does NOT match the |
| 3419 | # git_ref regex. |
| 3420 | "tag": "A String", # Regexes matching tags to build. |
| 3421 | # |
| 3422 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 3423 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
| 3424 | }, |
| 3425 | }, |
| 3426 | "createTime": "A String", # Output only. Time when the trigger was created. |
| 3427 | "includedFiles": [ # If any of the files altered in the commit pass the ignored_files |
| 3428 | # filter and included_files is empty, then as far as this filter is |
| 3429 | # concerned, we should trigger the build. |
| 3430 | # |
| 3431 | # If any of the files altered in the commit pass the ignored_files |
| 3432 | # filter and included_files is not empty, then we make sure that at |
| 3433 | # least one of those files matches a included_files glob. If not, |
| 3434 | # then we do not trigger a build. |
| 3435 | "A String", |
| 3436 | ], |
| 3437 | "description": "A String", # Human-readable description of this trigger. |
| 3438 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3439 | </div> |
| 3440 | |
| 3441 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3442 | <code class="details" id="run">run(projectId, triggerId, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3443 | <pre>Runs a `BuildTrigger` at a particular source revision. |
| 3444 | |
| 3445 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3446 | projectId: string, Required. ID of the project. (required) |
| 3447 | triggerId: string, Required. ID of the trigger. (required) |
| 3448 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3449 | The object takes the form of: |
| 3450 | |
| 3451 | { # Location of the source in a Google Cloud Source Repository. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3452 | "tagName": "A String", # Regex matching tags to build. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3453 | # |
| 3454 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 3455 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3456 | "dir": "A String", # Directory, relative to the source root, in which to run the build. |
| 3457 | # |
| 3458 | # This must be a relative path. If a step's `dir` is specified and is an |
| 3459 | # absolute path, this value is ignored for that step's execution. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3460 | "substitutions": { # Substitutions to use in a triggered build. |
| 3461 | # Should only be used with RunBuildTrigger |
| 3462 | "a_key": "A String", |
| 3463 | }, |
| 3464 | "repoName": "A String", # Required. Name of the Cloud Source Repository. |
| 3465 | "commitSha": "A String", # Explicit commit SHA to build. |
| 3466 | "invertRegex": True or False, # Only trigger a build if the revision regex does NOT match the revision |
| 3467 | # regex. |
| 3468 | "branchName": "A String", # Regex matching branches to build. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3469 | # |
| 3470 | # The syntax of the regular expressions accepted is the syntax accepted by |
| 3471 | # RE2 and described at https://github.com/google/re2/wiki/Syntax |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3472 | "projectId": "A String", # ID of the project that owns the Cloud Source Repository. If omitted, the |
| 3473 | # project ID requesting the build is assumed. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3474 | } |
| 3475 | |
| 3476 | x__xgafv: string, V1 error format. |
| 3477 | Allowed values |
| 3478 | 1 - v1 error format |
| 3479 | 2 - v2 error format |
| 3480 | |
| 3481 | Returns: |
| 3482 | An object of the form: |
| 3483 | |
| 3484 | { # This resource represents a long-running operation that is the result of a |
| 3485 | # network API call. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3486 | "response": { # The normal response of the operation in case of success. If the original |
| 3487 | # method returns no data on success, such as `Delete`, the response is |
| 3488 | # `google.protobuf.Empty`. If the original method is standard |
| 3489 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 3490 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 3491 | # is the original method name. For example, if the original method name |
| 3492 | # is `TakeSnapshot()`, the inferred response type is |
| 3493 | # `TakeSnapshotResponse`. |
| 3494 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 3495 | }, |
| 3496 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 3497 | # contains progress information and common metadata such as create time. |
| 3498 | # Some services might not provide such metadata. Any method that returns a |
| 3499 | # long-running operation should document the metadata type, if any. |
| 3500 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 3501 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3502 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 3503 | # originally returns it. If you use the default HTTP mapping, the |
| 3504 | # `name` should be a resource name ending with `operations/{unique_id}`. |
| 3505 | "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. |
| 3506 | # different programming environments, including REST APIs and RPC APIs. It is |
| 3507 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 3508 | # three pieces of data: error code, error message, and error details. |
| 3509 | # |
| 3510 | # You can find out more about this error model and how to work with it in the |
| 3511 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 3512 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 3513 | # user-facing error message should be localized and sent in the |
| 3514 | # google.rpc.Status.details field, or localized by the client. |
| 3515 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 3516 | # message types for APIs to use. |
| 3517 | { |
| 3518 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 3519 | }, |
| 3520 | ], |
| 3521 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 3522 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3523 | "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] | 3524 | # If `true`, the operation is completed, and either `error` or `response` is |
| 3525 | # available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3526 | }</pre> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3527 | </div> |
| 3528 | |
| 3529 | </body></html> |