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