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