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 | |
| 75 | <h1><a href="cloudbuild_v1.html">Google Cloud Container Builder API</a> . <a href="cloudbuild_v1.projects.html">projects</a> . <a href="cloudbuild_v1.projects.triggers.html">triggers</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#create">create(projectId, body, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Creates a new BuildTrigger.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#delete">delete(projectId, triggerId, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Deletes an BuildTrigger by its project ID and trigger ID.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(projectId, triggerId, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Gets information about a BuildTrigger.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#list">list(projectId, x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Lists existing BuildTrigger.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#patch">patch(projectId, triggerId, body, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Updates an BuildTrigger by its project ID and trigger ID.</p> |
| 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
| 94 | <code class="details" id="create">create(projectId, body, x__xgafv=None)</code> |
| 95 | <pre>Creates a new BuildTrigger. |
| 96 | |
| 97 | This API is experimental. |
| 98 | |
| 99 | Args: |
| 100 | projectId: string, ID of the project for which to configure automatic builds. (required) |
| 101 | body: object, The request body. (required) |
| 102 | The object takes the form of: |
| 103 | |
| 104 | { # Configuration for an automated build in response to source repository |
| 105 | # changes. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 106 | "description": "A String", # Human-readable description of this trigger. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 107 | "createTime": "A String", # Time when the trigger was created. |
| 108 | # |
| 109 | # @OutputOnly |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 110 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 111 | # template. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 112 | "disabled": True or False, # If true, the trigger will never result in a build. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 113 | "substitutions": { # Substitutions data for Build resource. |
| 114 | "a_key": "A String", |
| 115 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 116 | "build": { # A build resource in the Container Builder API. # Contents of the build template. |
| 117 | # |
| 118 | # At a high level, a Build describes where to find source code, how to build |
| 119 | # it (for example, the builder image to run on the source), and what tag to |
| 120 | # apply to the built image when it is pushed to Google Container Registry. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 121 | # |
| 122 | # Fields can include the following variables which will be expanded when the |
| 123 | # build is created: |
| 124 | # |
| 125 | # - $PROJECT_ID: the project ID of the build. |
| 126 | # - $BUILD_ID: the autogenerated ID of the build. |
| 127 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 128 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 129 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 130 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 131 | # resolved from the specified branch or tag. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 132 | "finishTime": "A String", # Time at which execution of the build was finished. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 133 | # |
| 134 | # The difference between finish_time and start_time is the duration of the |
| 135 | # build's execution. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 136 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 137 | "status": "A String", # Status of the build. |
| 138 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 139 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 140 | # granularity. If this amount of time elapses, work on the build will cease |
| 141 | # and the build status will be TIMEOUT. |
| 142 | # |
| 143 | # Default time is ten minutes. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 144 | "startTime": "A String", # Time at which execution of the build was started. |
| 145 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 146 | "projectId": "A String", # ID of the project. |
| 147 | # @OutputOnly. |
| 148 | "id": "A String", # Unique identifier of the build. |
| 149 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 150 | "results": { # Results describes the artifacts created by the build pipeline. # Results of the build. |
| 151 | # @OutputOnly |
| 152 | "images": [ # Images that were built as a part of the build. |
| 153 | { # BuiltImage describes an image built by the pipeline. |
| 154 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 155 | # presented to `docker push`. |
| 156 | "digest": "A String", # Docker Registry 2.0 digest. |
| 157 | }, |
| 158 | ], |
| 159 | "buildStepImages": [ # List of build step digests, in order corresponding to build step indices. |
| 160 | "A String", |
| 161 | ], |
| 162 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 163 | "statusDetail": "A String", # Customer-readable message about the current status. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 164 | # @OutputOnly |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 165 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 166 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 167 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 168 | "A String", |
| 169 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 170 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 171 | "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build. |
| 172 | # service. |
| 173 | "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud |
| 174 | # Storage. |
| 175 | # Google Cloud Storage. |
| 176 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 177 | # omitted, the latest generation will be used. |
| 178 | "object": "A String", # Google Cloud Storage object containing source. |
| 179 | # |
| 180 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 181 | # build. |
| 182 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 183 | # [Bucket Name |
| 184 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 185 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 186 | "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo. |
| 187 | # Repository. |
| 188 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 189 | # the build is assumed. |
| 190 | "branchName": "A String", # Name of the branch to build. |
| 191 | "commitSha": "A String", # Explicit commit SHA to build. |
| 192 | "tagName": "A String", # Name of the tag to build. |
| 193 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 194 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 195 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 196 | "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was |
| 197 | # triggered automatically. |
| 198 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 199 | "steps": [ # Describes the operations to be performed on the workspace. |
| 200 | { # BuildStep describes a step to perform in the build pipeline. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 201 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 202 | # This build step will not start until all the build steps in wait_for |
| 203 | # have completed successfully. If wait_for is empty, this build step will |
| 204 | # start when all previous build steps in the Build.Steps list have completed |
| 205 | # successfully. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 206 | "A String", |
| 207 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 208 | "name": "A String", # The name of the container image that will run this particular build step. |
| 209 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 210 | # If the image is already available in the host's Docker daemon's cache, it |
| 211 | # will be run directly. If not, the host will attempt to pull the image |
| 212 | # first, using the builder service account's credentials if necessary. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 213 | # |
| 214 | # The Docker daemon's cache will already have the latest versions of all of |
| 215 | # the officially supported build steps |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 216 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 217 | # The Docker daemon will also have cached many of the layers for some popular |
| 218 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 219 | # attempt to use them. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 220 | # |
| 221 | # If you built an image in a previous build step, it will be stored in the |
| 222 | # host's Docker daemon's cache and is available to use as the name for a |
| 223 | # later build step. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 224 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 225 | # |
| 226 | # If the image used to run the step's container has an entrypoint, these args |
| 227 | # will be used as arguments to that entrypoint. If the image does not define |
| 228 | # an entrypoint, the first element in args will be used as the entrypoint, |
| 229 | # and the remainder will be used as arguments. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 230 | "A String", |
| 231 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 232 | "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default |
| 233 | # If unset, the image's default will be used. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 234 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 235 | # |
| 236 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 237 | # being given the value "VALUE". |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 238 | "A String", |
| 239 | ], |
| 240 | "id": "A String", # Optional unique identifier for this build step, used in wait_for to |
| 241 | # reference this build step as a dependency. |
| 242 | "dir": "A String", # Working directory (relative to project source root) to use when running |
| 243 | # this operation's container. |
| 244 | }, |
| 245 | ], |
| 246 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source. |
| 247 | # @OutputOnly |
| 248 | # some source was used for this build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 249 | "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any |
| 250 | # revisions resolved. |
| 251 | # Repository. |
| 252 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 253 | # the build is assumed. |
| 254 | "branchName": "A String", # Name of the branch to build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 255 | "commitSha": "A String", # Explicit commit SHA to build. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 256 | "tagName": "A String", # Name of the tag to build. |
| 257 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 258 | }, |
| 259 | "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original |
| 260 | # source integrity was maintained in the build. Note that FileHashes will |
| 261 | # only be populated if BuildOptions has requested a SourceProvenanceHash. |
| 262 | # |
| 263 | # The keys to this map are file paths used as build source and the values |
| 264 | # contain the hash values for those files. |
| 265 | # |
| 266 | # If the build source came in a single package such as a gzipped tarfile |
| 267 | # (.tar.gz), the FileHash will be for the single path to that file. |
| 268 | # @OutputOnly |
| 269 | "a_key": { # Container message for hashes of byte content of files, used in |
| 270 | # SourceProvenance messages to verify integrity of source input to the build. |
| 271 | "fileHash": [ # Collection of file hashes. |
| 272 | { # Container message for hash values. |
| 273 | "type": "A String", # The type of hash that was performed. |
| 274 | "value": "A String", # The hash value. |
| 275 | }, |
| 276 | ], |
| 277 | }, |
| 278 | }, |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 279 | "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any |
| 280 | # generations resolved. |
| 281 | # Google Cloud Storage. |
| 282 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 283 | # omitted, the latest generation will be used. |
| 284 | "object": "A String", # Google Cloud Storage object containing source. |
| 285 | # |
| 286 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 287 | # build. |
| 288 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 289 | # [Bucket Name |
| 290 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 291 | }, |
| 292 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 293 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 294 | # [Bucket Name |
| 295 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 296 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 297 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 298 | # steps. |
| 299 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 300 | # The images will be pushed using the builder service account's credentials. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 301 | # |
| 302 | # The digests of the pushed images will be stored in the Build resource's |
| 303 | # results field. |
| 304 | # |
| 305 | # If any of the images fail to be pushed, the build is marked FAILURE. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 306 | "A String", |
| 307 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 308 | "substitutions": { # Substitutions data for Build resource. |
| 309 | "a_key": "A String", |
| 310 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 311 | "createTime": "A String", # Time at which the request to create the build was received. |
| 312 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 313 | "logUrl": "A String", # URL to logs for this build in Google Cloud Logging. |
| 314 | # @OutputOnly |
| 315 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 316 | "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build. |
| 317 | # |
| 318 | # Branch and tag names in trigger templates are interpreted as regular |
| 319 | # expressions. Any branch or tag change that matches that regular expression |
| 320 | # will trigger a build. |
| 321 | # Repository. |
| 322 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 323 | # the build is assumed. |
| 324 | "branchName": "A String", # Name of the branch to build. |
| 325 | "commitSha": "A String", # Explicit commit SHA to build. |
| 326 | "tagName": "A String", # Name of the tag to build. |
| 327 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 328 | }, |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 329 | "id": "A String", # Unique identifier of the trigger. |
| 330 | # |
| 331 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 332 | } |
| 333 | |
| 334 | x__xgafv: string, V1 error format. |
| 335 | Allowed values |
| 336 | 1 - v1 error format |
| 337 | 2 - v2 error format |
| 338 | |
| 339 | Returns: |
| 340 | An object of the form: |
| 341 | |
| 342 | { # Configuration for an automated build in response to source repository |
| 343 | # changes. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 344 | "description": "A String", # Human-readable description of this trigger. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 345 | "createTime": "A String", # Time when the trigger was created. |
| 346 | # |
| 347 | # @OutputOnly |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 348 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 349 | # template. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 350 | "disabled": True or False, # If true, the trigger will never result in a build. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 351 | "substitutions": { # Substitutions data for Build resource. |
| 352 | "a_key": "A String", |
| 353 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 354 | "build": { # A build resource in the Container Builder API. # Contents of the build template. |
| 355 | # |
| 356 | # At a high level, a Build describes where to find source code, how to build |
| 357 | # it (for example, the builder image to run on the source), and what tag to |
| 358 | # apply to the built image when it is pushed to Google Container Registry. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 359 | # |
| 360 | # Fields can include the following variables which will be expanded when the |
| 361 | # build is created: |
| 362 | # |
| 363 | # - $PROJECT_ID: the project ID of the build. |
| 364 | # - $BUILD_ID: the autogenerated ID of the build. |
| 365 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 366 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 367 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 368 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 369 | # resolved from the specified branch or tag. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 370 | "finishTime": "A String", # Time at which execution of the build was finished. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 371 | # |
| 372 | # The difference between finish_time and start_time is the duration of the |
| 373 | # build's execution. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 374 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 375 | "status": "A String", # Status of the build. |
| 376 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 377 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 378 | # granularity. If this amount of time elapses, work on the build will cease |
| 379 | # and the build status will be TIMEOUT. |
| 380 | # |
| 381 | # Default time is ten minutes. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 382 | "startTime": "A String", # Time at which execution of the build was started. |
| 383 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 384 | "projectId": "A String", # ID of the project. |
| 385 | # @OutputOnly. |
| 386 | "id": "A String", # Unique identifier of the build. |
| 387 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 388 | "results": { # Results describes the artifacts created by the build pipeline. # Results of the build. |
| 389 | # @OutputOnly |
| 390 | "images": [ # Images that were built as a part of the build. |
| 391 | { # BuiltImage describes an image built by the pipeline. |
| 392 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 393 | # presented to `docker push`. |
| 394 | "digest": "A String", # Docker Registry 2.0 digest. |
| 395 | }, |
| 396 | ], |
| 397 | "buildStepImages": [ # List of build step digests, in order corresponding to build step indices. |
| 398 | "A String", |
| 399 | ], |
| 400 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 401 | "statusDetail": "A String", # Customer-readable message about the current status. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 402 | # @OutputOnly |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 403 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 404 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 405 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 406 | "A String", |
| 407 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 408 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 409 | "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build. |
| 410 | # service. |
| 411 | "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud |
| 412 | # Storage. |
| 413 | # Google Cloud Storage. |
| 414 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 415 | # omitted, the latest generation will be used. |
| 416 | "object": "A String", # Google Cloud Storage object containing source. |
| 417 | # |
| 418 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 419 | # build. |
| 420 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 421 | # [Bucket Name |
| 422 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 423 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 424 | "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo. |
| 425 | # Repository. |
| 426 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 427 | # the build is assumed. |
| 428 | "branchName": "A String", # Name of the branch to build. |
| 429 | "commitSha": "A String", # Explicit commit SHA to build. |
| 430 | "tagName": "A String", # Name of the tag to build. |
| 431 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 432 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 433 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 434 | "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was |
| 435 | # triggered automatically. |
| 436 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 437 | "steps": [ # Describes the operations to be performed on the workspace. |
| 438 | { # BuildStep describes a step to perform in the build pipeline. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 439 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 440 | # This build step will not start until all the build steps in wait_for |
| 441 | # have completed successfully. If wait_for is empty, this build step will |
| 442 | # start when all previous build steps in the Build.Steps list have completed |
| 443 | # successfully. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 444 | "A String", |
| 445 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 446 | "name": "A String", # The name of the container image that will run this particular build step. |
| 447 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 448 | # If the image is already available in the host's Docker daemon's cache, it |
| 449 | # will be run directly. If not, the host will attempt to pull the image |
| 450 | # first, using the builder service account's credentials if necessary. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 451 | # |
| 452 | # The Docker daemon's cache will already have the latest versions of all of |
| 453 | # the officially supported build steps |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 454 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 455 | # The Docker daemon will also have cached many of the layers for some popular |
| 456 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 457 | # attempt to use them. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 458 | # |
| 459 | # If you built an image in a previous build step, it will be stored in the |
| 460 | # host's Docker daemon's cache and is available to use as the name for a |
| 461 | # later build step. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 462 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 463 | # |
| 464 | # If the image used to run the step's container has an entrypoint, these args |
| 465 | # will be used as arguments to that entrypoint. If the image does not define |
| 466 | # an entrypoint, the first element in args will be used as the entrypoint, |
| 467 | # and the remainder will be used as arguments. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 468 | "A String", |
| 469 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 470 | "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default |
| 471 | # If unset, the image's default will be used. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 472 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 473 | # |
| 474 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 475 | # being given the value "VALUE". |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 476 | "A String", |
| 477 | ], |
| 478 | "id": "A String", # Optional unique identifier for this build step, used in wait_for to |
| 479 | # reference this build step as a dependency. |
| 480 | "dir": "A String", # Working directory (relative to project source root) to use when running |
| 481 | # this operation's container. |
| 482 | }, |
| 483 | ], |
| 484 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source. |
| 485 | # @OutputOnly |
| 486 | # some source was used for this build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 487 | "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any |
| 488 | # revisions resolved. |
| 489 | # Repository. |
| 490 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 491 | # the build is assumed. |
| 492 | "branchName": "A String", # Name of the branch to build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 493 | "commitSha": "A String", # Explicit commit SHA to build. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 494 | "tagName": "A String", # Name of the tag to build. |
| 495 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 496 | }, |
| 497 | "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original |
| 498 | # source integrity was maintained in the build. Note that FileHashes will |
| 499 | # only be populated if BuildOptions has requested a SourceProvenanceHash. |
| 500 | # |
| 501 | # The keys to this map are file paths used as build source and the values |
| 502 | # contain the hash values for those files. |
| 503 | # |
| 504 | # If the build source came in a single package such as a gzipped tarfile |
| 505 | # (.tar.gz), the FileHash will be for the single path to that file. |
| 506 | # @OutputOnly |
| 507 | "a_key": { # Container message for hashes of byte content of files, used in |
| 508 | # SourceProvenance messages to verify integrity of source input to the build. |
| 509 | "fileHash": [ # Collection of file hashes. |
| 510 | { # Container message for hash values. |
| 511 | "type": "A String", # The type of hash that was performed. |
| 512 | "value": "A String", # The hash value. |
| 513 | }, |
| 514 | ], |
| 515 | }, |
| 516 | }, |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 517 | "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any |
| 518 | # generations resolved. |
| 519 | # Google Cloud Storage. |
| 520 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 521 | # omitted, the latest generation will be used. |
| 522 | "object": "A String", # Google Cloud Storage object containing source. |
| 523 | # |
| 524 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 525 | # build. |
| 526 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 527 | # [Bucket Name |
| 528 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 529 | }, |
| 530 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 531 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 532 | # [Bucket Name |
| 533 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 534 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 535 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 536 | # steps. |
| 537 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 538 | # The images will be pushed using the builder service account's credentials. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 539 | # |
| 540 | # The digests of the pushed images will be stored in the Build resource's |
| 541 | # results field. |
| 542 | # |
| 543 | # If any of the images fail to be pushed, the build is marked FAILURE. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 544 | "A String", |
| 545 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 546 | "substitutions": { # Substitutions data for Build resource. |
| 547 | "a_key": "A String", |
| 548 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 549 | "createTime": "A String", # Time at which the request to create the build was received. |
| 550 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 551 | "logUrl": "A String", # URL to logs for this build in Google Cloud Logging. |
| 552 | # @OutputOnly |
| 553 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 554 | "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build. |
| 555 | # |
| 556 | # Branch and tag names in trigger templates are interpreted as regular |
| 557 | # expressions. Any branch or tag change that matches that regular expression |
| 558 | # will trigger a build. |
| 559 | # Repository. |
| 560 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 561 | # the build is assumed. |
| 562 | "branchName": "A String", # Name of the branch to build. |
| 563 | "commitSha": "A String", # Explicit commit SHA to build. |
| 564 | "tagName": "A String", # Name of the tag to build. |
| 565 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 566 | }, |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 567 | "id": "A String", # Unique identifier of the trigger. |
| 568 | # |
| 569 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 570 | }</pre> |
| 571 | </div> |
| 572 | |
| 573 | <div class="method"> |
| 574 | <code class="details" id="delete">delete(projectId, triggerId, x__xgafv=None)</code> |
| 575 | <pre>Deletes an BuildTrigger by its project ID and trigger ID. |
| 576 | |
| 577 | This API is experimental. |
| 578 | |
| 579 | Args: |
| 580 | projectId: string, ID of the project that owns the trigger. (required) |
| 581 | triggerId: string, ID of the BuildTrigger to delete. (required) |
| 582 | x__xgafv: string, V1 error format. |
| 583 | Allowed values |
| 584 | 1 - v1 error format |
| 585 | 2 - v2 error format |
| 586 | |
| 587 | Returns: |
| 588 | An object of the form: |
| 589 | |
| 590 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 591 | # empty messages in your APIs. A typical example is to use it as the request |
| 592 | # or the response type of an API method. For instance: |
| 593 | # |
| 594 | # service Foo { |
| 595 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 596 | # } |
| 597 | # |
| 598 | # The JSON representation for `Empty` is empty JSON object `{}`. |
| 599 | }</pre> |
| 600 | </div> |
| 601 | |
| 602 | <div class="method"> |
| 603 | <code class="details" id="get">get(projectId, triggerId, x__xgafv=None)</code> |
| 604 | <pre>Gets information about a BuildTrigger. |
| 605 | |
| 606 | This API is experimental. |
| 607 | |
| 608 | Args: |
| 609 | projectId: string, ID of the project that owns the trigger. (required) |
| 610 | triggerId: string, ID of the BuildTrigger to get. (required) |
| 611 | x__xgafv: string, V1 error format. |
| 612 | Allowed values |
| 613 | 1 - v1 error format |
| 614 | 2 - v2 error format |
| 615 | |
| 616 | Returns: |
| 617 | An object of the form: |
| 618 | |
| 619 | { # Configuration for an automated build in response to source repository |
| 620 | # changes. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 621 | "description": "A String", # Human-readable description of this trigger. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 622 | "createTime": "A String", # Time when the trigger was created. |
| 623 | # |
| 624 | # @OutputOnly |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 625 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 626 | # template. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 627 | "disabled": True or False, # If true, the trigger will never result in a build. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 628 | "substitutions": { # Substitutions data for Build resource. |
| 629 | "a_key": "A String", |
| 630 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 631 | "build": { # A build resource in the Container Builder API. # Contents of the build template. |
| 632 | # |
| 633 | # At a high level, a Build describes where to find source code, how to build |
| 634 | # it (for example, the builder image to run on the source), and what tag to |
| 635 | # apply to the built image when it is pushed to Google Container Registry. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 636 | # |
| 637 | # Fields can include the following variables which will be expanded when the |
| 638 | # build is created: |
| 639 | # |
| 640 | # - $PROJECT_ID: the project ID of the build. |
| 641 | # - $BUILD_ID: the autogenerated ID of the build. |
| 642 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 643 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 644 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 645 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 646 | # resolved from the specified branch or tag. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 647 | "finishTime": "A String", # Time at which execution of the build was finished. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 648 | # |
| 649 | # The difference between finish_time and start_time is the duration of the |
| 650 | # build's execution. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 651 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 652 | "status": "A String", # Status of the build. |
| 653 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 654 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 655 | # granularity. If this amount of time elapses, work on the build will cease |
| 656 | # and the build status will be TIMEOUT. |
| 657 | # |
| 658 | # Default time is ten minutes. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 659 | "startTime": "A String", # Time at which execution of the build was started. |
| 660 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 661 | "projectId": "A String", # ID of the project. |
| 662 | # @OutputOnly. |
| 663 | "id": "A String", # Unique identifier of the build. |
| 664 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 665 | "results": { # Results describes the artifacts created by the build pipeline. # Results of the build. |
| 666 | # @OutputOnly |
| 667 | "images": [ # Images that were built as a part of the build. |
| 668 | { # BuiltImage describes an image built by the pipeline. |
| 669 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 670 | # presented to `docker push`. |
| 671 | "digest": "A String", # Docker Registry 2.0 digest. |
| 672 | }, |
| 673 | ], |
| 674 | "buildStepImages": [ # List of build step digests, in order corresponding to build step indices. |
| 675 | "A String", |
| 676 | ], |
| 677 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 678 | "statusDetail": "A String", # Customer-readable message about the current status. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 679 | # @OutputOnly |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 680 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 681 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 682 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 683 | "A String", |
| 684 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 685 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 686 | "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build. |
| 687 | # service. |
| 688 | "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud |
| 689 | # Storage. |
| 690 | # Google Cloud Storage. |
| 691 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 692 | # omitted, the latest generation will be used. |
| 693 | "object": "A String", # Google Cloud Storage object containing source. |
| 694 | # |
| 695 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 696 | # build. |
| 697 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 698 | # [Bucket Name |
| 699 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 700 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 701 | "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo. |
| 702 | # Repository. |
| 703 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 704 | # the build is assumed. |
| 705 | "branchName": "A String", # Name of the branch to build. |
| 706 | "commitSha": "A String", # Explicit commit SHA to build. |
| 707 | "tagName": "A String", # Name of the tag to build. |
| 708 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 709 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 710 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 711 | "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was |
| 712 | # triggered automatically. |
| 713 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 714 | "steps": [ # Describes the operations to be performed on the workspace. |
| 715 | { # BuildStep describes a step to perform in the build pipeline. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 716 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 717 | # This build step will not start until all the build steps in wait_for |
| 718 | # have completed successfully. If wait_for is empty, this build step will |
| 719 | # start when all previous build steps in the Build.Steps list have completed |
| 720 | # successfully. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 721 | "A String", |
| 722 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 723 | "name": "A String", # The name of the container image that will run this particular build step. |
| 724 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 725 | # If the image is already available in the host's Docker daemon's cache, it |
| 726 | # will be run directly. If not, the host will attempt to pull the image |
| 727 | # first, using the builder service account's credentials if necessary. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 728 | # |
| 729 | # The Docker daemon's cache will already have the latest versions of all of |
| 730 | # the officially supported build steps |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 731 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 732 | # The Docker daemon will also have cached many of the layers for some popular |
| 733 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 734 | # attempt to use them. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 735 | # |
| 736 | # If you built an image in a previous build step, it will be stored in the |
| 737 | # host's Docker daemon's cache and is available to use as the name for a |
| 738 | # later build step. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 739 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 740 | # |
| 741 | # If the image used to run the step's container has an entrypoint, these args |
| 742 | # will be used as arguments to that entrypoint. If the image does not define |
| 743 | # an entrypoint, the first element in args will be used as the entrypoint, |
| 744 | # and the remainder will be used as arguments. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 745 | "A String", |
| 746 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 747 | "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default |
| 748 | # If unset, the image's default will be used. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 749 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 750 | # |
| 751 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 752 | # being given the value "VALUE". |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 753 | "A String", |
| 754 | ], |
| 755 | "id": "A String", # Optional unique identifier for this build step, used in wait_for to |
| 756 | # reference this build step as a dependency. |
| 757 | "dir": "A String", # Working directory (relative to project source root) to use when running |
| 758 | # this operation's container. |
| 759 | }, |
| 760 | ], |
| 761 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source. |
| 762 | # @OutputOnly |
| 763 | # some source was used for this build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 764 | "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any |
| 765 | # revisions resolved. |
| 766 | # Repository. |
| 767 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 768 | # the build is assumed. |
| 769 | "branchName": "A String", # Name of the branch to build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 770 | "commitSha": "A String", # Explicit commit SHA to build. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 771 | "tagName": "A String", # Name of the tag to build. |
| 772 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 773 | }, |
| 774 | "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original |
| 775 | # source integrity was maintained in the build. Note that FileHashes will |
| 776 | # only be populated if BuildOptions has requested a SourceProvenanceHash. |
| 777 | # |
| 778 | # The keys to this map are file paths used as build source and the values |
| 779 | # contain the hash values for those files. |
| 780 | # |
| 781 | # If the build source came in a single package such as a gzipped tarfile |
| 782 | # (.tar.gz), the FileHash will be for the single path to that file. |
| 783 | # @OutputOnly |
| 784 | "a_key": { # Container message for hashes of byte content of files, used in |
| 785 | # SourceProvenance messages to verify integrity of source input to the build. |
| 786 | "fileHash": [ # Collection of file hashes. |
| 787 | { # Container message for hash values. |
| 788 | "type": "A String", # The type of hash that was performed. |
| 789 | "value": "A String", # The hash value. |
| 790 | }, |
| 791 | ], |
| 792 | }, |
| 793 | }, |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 794 | "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any |
| 795 | # generations resolved. |
| 796 | # Google Cloud Storage. |
| 797 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 798 | # omitted, the latest generation will be used. |
| 799 | "object": "A String", # Google Cloud Storage object containing source. |
| 800 | # |
| 801 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 802 | # build. |
| 803 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 804 | # [Bucket Name |
| 805 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 806 | }, |
| 807 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 808 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 809 | # [Bucket Name |
| 810 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 811 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 812 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 813 | # steps. |
| 814 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 815 | # The images will be pushed using the builder service account's credentials. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 816 | # |
| 817 | # The digests of the pushed images will be stored in the Build resource's |
| 818 | # results field. |
| 819 | # |
| 820 | # If any of the images fail to be pushed, the build is marked FAILURE. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 821 | "A String", |
| 822 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 823 | "substitutions": { # Substitutions data for Build resource. |
| 824 | "a_key": "A String", |
| 825 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 826 | "createTime": "A String", # Time at which the request to create the build was received. |
| 827 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 828 | "logUrl": "A String", # URL to logs for this build in Google Cloud Logging. |
| 829 | # @OutputOnly |
| 830 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 831 | "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build. |
| 832 | # |
| 833 | # Branch and tag names in trigger templates are interpreted as regular |
| 834 | # expressions. Any branch or tag change that matches that regular expression |
| 835 | # will trigger a build. |
| 836 | # Repository. |
| 837 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 838 | # the build is assumed. |
| 839 | "branchName": "A String", # Name of the branch to build. |
| 840 | "commitSha": "A String", # Explicit commit SHA to build. |
| 841 | "tagName": "A String", # Name of the tag to build. |
| 842 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 843 | }, |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 844 | "id": "A String", # Unique identifier of the trigger. |
| 845 | # |
| 846 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 847 | }</pre> |
| 848 | </div> |
| 849 | |
| 850 | <div class="method"> |
| 851 | <code class="details" id="list">list(projectId, x__xgafv=None)</code> |
| 852 | <pre>Lists existing BuildTrigger. |
| 853 | |
| 854 | This API is experimental. |
| 855 | |
| 856 | Args: |
| 857 | projectId: string, ID of the project for which to list BuildTriggers. (required) |
| 858 | x__xgafv: string, V1 error format. |
| 859 | Allowed values |
| 860 | 1 - v1 error format |
| 861 | 2 - v2 error format |
| 862 | |
| 863 | Returns: |
| 864 | An object of the form: |
| 865 | |
| 866 | { # Response containing existing BuildTriggers. |
| 867 | "triggers": [ # BuildTriggers for the project, sorted by create_time descending. |
| 868 | { # Configuration for an automated build in response to source repository |
| 869 | # changes. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 870 | "description": "A String", # Human-readable description of this trigger. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 871 | "createTime": "A String", # Time when the trigger was created. |
| 872 | # |
| 873 | # @OutputOnly |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 874 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 875 | # template. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 876 | "disabled": True or False, # If true, the trigger will never result in a build. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 877 | "substitutions": { # Substitutions data for Build resource. |
| 878 | "a_key": "A String", |
| 879 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 880 | "build": { # A build resource in the Container Builder API. # Contents of the build template. |
| 881 | # |
| 882 | # At a high level, a Build describes where to find source code, how to build |
| 883 | # it (for example, the builder image to run on the source), and what tag to |
| 884 | # apply to the built image when it is pushed to Google Container Registry. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 885 | # |
| 886 | # Fields can include the following variables which will be expanded when the |
| 887 | # build is created: |
| 888 | # |
| 889 | # - $PROJECT_ID: the project ID of the build. |
| 890 | # - $BUILD_ID: the autogenerated ID of the build. |
| 891 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 892 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 893 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 894 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 895 | # resolved from the specified branch or tag. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 896 | "finishTime": "A String", # Time at which execution of the build was finished. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 897 | # |
| 898 | # The difference between finish_time and start_time is the duration of the |
| 899 | # build's execution. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 900 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 901 | "status": "A String", # Status of the build. |
| 902 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 903 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 904 | # granularity. If this amount of time elapses, work on the build will cease |
| 905 | # and the build status will be TIMEOUT. |
| 906 | # |
| 907 | # Default time is ten minutes. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 908 | "startTime": "A String", # Time at which execution of the build was started. |
| 909 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 910 | "projectId": "A String", # ID of the project. |
| 911 | # @OutputOnly. |
| 912 | "id": "A String", # Unique identifier of the build. |
| 913 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 914 | "results": { # Results describes the artifacts created by the build pipeline. # Results of the build. |
| 915 | # @OutputOnly |
| 916 | "images": [ # Images that were built as a part of the build. |
| 917 | { # BuiltImage describes an image built by the pipeline. |
| 918 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 919 | # presented to `docker push`. |
| 920 | "digest": "A String", # Docker Registry 2.0 digest. |
| 921 | }, |
| 922 | ], |
| 923 | "buildStepImages": [ # List of build step digests, in order corresponding to build step indices. |
| 924 | "A String", |
| 925 | ], |
| 926 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 927 | "statusDetail": "A String", # Customer-readable message about the current status. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 928 | # @OutputOnly |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 929 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 930 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 931 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 932 | "A String", |
| 933 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 934 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 935 | "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build. |
| 936 | # service. |
| 937 | "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud |
| 938 | # Storage. |
| 939 | # Google Cloud Storage. |
| 940 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 941 | # omitted, the latest generation will be used. |
| 942 | "object": "A String", # Google Cloud Storage object containing source. |
| 943 | # |
| 944 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 945 | # build. |
| 946 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 947 | # [Bucket Name |
| 948 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 949 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 950 | "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo. |
| 951 | # Repository. |
| 952 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 953 | # the build is assumed. |
| 954 | "branchName": "A String", # Name of the branch to build. |
| 955 | "commitSha": "A String", # Explicit commit SHA to build. |
| 956 | "tagName": "A String", # Name of the tag to build. |
| 957 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 958 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 959 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 960 | "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was |
| 961 | # triggered automatically. |
| 962 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 963 | "steps": [ # Describes the operations to be performed on the workspace. |
| 964 | { # BuildStep describes a step to perform in the build pipeline. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 965 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 966 | # This build step will not start until all the build steps in wait_for |
| 967 | # have completed successfully. If wait_for is empty, this build step will |
| 968 | # start when all previous build steps in the Build.Steps list have completed |
| 969 | # successfully. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 970 | "A String", |
| 971 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 972 | "name": "A String", # The name of the container image that will run this particular build step. |
| 973 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 974 | # If the image is already available in the host's Docker daemon's cache, it |
| 975 | # will be run directly. If not, the host will attempt to pull the image |
| 976 | # first, using the builder service account's credentials if necessary. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 977 | # |
| 978 | # The Docker daemon's cache will already have the latest versions of all of |
| 979 | # the officially supported build steps |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 980 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 981 | # The Docker daemon will also have cached many of the layers for some popular |
| 982 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 983 | # attempt to use them. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 984 | # |
| 985 | # If you built an image in a previous build step, it will be stored in the |
| 986 | # host's Docker daemon's cache and is available to use as the name for a |
| 987 | # later build step. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 988 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 989 | # |
| 990 | # If the image used to run the step's container has an entrypoint, these args |
| 991 | # will be used as arguments to that entrypoint. If the image does not define |
| 992 | # an entrypoint, the first element in args will be used as the entrypoint, |
| 993 | # and the remainder will be used as arguments. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 994 | "A String", |
| 995 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 996 | "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default |
| 997 | # If unset, the image's default will be used. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 998 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 999 | # |
| 1000 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 1001 | # being given the value "VALUE". |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1002 | "A String", |
| 1003 | ], |
| 1004 | "id": "A String", # Optional unique identifier for this build step, used in wait_for to |
| 1005 | # reference this build step as a dependency. |
| 1006 | "dir": "A String", # Working directory (relative to project source root) to use when running |
| 1007 | # this operation's container. |
| 1008 | }, |
| 1009 | ], |
| 1010 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source. |
| 1011 | # @OutputOnly |
| 1012 | # some source was used for this build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1013 | "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any |
| 1014 | # revisions resolved. |
| 1015 | # Repository. |
| 1016 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 1017 | # the build is assumed. |
| 1018 | "branchName": "A String", # Name of the branch to build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1019 | "commitSha": "A String", # Explicit commit SHA to build. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 1020 | "tagName": "A String", # Name of the tag to build. |
| 1021 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1022 | }, |
| 1023 | "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original |
| 1024 | # source integrity was maintained in the build. Note that FileHashes will |
| 1025 | # only be populated if BuildOptions has requested a SourceProvenanceHash. |
| 1026 | # |
| 1027 | # The keys to this map are file paths used as build source and the values |
| 1028 | # contain the hash values for those files. |
| 1029 | # |
| 1030 | # If the build source came in a single package such as a gzipped tarfile |
| 1031 | # (.tar.gz), the FileHash will be for the single path to that file. |
| 1032 | # @OutputOnly |
| 1033 | "a_key": { # Container message for hashes of byte content of files, used in |
| 1034 | # SourceProvenance messages to verify integrity of source input to the build. |
| 1035 | "fileHash": [ # Collection of file hashes. |
| 1036 | { # Container message for hash values. |
| 1037 | "type": "A String", # The type of hash that was performed. |
| 1038 | "value": "A String", # The hash value. |
| 1039 | }, |
| 1040 | ], |
| 1041 | }, |
| 1042 | }, |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1043 | "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any |
| 1044 | # generations resolved. |
| 1045 | # Google Cloud Storage. |
| 1046 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1047 | # omitted, the latest generation will be used. |
| 1048 | "object": "A String", # Google Cloud Storage object containing source. |
| 1049 | # |
| 1050 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 1051 | # build. |
| 1052 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 1053 | # [Bucket Name |
| 1054 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1055 | }, |
| 1056 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1057 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 1058 | # [Bucket Name |
| 1059 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1060 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1061 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 1062 | # steps. |
| 1063 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1064 | # The images will be pushed using the builder service account's credentials. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1065 | # |
| 1066 | # The digests of the pushed images will be stored in the Build resource's |
| 1067 | # results field. |
| 1068 | # |
| 1069 | # If any of the images fail to be pushed, the build is marked FAILURE. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1070 | "A String", |
| 1071 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1072 | "substitutions": { # Substitutions data for Build resource. |
| 1073 | "a_key": "A String", |
| 1074 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1075 | "createTime": "A String", # Time at which the request to create the build was received. |
| 1076 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1077 | "logUrl": "A String", # URL to logs for this build in Google Cloud Logging. |
| 1078 | # @OutputOnly |
| 1079 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 1080 | "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build. |
| 1081 | # |
| 1082 | # Branch and tag names in trigger templates are interpreted as regular |
| 1083 | # expressions. Any branch or tag change that matches that regular expression |
| 1084 | # will trigger a build. |
| 1085 | # Repository. |
| 1086 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 1087 | # the build is assumed. |
| 1088 | "branchName": "A String", # Name of the branch to build. |
| 1089 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1090 | "tagName": "A String", # Name of the tag to build. |
| 1091 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 1092 | }, |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1093 | "id": "A String", # Unique identifier of the trigger. |
| 1094 | # |
| 1095 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1096 | }, |
| 1097 | ], |
| 1098 | }</pre> |
| 1099 | </div> |
| 1100 | |
| 1101 | <div class="method"> |
| 1102 | <code class="details" id="patch">patch(projectId, triggerId, body, x__xgafv=None)</code> |
| 1103 | <pre>Updates an BuildTrigger by its project ID and trigger ID. |
| 1104 | |
| 1105 | This API is experimental. |
| 1106 | |
| 1107 | Args: |
| 1108 | projectId: string, ID of the project that owns the trigger. (required) |
| 1109 | triggerId: string, ID of the BuildTrigger to update. (required) |
| 1110 | body: object, The request body. (required) |
| 1111 | The object takes the form of: |
| 1112 | |
| 1113 | { # Configuration for an automated build in response to source repository |
| 1114 | # changes. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1115 | "description": "A String", # Human-readable description of this trigger. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1116 | "createTime": "A String", # Time when the trigger was created. |
| 1117 | # |
| 1118 | # @OutputOnly |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 1119 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 1120 | # template. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1121 | "disabled": True or False, # If true, the trigger will never result in a build. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1122 | "substitutions": { # Substitutions data for Build resource. |
| 1123 | "a_key": "A String", |
| 1124 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1125 | "build": { # A build resource in the Container Builder API. # Contents of the build template. |
| 1126 | # |
| 1127 | # At a high level, a Build describes where to find source code, how to build |
| 1128 | # it (for example, the builder image to run on the source), and what tag to |
| 1129 | # apply to the built image when it is pushed to Google Container Registry. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1130 | # |
| 1131 | # Fields can include the following variables which will be expanded when the |
| 1132 | # build is created: |
| 1133 | # |
| 1134 | # - $PROJECT_ID: the project ID of the build. |
| 1135 | # - $BUILD_ID: the autogenerated ID of the build. |
| 1136 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 1137 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 1138 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 1139 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 1140 | # resolved from the specified branch or tag. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1141 | "finishTime": "A String", # Time at which execution of the build was finished. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1142 | # |
| 1143 | # The difference between finish_time and start_time is the duration of the |
| 1144 | # build's execution. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1145 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1146 | "status": "A String", # Status of the build. |
| 1147 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1148 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 1149 | # granularity. If this amount of time elapses, work on the build will cease |
| 1150 | # and the build status will be TIMEOUT. |
| 1151 | # |
| 1152 | # Default time is ten minutes. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1153 | "startTime": "A String", # Time at which execution of the build was started. |
| 1154 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1155 | "projectId": "A String", # ID of the project. |
| 1156 | # @OutputOnly. |
| 1157 | "id": "A String", # Unique identifier of the build. |
| 1158 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1159 | "results": { # Results describes the artifacts created by the build pipeline. # Results of the build. |
| 1160 | # @OutputOnly |
| 1161 | "images": [ # Images that were built as a part of the build. |
| 1162 | { # BuiltImage describes an image built by the pipeline. |
| 1163 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 1164 | # presented to `docker push`. |
| 1165 | "digest": "A String", # Docker Registry 2.0 digest. |
| 1166 | }, |
| 1167 | ], |
| 1168 | "buildStepImages": [ # List of build step digests, in order corresponding to build step indices. |
| 1169 | "A String", |
| 1170 | ], |
| 1171 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1172 | "statusDetail": "A String", # Customer-readable message about the current status. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1173 | # @OutputOnly |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1174 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 1175 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 1176 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 1177 | "A String", |
| 1178 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1179 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1180 | "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build. |
| 1181 | # service. |
| 1182 | "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud |
| 1183 | # Storage. |
| 1184 | # Google Cloud Storage. |
| 1185 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1186 | # omitted, the latest generation will be used. |
| 1187 | "object": "A String", # Google Cloud Storage object containing source. |
| 1188 | # |
| 1189 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 1190 | # build. |
| 1191 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 1192 | # [Bucket Name |
| 1193 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1194 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 1195 | "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo. |
| 1196 | # Repository. |
| 1197 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 1198 | # the build is assumed. |
| 1199 | "branchName": "A String", # Name of the branch to build. |
| 1200 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1201 | "tagName": "A String", # Name of the tag to build. |
| 1202 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 1203 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1204 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1205 | "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was |
| 1206 | # triggered automatically. |
| 1207 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1208 | "steps": [ # Describes the operations to be performed on the workspace. |
| 1209 | { # BuildStep describes a step to perform in the build pipeline. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1210 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 1211 | # This build step will not start until all the build steps in wait_for |
| 1212 | # have completed successfully. If wait_for is empty, this build step will |
| 1213 | # start when all previous build steps in the Build.Steps list have completed |
| 1214 | # successfully. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1215 | "A String", |
| 1216 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1217 | "name": "A String", # The name of the container image that will run this particular build step. |
| 1218 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1219 | # If the image is already available in the host's Docker daemon's cache, it |
| 1220 | # will be run directly. If not, the host will attempt to pull the image |
| 1221 | # first, using the builder service account's credentials if necessary. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1222 | # |
| 1223 | # The Docker daemon's cache will already have the latest versions of all of |
| 1224 | # the officially supported build steps |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1225 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 1226 | # The Docker daemon will also have cached many of the layers for some popular |
| 1227 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 1228 | # attempt to use them. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1229 | # |
| 1230 | # If you built an image in a previous build step, it will be stored in the |
| 1231 | # host's Docker daemon's cache and is available to use as the name for a |
| 1232 | # later build step. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1233 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 1234 | # |
| 1235 | # If the image used to run the step's container has an entrypoint, these args |
| 1236 | # will be used as arguments to that entrypoint. If the image does not define |
| 1237 | # an entrypoint, the first element in args will be used as the entrypoint, |
| 1238 | # and the remainder will be used as arguments. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1239 | "A String", |
| 1240 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1241 | "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default |
| 1242 | # If unset, the image's default will be used. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1243 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 1244 | # |
| 1245 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 1246 | # being given the value "VALUE". |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1247 | "A String", |
| 1248 | ], |
| 1249 | "id": "A String", # Optional unique identifier for this build step, used in wait_for to |
| 1250 | # reference this build step as a dependency. |
| 1251 | "dir": "A String", # Working directory (relative to project source root) to use when running |
| 1252 | # this operation's container. |
| 1253 | }, |
| 1254 | ], |
| 1255 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source. |
| 1256 | # @OutputOnly |
| 1257 | # some source was used for this build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1258 | "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any |
| 1259 | # revisions resolved. |
| 1260 | # Repository. |
| 1261 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 1262 | # the build is assumed. |
| 1263 | "branchName": "A String", # Name of the branch to build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1264 | "commitSha": "A String", # Explicit commit SHA to build. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 1265 | "tagName": "A String", # Name of the tag to build. |
| 1266 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1267 | }, |
| 1268 | "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original |
| 1269 | # source integrity was maintained in the build. Note that FileHashes will |
| 1270 | # only be populated if BuildOptions has requested a SourceProvenanceHash. |
| 1271 | # |
| 1272 | # The keys to this map are file paths used as build source and the values |
| 1273 | # contain the hash values for those files. |
| 1274 | # |
| 1275 | # If the build source came in a single package such as a gzipped tarfile |
| 1276 | # (.tar.gz), the FileHash will be for the single path to that file. |
| 1277 | # @OutputOnly |
| 1278 | "a_key": { # Container message for hashes of byte content of files, used in |
| 1279 | # SourceProvenance messages to verify integrity of source input to the build. |
| 1280 | "fileHash": [ # Collection of file hashes. |
| 1281 | { # Container message for hash values. |
| 1282 | "type": "A String", # The type of hash that was performed. |
| 1283 | "value": "A String", # The hash value. |
| 1284 | }, |
| 1285 | ], |
| 1286 | }, |
| 1287 | }, |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1288 | "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any |
| 1289 | # generations resolved. |
| 1290 | # Google Cloud Storage. |
| 1291 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1292 | # omitted, the latest generation will be used. |
| 1293 | "object": "A String", # Google Cloud Storage object containing source. |
| 1294 | # |
| 1295 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 1296 | # build. |
| 1297 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 1298 | # [Bucket Name |
| 1299 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1300 | }, |
| 1301 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1302 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 1303 | # [Bucket Name |
| 1304 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1305 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1306 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 1307 | # steps. |
| 1308 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1309 | # The images will be pushed using the builder service account's credentials. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1310 | # |
| 1311 | # The digests of the pushed images will be stored in the Build resource's |
| 1312 | # results field. |
| 1313 | # |
| 1314 | # If any of the images fail to be pushed, the build is marked FAILURE. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1315 | "A String", |
| 1316 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1317 | "substitutions": { # Substitutions data for Build resource. |
| 1318 | "a_key": "A String", |
| 1319 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1320 | "createTime": "A String", # Time at which the request to create the build was received. |
| 1321 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1322 | "logUrl": "A String", # URL to logs for this build in Google Cloud Logging. |
| 1323 | # @OutputOnly |
| 1324 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 1325 | "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build. |
| 1326 | # |
| 1327 | # Branch and tag names in trigger templates are interpreted as regular |
| 1328 | # expressions. Any branch or tag change that matches that regular expression |
| 1329 | # will trigger a build. |
| 1330 | # Repository. |
| 1331 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 1332 | # the build is assumed. |
| 1333 | "branchName": "A String", # Name of the branch to build. |
| 1334 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1335 | "tagName": "A String", # Name of the tag to build. |
| 1336 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 1337 | }, |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1338 | "id": "A String", # Unique identifier of the trigger. |
| 1339 | # |
| 1340 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1341 | } |
| 1342 | |
| 1343 | x__xgafv: string, V1 error format. |
| 1344 | Allowed values |
| 1345 | 1 - v1 error format |
| 1346 | 2 - v2 error format |
| 1347 | |
| 1348 | Returns: |
| 1349 | An object of the form: |
| 1350 | |
| 1351 | { # Configuration for an automated build in response to source repository |
| 1352 | # changes. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1353 | "description": "A String", # Human-readable description of this trigger. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1354 | "createTime": "A String", # Time when the trigger was created. |
| 1355 | # |
| 1356 | # @OutputOnly |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 1357 | "filename": "A String", # Path, from the source root, to a file whose contents is used for the |
| 1358 | # template. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1359 | "disabled": True or False, # If true, the trigger will never result in a build. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1360 | "substitutions": { # Substitutions data for Build resource. |
| 1361 | "a_key": "A String", |
| 1362 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1363 | "build": { # A build resource in the Container Builder API. # Contents of the build template. |
| 1364 | # |
| 1365 | # At a high level, a Build describes where to find source code, how to build |
| 1366 | # it (for example, the builder image to run on the source), and what tag to |
| 1367 | # apply to the built image when it is pushed to Google Container Registry. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1368 | # |
| 1369 | # Fields can include the following variables which will be expanded when the |
| 1370 | # build is created: |
| 1371 | # |
| 1372 | # - $PROJECT_ID: the project ID of the build. |
| 1373 | # - $BUILD_ID: the autogenerated ID of the build. |
| 1374 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 1375 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 1376 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 1377 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 1378 | # resolved from the specified branch or tag. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1379 | "finishTime": "A String", # Time at which execution of the build was finished. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1380 | # |
| 1381 | # The difference between finish_time and start_time is the duration of the |
| 1382 | # build's execution. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1383 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1384 | "status": "A String", # Status of the build. |
| 1385 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1386 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 1387 | # granularity. If this amount of time elapses, work on the build will cease |
| 1388 | # and the build status will be TIMEOUT. |
| 1389 | # |
| 1390 | # Default time is ten minutes. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1391 | "startTime": "A String", # Time at which execution of the build was started. |
| 1392 | # @OutputOnly |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1393 | "projectId": "A String", # ID of the project. |
| 1394 | # @OutputOnly. |
| 1395 | "id": "A String", # Unique identifier of the build. |
| 1396 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1397 | "results": { # Results describes the artifacts created by the build pipeline. # Results of the build. |
| 1398 | # @OutputOnly |
| 1399 | "images": [ # Images that were built as a part of the build. |
| 1400 | { # BuiltImage describes an image built by the pipeline. |
| 1401 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 1402 | # presented to `docker push`. |
| 1403 | "digest": "A String", # Docker Registry 2.0 digest. |
| 1404 | }, |
| 1405 | ], |
| 1406 | "buildStepImages": [ # List of build step digests, in order corresponding to build step indices. |
| 1407 | "A String", |
| 1408 | ], |
| 1409 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1410 | "statusDetail": "A String", # Customer-readable message about the current status. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1411 | # @OutputOnly |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1412 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
| 1413 | "requestedVerifyOption": "A String", # Requested verifiability options. |
| 1414 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 1415 | "A String", |
| 1416 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1417 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1418 | "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build. |
| 1419 | # service. |
| 1420 | "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud |
| 1421 | # Storage. |
| 1422 | # Google Cloud Storage. |
| 1423 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1424 | # omitted, the latest generation will be used. |
| 1425 | "object": "A String", # Google Cloud Storage object containing source. |
| 1426 | # |
| 1427 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 1428 | # build. |
| 1429 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 1430 | # [Bucket Name |
| 1431 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1432 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 1433 | "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo. |
| 1434 | # Repository. |
| 1435 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 1436 | # the build is assumed. |
| 1437 | "branchName": "A String", # Name of the branch to build. |
| 1438 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1439 | "tagName": "A String", # Name of the tag to build. |
| 1440 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 1441 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1442 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1443 | "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was |
| 1444 | # triggered automatically. |
| 1445 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1446 | "steps": [ # Describes the operations to be performed on the workspace. |
| 1447 | { # BuildStep describes a step to perform in the build pipeline. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1448 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 1449 | # This build step will not start until all the build steps in wait_for |
| 1450 | # have completed successfully. If wait_for is empty, this build step will |
| 1451 | # start when all previous build steps in the Build.Steps list have completed |
| 1452 | # successfully. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1453 | "A String", |
| 1454 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1455 | "name": "A String", # The name of the container image that will run this particular build step. |
| 1456 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1457 | # If the image is already available in the host's Docker daemon's cache, it |
| 1458 | # will be run directly. If not, the host will attempt to pull the image |
| 1459 | # first, using the builder service account's credentials if necessary. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1460 | # |
| 1461 | # The Docker daemon's cache will already have the latest versions of all of |
| 1462 | # the officially supported build steps |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1463 | # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). |
| 1464 | # The Docker daemon will also have cached many of the layers for some popular |
| 1465 | # images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 1466 | # attempt to use them. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1467 | # |
| 1468 | # If you built an image in a previous build step, it will be stored in the |
| 1469 | # host's Docker daemon's cache and is available to use as the name for a |
| 1470 | # later build step. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1471 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 1472 | # |
| 1473 | # If the image used to run the step's container has an entrypoint, these args |
| 1474 | # will be used as arguments to that entrypoint. If the image does not define |
| 1475 | # an entrypoint, the first element in args will be used as the entrypoint, |
| 1476 | # and the remainder will be used as arguments. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1477 | "A String", |
| 1478 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1479 | "entrypoint": "A String", # Optional entrypoint to be used instead of the build step image's default |
| 1480 | # If unset, the image's default will be used. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1481 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 1482 | # |
| 1483 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 1484 | # being given the value "VALUE". |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1485 | "A String", |
| 1486 | ], |
| 1487 | "id": "A String", # Optional unique identifier for this build step, used in wait_for to |
| 1488 | # reference this build step as a dependency. |
| 1489 | "dir": "A String", # Working directory (relative to project source root) to use when running |
| 1490 | # this operation's container. |
| 1491 | }, |
| 1492 | ], |
| 1493 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source. |
| 1494 | # @OutputOnly |
| 1495 | # some source was used for this build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1496 | "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any |
| 1497 | # revisions resolved. |
| 1498 | # Repository. |
| 1499 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 1500 | # the build is assumed. |
| 1501 | "branchName": "A String", # Name of the branch to build. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1502 | "commitSha": "A String", # Explicit commit SHA to build. |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 1503 | "tagName": "A String", # Name of the tag to build. |
| 1504 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1505 | }, |
| 1506 | "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original |
| 1507 | # source integrity was maintained in the build. Note that FileHashes will |
| 1508 | # only be populated if BuildOptions has requested a SourceProvenanceHash. |
| 1509 | # |
| 1510 | # The keys to this map are file paths used as build source and the values |
| 1511 | # contain the hash values for those files. |
| 1512 | # |
| 1513 | # If the build source came in a single package such as a gzipped tarfile |
| 1514 | # (.tar.gz), the FileHash will be for the single path to that file. |
| 1515 | # @OutputOnly |
| 1516 | "a_key": { # Container message for hashes of byte content of files, used in |
| 1517 | # SourceProvenance messages to verify integrity of source input to the build. |
| 1518 | "fileHash": [ # Collection of file hashes. |
| 1519 | { # Container message for hash values. |
| 1520 | "type": "A String", # The type of hash that was performed. |
| 1521 | "value": "A String", # The hash value. |
| 1522 | }, |
| 1523 | ], |
| 1524 | }, |
| 1525 | }, |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1526 | "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any |
| 1527 | # generations resolved. |
| 1528 | # Google Cloud Storage. |
| 1529 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1530 | # omitted, the latest generation will be used. |
| 1531 | "object": "A String", # Google Cloud Storage object containing source. |
| 1532 | # |
| 1533 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 1534 | # build. |
| 1535 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 1536 | # [Bucket Name |
| 1537 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1538 | }, |
| 1539 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1540 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 1541 | # [Bucket Name |
| 1542 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1543 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1544 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 1545 | # steps. |
| 1546 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1547 | # The images will be pushed using the builder service account's credentials. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1548 | # |
| 1549 | # The digests of the pushed images will be stored in the Build resource's |
| 1550 | # results field. |
| 1551 | # |
| 1552 | # If any of the images fail to be pushed, the build is marked FAILURE. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1553 | "A String", |
| 1554 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1555 | "substitutions": { # Substitutions data for Build resource. |
| 1556 | "a_key": "A String", |
| 1557 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1558 | "createTime": "A String", # Time at which the request to create the build was received. |
| 1559 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1560 | "logUrl": "A String", # URL to logs for this build in Google Cloud Logging. |
| 1561 | # @OutputOnly |
| 1562 | }, |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame^] | 1563 | "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # Template describing the types of source changes to trigger a build. |
| 1564 | # |
| 1565 | # Branch and tag names in trigger templates are interpreted as regular |
| 1566 | # expressions. Any branch or tag change that matches that regular expression |
| 1567 | # will trigger a build. |
| 1568 | # Repository. |
| 1569 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 1570 | # the build is assumed. |
| 1571 | "branchName": "A String", # Name of the branch to build. |
| 1572 | "commitSha": "A String", # Explicit commit SHA to build. |
| 1573 | "tagName": "A String", # Name of the tag to build. |
| 1574 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 1575 | }, |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1576 | "id": "A String", # Unique identifier of the trigger. |
| 1577 | # |
| 1578 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1579 | }</pre> |
| 1580 | </div> |
| 1581 | |
| 1582 | </body></html> |