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