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