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