Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -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.builds.html">builds</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#cancel">cancel(projectId, id, body, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Cancels a requested build in progress.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#create">create(projectId, body, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Starts a build with the specified configuration.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(projectId, id, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Returns information about a previously requested build.</p> |
| 86 | <p class="toc_element"> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 87 | <code><a href="#list">list(projectId, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 88 | <p class="firstline">Lists previously requested builds.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 91 | <p class="firstline">Retrieves the next page of results.</p> |
| 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
| 94 | <code class="details" id="cancel">cancel(projectId, id, body, x__xgafv=None)</code> |
| 95 | <pre>Cancels a requested build in progress. |
| 96 | |
| 97 | Args: |
| 98 | projectId: string, ID of the project. (required) |
| 99 | id: string, ID of the build. (required) |
| 100 | body: object, The request body. (required) |
| 101 | The object takes the form of: |
| 102 | |
| 103 | { # Request to cancel an ongoing build. |
| 104 | } |
| 105 | |
| 106 | x__xgafv: string, V1 error format. |
| 107 | Allowed values |
| 108 | 1 - v1 error format |
| 109 | 2 - v2 error format |
| 110 | |
| 111 | Returns: |
| 112 | An object of the form: |
| 113 | |
| 114 | { # A build resource in the Container Builder API. |
| 115 | # |
| 116 | # At a high level, a Build describes where to find source code, how to build |
| 117 | # it (for example, the builder image to run on the source), and what tag to |
| 118 | # 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] | 119 | # |
| 120 | # Fields can include the following variables which will be expanded when the |
| 121 | # build is created: |
| 122 | # |
| 123 | # - $PROJECT_ID: the project ID of the build. |
| 124 | # - $BUILD_ID: the autogenerated ID of the build. |
| 125 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 126 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 127 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 128 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 129 | # resolved from the specified branch or tag. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 130 | "status": "A String", # Status of the build. |
| 131 | # @OutputOnly |
| 132 | "finishTime": "A String", # Time at which execution of the build was finished. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 133 | # |
| 134 | # The difference between finish_time and start_time is the duration of the |
| 135 | # build's execution. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 136 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 137 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 138 | # granularity. If this amount of time elapses, work on the build will cease |
| 139 | # and the build status will be TIMEOUT. |
| 140 | # |
| 141 | # Default time is ten minutes. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 142 | "statusDetail": "A String", # Customer-readable message about the current status. |
| 143 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 144 | "startTime": "A String", # Time at which execution of the build was started. |
| 145 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 146 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 147 | # [Bucket Name |
| 148 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 149 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 150 | "results": { # Results describes the artifacts created by the build pipeline. # Results of the build. |
| 151 | # @OutputOnly |
| 152 | "images": [ # Images that were built as a part of the build. |
| 153 | { # BuiltImage describes an image built by the pipeline. |
| 154 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 155 | # presented to `docker push`. |
| 156 | "digest": "A String", # Docker Registry 2.0 digest. |
| 157 | }, |
| 158 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 159 | "buildStepImages": [ # List of build step digests, in order corresponding to build step indices. |
| 160 | "A String", |
| 161 | ], |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 162 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 163 | "createTime": "A String", # Time at which the request to create the build was received. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 164 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 165 | "id": "A String", # Unique identifier of the build. |
| 166 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 167 | "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build. |
| 168 | # service. |
| 169 | "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 |
| 170 | # Storage. |
| 171 | # Google Cloud Storage. |
| 172 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 173 | # omitted, the latest generation will be used. |
| 174 | "object": "A String", # Google Cloud Storage object containing source. |
| 175 | # |
| 176 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 177 | # build. |
| 178 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 179 | # [Bucket Name |
| 180 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 181 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 182 | "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo. |
| 183 | # Repository. |
| 184 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 185 | # the build is assumed. |
| 186 | "branchName": "A String", # Name of the branch to build. |
| 187 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 188 | "tagName": "A String", # Name of the tag to build. |
| 189 | "commitSha": "A String", # Explicit commit SHA to build. |
| 190 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 191 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 192 | "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was |
| 193 | # triggered automatically. |
| 194 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 195 | "steps": [ # Describes the operations to be performed on the workspace. |
| 196 | { # BuildStep describes a step to perform in the build pipeline. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 197 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 198 | # This build step will not start until all the build steps in wait_for |
| 199 | # have completed successfully. If wait_for is empty, this build step will |
| 200 | # start when all previous build steps in the Build.Steps list have completed |
| 201 | # successfully. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 202 | "A String", |
| 203 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 204 | "name": "A String", # The name of the container image that will run this particular build step. |
| 205 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 206 | # If the image is already available in the host's Docker daemon's cache, it |
| 207 | # will be run directly. If not, the host will attempt to pull the image |
| 208 | # first, using the builder service account's credentials if necessary. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 209 | # |
| 210 | # The Docker daemon's cache will already have the latest versions of all of |
| 211 | # the officially supported build steps |
| 212 | # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon |
| 213 | # will also have cached many of the layers for some popular images, like |
| 214 | # "ubuntu", "debian", but they will be refreshed at the time you attempt to |
| 215 | # use them. |
| 216 | # |
| 217 | # If you built an image in a previous build step, it will be stored in the |
| 218 | # host's Docker daemon's cache and is available to use as the name for a |
| 219 | # later build step. |
| 220 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 221 | # |
| 222 | # If the image used to run the step's container has an entrypoint, these args |
| 223 | # will be used as arguments to that entrypoint. If the image does not define |
| 224 | # an entrypoint, the first element in args will be used as the entrypoint, |
| 225 | # and the remainder will be used as arguments. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 226 | "A String", |
| 227 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 228 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 229 | # |
| 230 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 231 | # being given the value "VALUE". |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 232 | "A String", |
| 233 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 234 | "id": "A String", # Optional unique identifier for this build step, used in wait_for to |
| 235 | # reference this build step as a dependency. |
| 236 | "dir": "A String", # Working directory (relative to project source root) to use when running |
| 237 | # this operation's container. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 238 | }, |
| 239 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 240 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source. |
| 241 | # @OutputOnly |
| 242 | # some source was used for this build. |
| 243 | "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 |
| 244 | # revisions resolved. |
| 245 | # Repository. |
| 246 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 247 | # the build is assumed. |
| 248 | "branchName": "A String", # Name of the branch to build. |
| 249 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 250 | "tagName": "A String", # Name of the tag to build. |
| 251 | "commitSha": "A String", # Explicit commit SHA to build. |
| 252 | }, |
| 253 | "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original |
| 254 | # source integrity was maintained in the build. Note that FileHashes will |
| 255 | # only be populated if BuildOptions has requested a SourceProvenanceHash. |
| 256 | # |
| 257 | # The keys to this map are file paths used as build source and the values |
| 258 | # contain the hash values for those files. |
| 259 | # |
| 260 | # If the build source came in a single package such as a gzipped tarfile |
| 261 | # (.tar.gz), the FileHash will be for the single path to that file. |
| 262 | # @OutputOnly |
| 263 | "a_key": { # Container message for hashes of byte content of files, used in |
| 264 | # SourceProvenance messages to verify integrity of source input to the build. |
| 265 | "fileHash": [ # Collection of file hashes. |
| 266 | { # Container message for hash values. |
| 267 | "type": "A String", # The type of hash that was performed. |
| 268 | "value": "A String", # The hash value. |
| 269 | }, |
| 270 | ], |
| 271 | }, |
| 272 | }, |
| 273 | "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 |
| 274 | # generations resolved. |
| 275 | # Google Cloud Storage. |
| 276 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 277 | # omitted, the latest generation will be used. |
| 278 | "object": "A String", # Google Cloud Storage object containing source. |
| 279 | # |
| 280 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 281 | # build. |
| 282 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 283 | # [Bucket Name |
| 284 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 285 | }, |
| 286 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 287 | "projectId": "A String", # ID of the project. |
| 288 | # @OutputOnly. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 289 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 290 | # steps. |
| 291 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 292 | # The images will be pushed using the builder service account's credentials. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 293 | # |
| 294 | # The digests of the pushed images will be stored in the Build resource's |
| 295 | # results field. |
| 296 | # |
| 297 | # If any of the images fail to be pushed, the build is marked FAILURE. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 298 | "A String", |
| 299 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 300 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 301 | "requestedVerifyOption": "A String", # Requested verifiability options. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 302 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 303 | "A String", |
| 304 | ], |
| 305 | }, |
| 306 | "logUrl": "A String", # URL to logs for this build in Google Cloud Logging. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 307 | # @OutputOnly |
| 308 | }</pre> |
| 309 | </div> |
| 310 | |
| 311 | <div class="method"> |
| 312 | <code class="details" id="create">create(projectId, body, x__xgafv=None)</code> |
| 313 | <pre>Starts a build with the specified configuration. |
| 314 | |
| 315 | The long-running Operation returned by this method will include the ID of |
| 316 | the build, which can be passed to GetBuild to determine its status (e.g., |
| 317 | success or failure). |
| 318 | |
| 319 | Args: |
| 320 | projectId: string, ID of the project. (required) |
| 321 | body: object, The request body. (required) |
| 322 | The object takes the form of: |
| 323 | |
| 324 | { # A build resource in the Container Builder API. |
| 325 | # |
| 326 | # At a high level, a Build describes where to find source code, how to build |
| 327 | # it (for example, the builder image to run on the source), and what tag to |
| 328 | # 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] | 329 | # |
| 330 | # Fields can include the following variables which will be expanded when the |
| 331 | # build is created: |
| 332 | # |
| 333 | # - $PROJECT_ID: the project ID of the build. |
| 334 | # - $BUILD_ID: the autogenerated ID of the build. |
| 335 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 336 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 337 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 338 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 339 | # resolved from the specified branch or tag. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 340 | "status": "A String", # Status of the build. |
| 341 | # @OutputOnly |
| 342 | "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] | 343 | # |
| 344 | # The difference between finish_time and start_time is the duration of the |
| 345 | # build's execution. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 346 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 347 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 348 | # granularity. If this amount of time elapses, work on the build will cease |
| 349 | # and the build status will be TIMEOUT. |
| 350 | # |
| 351 | # Default time is ten minutes. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 352 | "statusDetail": "A String", # Customer-readable message about the current status. |
| 353 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 354 | "startTime": "A String", # Time at which execution of the build was started. |
| 355 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 356 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 357 | # [Bucket Name |
| 358 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 359 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 360 | "results": { # Results describes the artifacts created by the build pipeline. # Results of the build. |
| 361 | # @OutputOnly |
| 362 | "images": [ # Images that were built as a part of the build. |
| 363 | { # BuiltImage describes an image built by the pipeline. |
| 364 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 365 | # presented to `docker push`. |
| 366 | "digest": "A String", # Docker Registry 2.0 digest. |
| 367 | }, |
| 368 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 369 | "buildStepImages": [ # List of build step digests, in order corresponding to build step indices. |
| 370 | "A String", |
| 371 | ], |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 372 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 373 | "createTime": "A String", # Time at which the request to create the build was received. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 374 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 375 | "id": "A String", # Unique identifier of the build. |
| 376 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 377 | "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build. |
| 378 | # service. |
| 379 | "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 |
| 380 | # Storage. |
| 381 | # Google Cloud Storage. |
| 382 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 383 | # omitted, the latest generation will be used. |
| 384 | "object": "A String", # Google Cloud Storage object containing source. |
| 385 | # |
| 386 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 387 | # build. |
| 388 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 389 | # [Bucket Name |
| 390 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 391 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 392 | "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo. |
| 393 | # Repository. |
| 394 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 395 | # the build is assumed. |
| 396 | "branchName": "A String", # Name of the branch to build. |
| 397 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 398 | "tagName": "A String", # Name of the tag to build. |
| 399 | "commitSha": "A String", # Explicit commit SHA to build. |
| 400 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 401 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 402 | "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was |
| 403 | # triggered automatically. |
| 404 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 405 | "steps": [ # Describes the operations to be performed on the workspace. |
| 406 | { # BuildStep describes a step to perform in the build pipeline. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 407 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 408 | # This build step will not start until all the build steps in wait_for |
| 409 | # have completed successfully. If wait_for is empty, this build step will |
| 410 | # start when all previous build steps in the Build.Steps list have completed |
| 411 | # successfully. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 412 | "A String", |
| 413 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 414 | "name": "A String", # The name of the container image that will run this particular build step. |
| 415 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 416 | # If the image is already available in the host's Docker daemon's cache, it |
| 417 | # will be run directly. If not, the host will attempt to pull the image |
| 418 | # first, using the builder service account's credentials if necessary. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 419 | # |
| 420 | # The Docker daemon's cache will already have the latest versions of all of |
| 421 | # the officially supported build steps |
| 422 | # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon |
| 423 | # will also have cached many of the layers for some popular images, like |
| 424 | # "ubuntu", "debian", but they will be refreshed at the time you attempt to |
| 425 | # use them. |
| 426 | # |
| 427 | # If you built an image in a previous build step, it will be stored in the |
| 428 | # host's Docker daemon's cache and is available to use as the name for a |
| 429 | # later build step. |
| 430 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 431 | # |
| 432 | # If the image used to run the step's container has an entrypoint, these args |
| 433 | # will be used as arguments to that entrypoint. If the image does not define |
| 434 | # an entrypoint, the first element in args will be used as the entrypoint, |
| 435 | # and the remainder will be used as arguments. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 436 | "A String", |
| 437 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 438 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 439 | # |
| 440 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 441 | # being given the value "VALUE". |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 442 | "A String", |
| 443 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 444 | "id": "A String", # Optional unique identifier for this build step, used in wait_for to |
| 445 | # reference this build step as a dependency. |
| 446 | "dir": "A String", # Working directory (relative to project source root) to use when running |
| 447 | # this operation's container. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 448 | }, |
| 449 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 450 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source. |
| 451 | # @OutputOnly |
| 452 | # some source was used for this build. |
| 453 | "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 |
| 454 | # revisions resolved. |
| 455 | # Repository. |
| 456 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 457 | # the build is assumed. |
| 458 | "branchName": "A String", # Name of the branch to build. |
| 459 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 460 | "tagName": "A String", # Name of the tag to build. |
| 461 | "commitSha": "A String", # Explicit commit SHA to build. |
| 462 | }, |
| 463 | "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original |
| 464 | # source integrity was maintained in the build. Note that FileHashes will |
| 465 | # only be populated if BuildOptions has requested a SourceProvenanceHash. |
| 466 | # |
| 467 | # The keys to this map are file paths used as build source and the values |
| 468 | # contain the hash values for those files. |
| 469 | # |
| 470 | # If the build source came in a single package such as a gzipped tarfile |
| 471 | # (.tar.gz), the FileHash will be for the single path to that file. |
| 472 | # @OutputOnly |
| 473 | "a_key": { # Container message for hashes of byte content of files, used in |
| 474 | # SourceProvenance messages to verify integrity of source input to the build. |
| 475 | "fileHash": [ # Collection of file hashes. |
| 476 | { # Container message for hash values. |
| 477 | "type": "A String", # The type of hash that was performed. |
| 478 | "value": "A String", # The hash value. |
| 479 | }, |
| 480 | ], |
| 481 | }, |
| 482 | }, |
| 483 | "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 |
| 484 | # generations resolved. |
| 485 | # Google Cloud Storage. |
| 486 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 487 | # omitted, the latest generation will be used. |
| 488 | "object": "A String", # Google Cloud Storage object containing source. |
| 489 | # |
| 490 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 491 | # build. |
| 492 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 493 | # [Bucket Name |
| 494 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 495 | }, |
| 496 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 497 | "projectId": "A String", # ID of the project. |
| 498 | # @OutputOnly. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 499 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 500 | # steps. |
| 501 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 502 | # The images will be pushed using the builder service account's credentials. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 503 | # |
| 504 | # The digests of the pushed images will be stored in the Build resource's |
| 505 | # results field. |
| 506 | # |
| 507 | # If any of the images fail to be pushed, the build is marked FAILURE. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 508 | "A String", |
| 509 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 510 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 511 | "requestedVerifyOption": "A String", # Requested verifiability options. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 512 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 513 | "A String", |
| 514 | ], |
| 515 | }, |
| 516 | "logUrl": "A String", # URL to logs for this build in Google Cloud Logging. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 517 | # @OutputOnly |
| 518 | } |
| 519 | |
| 520 | x__xgafv: string, V1 error format. |
| 521 | Allowed values |
| 522 | 1 - v1 error format |
| 523 | 2 - v2 error format |
| 524 | |
| 525 | Returns: |
| 526 | An object of the form: |
| 527 | |
| 528 | { # This resource represents a long-running operation that is the result of a |
| 529 | # network API call. |
| 530 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 531 | # contains progress information and common metadata such as create time. |
| 532 | # Some services might not provide such metadata. Any method that returns a |
| 533 | # long-running operation should document the metadata type, if any. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 534 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 535 | }, |
| 536 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 537 | # If true, the operation is completed, and either `error` or `response` is |
| 538 | # available. |
| 539 | "response": { # The normal response of the operation in case of success. If the original |
| 540 | # method returns no data on success, such as `Delete`, the response is |
| 541 | # `google.protobuf.Empty`. If the original method is standard |
| 542 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 543 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 544 | # is the original method name. For example, if the original method name |
| 545 | # is `TakeSnapshot()`, the inferred response type is |
| 546 | # `TakeSnapshotResponse`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 547 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 548 | }, |
| 549 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 550 | # originally returns it. If you use the default HTTP mapping, the |
| 551 | # `name` should have the format of `operations/some/unique/name`. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 552 | "error": { # The `Status` type defines a logical error model that is suitable for different # The error result of the operation in case of failure or cancellation. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 553 | # programming environments, including REST APIs and RPC APIs. It is used by |
| 554 | # [gRPC](https://github.com/grpc). The error model is designed to be: |
| 555 | # |
| 556 | # - Simple to use and understand for most users |
| 557 | # - Flexible enough to meet unexpected needs |
| 558 | # |
| 559 | # # Overview |
| 560 | # |
| 561 | # The `Status` message contains three pieces of data: error code, error message, |
| 562 | # and error details. The error code should be an enum value of |
| 563 | # google.rpc.Code, but it may accept additional error codes if needed. The |
| 564 | # error message should be a developer-facing English message that helps |
| 565 | # developers *understand* and *resolve* the error. If a localized user-facing |
| 566 | # error message is needed, put the localized message in the error details or |
| 567 | # localize it in the client. The optional error details may contain arbitrary |
| 568 | # information about the error. There is a predefined set of error detail types |
| 569 | # in the package `google.rpc` which can be used for common error conditions. |
| 570 | # |
| 571 | # # Language mapping |
| 572 | # |
| 573 | # The `Status` message is the logical representation of the error model, but it |
| 574 | # is not necessarily the actual wire format. When the `Status` message is |
| 575 | # exposed in different client libraries and different wire protocols, it can be |
| 576 | # mapped differently. For example, it will likely be mapped to some exceptions |
| 577 | # in Java, but more likely mapped to some error codes in C. |
| 578 | # |
| 579 | # # Other uses |
| 580 | # |
| 581 | # The error model and the `Status` message can be used in a variety of |
| 582 | # environments, either with or without APIs, to provide a |
| 583 | # consistent developer experience across different environments. |
| 584 | # |
| 585 | # Example uses of this error model include: |
| 586 | # |
| 587 | # - Partial errors. If a service needs to return partial errors to the client, |
| 588 | # it may embed the `Status` in the normal response to indicate the partial |
| 589 | # errors. |
| 590 | # |
| 591 | # - Workflow errors. A typical workflow has multiple steps. Each step may |
| 592 | # have a `Status` message for error reporting purpose. |
| 593 | # |
| 594 | # - Batch operations. If a client uses batch request and batch response, the |
| 595 | # `Status` message should be used directly inside batch response, one for |
| 596 | # each error sub-response. |
| 597 | # |
| 598 | # - Asynchronous operations. If an API call embeds asynchronous operation |
| 599 | # results in its response, the status of those operations should be |
| 600 | # represented directly using the `Status` message. |
| 601 | # |
| 602 | # - Logging. If some API errors are stored in logs, the message `Status` could |
| 603 | # be used directly after any stripping needed for security/privacy reasons. |
| 604 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 605 | # user-facing error message should be localized and sent in the |
| 606 | # google.rpc.Status.details field, or localized by the client. |
| 607 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 608 | "details": [ # A list of messages that carry the error details. There will be a |
| 609 | # common set of message types for APIs to use. |
| 610 | { |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 611 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 612 | }, |
| 613 | ], |
| 614 | }, |
| 615 | }</pre> |
| 616 | </div> |
| 617 | |
| 618 | <div class="method"> |
| 619 | <code class="details" id="get">get(projectId, id, x__xgafv=None)</code> |
| 620 | <pre>Returns information about a previously requested build. |
| 621 | |
| 622 | The Build that is returned includes its status (e.g., success or failure, |
| 623 | or in-progress), and timing information. |
| 624 | |
| 625 | Args: |
| 626 | projectId: string, ID of the project. (required) |
| 627 | id: string, ID of the build. (required) |
| 628 | x__xgafv: string, V1 error format. |
| 629 | Allowed values |
| 630 | 1 - v1 error format |
| 631 | 2 - v2 error format |
| 632 | |
| 633 | Returns: |
| 634 | An object of the form: |
| 635 | |
| 636 | { # A build resource in the Container Builder API. |
| 637 | # |
| 638 | # At a high level, a Build describes where to find source code, how to build |
| 639 | # it (for example, the builder image to run on the source), and what tag to |
| 640 | # 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] | 641 | # |
| 642 | # Fields can include the following variables which will be expanded when the |
| 643 | # build is created: |
| 644 | # |
| 645 | # - $PROJECT_ID: the project ID of the build. |
| 646 | # - $BUILD_ID: the autogenerated ID of the build. |
| 647 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 648 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 649 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 650 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 651 | # resolved from the specified branch or tag. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 652 | "status": "A String", # Status of the build. |
| 653 | # @OutputOnly |
| 654 | "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] | 655 | # |
| 656 | # The difference between finish_time and start_time is the duration of the |
| 657 | # build's execution. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 658 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 659 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 660 | # granularity. If this amount of time elapses, work on the build will cease |
| 661 | # and the build status will be TIMEOUT. |
| 662 | # |
| 663 | # Default time is ten minutes. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 664 | "statusDetail": "A String", # Customer-readable message about the current status. |
| 665 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 666 | "startTime": "A String", # Time at which execution of the build was started. |
| 667 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 668 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 669 | # [Bucket Name |
| 670 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 671 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 672 | "results": { # Results describes the artifacts created by the build pipeline. # Results of the build. |
| 673 | # @OutputOnly |
| 674 | "images": [ # Images that were built as a part of the build. |
| 675 | { # BuiltImage describes an image built by the pipeline. |
| 676 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 677 | # presented to `docker push`. |
| 678 | "digest": "A String", # Docker Registry 2.0 digest. |
| 679 | }, |
| 680 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 681 | "buildStepImages": [ # List of build step digests, in order corresponding to build step indices. |
| 682 | "A String", |
| 683 | ], |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 684 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 685 | "createTime": "A String", # Time at which the request to create the build was received. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 686 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 687 | "id": "A String", # Unique identifier of the build. |
| 688 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 689 | "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build. |
| 690 | # service. |
| 691 | "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 |
| 692 | # Storage. |
| 693 | # Google Cloud Storage. |
| 694 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 695 | # omitted, the latest generation will be used. |
| 696 | "object": "A String", # Google Cloud Storage object containing source. |
| 697 | # |
| 698 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 699 | # build. |
| 700 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 701 | # [Bucket Name |
| 702 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 703 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 704 | "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo. |
| 705 | # Repository. |
| 706 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 707 | # the build is assumed. |
| 708 | "branchName": "A String", # Name of the branch to build. |
| 709 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 710 | "tagName": "A String", # Name of the tag to build. |
| 711 | "commitSha": "A String", # Explicit commit SHA to build. |
| 712 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 713 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 714 | "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was |
| 715 | # triggered automatically. |
| 716 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 717 | "steps": [ # Describes the operations to be performed on the workspace. |
| 718 | { # BuildStep describes a step to perform in the build pipeline. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 719 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 720 | # This build step will not start until all the build steps in wait_for |
| 721 | # have completed successfully. If wait_for is empty, this build step will |
| 722 | # start when all previous build steps in the Build.Steps list have completed |
| 723 | # successfully. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 724 | "A String", |
| 725 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 726 | "name": "A String", # The name of the container image that will run this particular build step. |
| 727 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 728 | # If the image is already available in the host's Docker daemon's cache, it |
| 729 | # will be run directly. If not, the host will attempt to pull the image |
| 730 | # first, using the builder service account's credentials if necessary. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 731 | # |
| 732 | # The Docker daemon's cache will already have the latest versions of all of |
| 733 | # the officially supported build steps |
| 734 | # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon |
| 735 | # will also have cached many of the layers for some popular images, like |
| 736 | # "ubuntu", "debian", but they will be refreshed at the time you attempt to |
| 737 | # use them. |
| 738 | # |
| 739 | # If you built an image in a previous build step, it will be stored in the |
| 740 | # host's Docker daemon's cache and is available to use as the name for a |
| 741 | # later build step. |
| 742 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 743 | # |
| 744 | # If the image used to run the step's container has an entrypoint, these args |
| 745 | # will be used as arguments to that entrypoint. If the image does not define |
| 746 | # an entrypoint, the first element in args will be used as the entrypoint, |
| 747 | # and the remainder will be used as arguments. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 748 | "A String", |
| 749 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 750 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 751 | # |
| 752 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 753 | # being given the value "VALUE". |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 754 | "A String", |
| 755 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 756 | "id": "A String", # Optional unique identifier for this build step, used in wait_for to |
| 757 | # reference this build step as a dependency. |
| 758 | "dir": "A String", # Working directory (relative to project source root) to use when running |
| 759 | # this operation's container. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 760 | }, |
| 761 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 762 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source. |
| 763 | # @OutputOnly |
| 764 | # some source was used for this build. |
| 765 | "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 |
| 766 | # revisions resolved. |
| 767 | # Repository. |
| 768 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 769 | # the build is assumed. |
| 770 | "branchName": "A String", # Name of the branch to build. |
| 771 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 772 | "tagName": "A String", # Name of the tag to build. |
| 773 | "commitSha": "A String", # Explicit commit SHA to build. |
| 774 | }, |
| 775 | "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original |
| 776 | # source integrity was maintained in the build. Note that FileHashes will |
| 777 | # only be populated if BuildOptions has requested a SourceProvenanceHash. |
| 778 | # |
| 779 | # The keys to this map are file paths used as build source and the values |
| 780 | # contain the hash values for those files. |
| 781 | # |
| 782 | # If the build source came in a single package such as a gzipped tarfile |
| 783 | # (.tar.gz), the FileHash will be for the single path to that file. |
| 784 | # @OutputOnly |
| 785 | "a_key": { # Container message for hashes of byte content of files, used in |
| 786 | # SourceProvenance messages to verify integrity of source input to the build. |
| 787 | "fileHash": [ # Collection of file hashes. |
| 788 | { # Container message for hash values. |
| 789 | "type": "A String", # The type of hash that was performed. |
| 790 | "value": "A String", # The hash value. |
| 791 | }, |
| 792 | ], |
| 793 | }, |
| 794 | }, |
| 795 | "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 |
| 796 | # generations resolved. |
| 797 | # Google Cloud Storage. |
| 798 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 799 | # omitted, the latest generation will be used. |
| 800 | "object": "A String", # Google Cloud Storage object containing source. |
| 801 | # |
| 802 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 803 | # build. |
| 804 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 805 | # [Bucket Name |
| 806 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 807 | }, |
| 808 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 809 | "projectId": "A String", # ID of the project. |
| 810 | # @OutputOnly. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 811 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 812 | # steps. |
| 813 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 814 | # The images will be pushed using the builder service account's credentials. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 815 | # |
| 816 | # The digests of the pushed images will be stored in the Build resource's |
| 817 | # results field. |
| 818 | # |
| 819 | # If any of the images fail to be pushed, the build is marked FAILURE. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 820 | "A String", |
| 821 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 822 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 823 | "requestedVerifyOption": "A String", # Requested verifiability options. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 824 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 825 | "A String", |
| 826 | ], |
| 827 | }, |
| 828 | "logUrl": "A String", # URL to logs for this build in Google Cloud Logging. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 829 | # @OutputOnly |
| 830 | }</pre> |
| 831 | </div> |
| 832 | |
| 833 | <div class="method"> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 834 | <code class="details" id="list">list(projectId, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 835 | <pre>Lists previously requested builds. |
| 836 | |
| 837 | Previously requested builds may still be in-progress, or may have finished |
| 838 | successfully or unsuccessfully. |
| 839 | |
| 840 | Args: |
| 841 | projectId: string, ID of the project. (required) |
| 842 | pageSize: integer, Number of results to return in the list. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 843 | filter: string, The raw filter text to constrain the results. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 844 | pageToken: string, Token to provide to skip to a particular spot in the list. |
| 845 | x__xgafv: string, V1 error format. |
| 846 | Allowed values |
| 847 | 1 - v1 error format |
| 848 | 2 - v2 error format |
| 849 | |
| 850 | Returns: |
| 851 | An object of the form: |
| 852 | |
| 853 | { # Response including listed builds. |
| 854 | "nextPageToken": "A String", # Token to receive the next page of results. |
| 855 | "builds": [ # Builds will be sorted by create_time, descending. |
| 856 | { # A build resource in the Container Builder API. |
| 857 | # |
| 858 | # At a high level, a Build describes where to find source code, how to build |
| 859 | # it (for example, the builder image to run on the source), and what tag to |
| 860 | # 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] | 861 | # |
| 862 | # Fields can include the following variables which will be expanded when the |
| 863 | # build is created: |
| 864 | # |
| 865 | # - $PROJECT_ID: the project ID of the build. |
| 866 | # - $BUILD_ID: the autogenerated ID of the build. |
| 867 | # - $REPO_NAME: the source repository name specified by RepoSource. |
| 868 | # - $BRANCH_NAME: the branch name specified by RepoSource. |
| 869 | # - $TAG_NAME: the tag name specified by RepoSource. |
| 870 | # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 871 | # resolved from the specified branch or tag. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 872 | "status": "A String", # Status of the build. |
| 873 | # @OutputOnly |
| 874 | "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] | 875 | # |
| 876 | # The difference between finish_time and start_time is the duration of the |
| 877 | # build's execution. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 878 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 879 | "timeout": "A String", # Amount of time that this build should be allowed to run, to second |
| 880 | # granularity. If this amount of time elapses, work on the build will cease |
| 881 | # and the build status will be TIMEOUT. |
| 882 | # |
| 883 | # Default time is ten minutes. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 884 | "statusDetail": "A String", # Customer-readable message about the current status. |
| 885 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 886 | "startTime": "A String", # Time at which execution of the build was started. |
| 887 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 888 | "logsBucket": "A String", # Google Cloud Storage bucket where logs should be written (see |
| 889 | # [Bucket Name |
| 890 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 891 | # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. |
| 892 | "results": { # Results describes the artifacts created by the build pipeline. # Results of the build. |
| 893 | # @OutputOnly |
| 894 | "images": [ # Images that were built as a part of the build. |
| 895 | { # BuiltImage describes an image built by the pipeline. |
| 896 | "name": "A String", # Name used to push the container image to Google Container Registry, as |
| 897 | # presented to `docker push`. |
| 898 | "digest": "A String", # Docker Registry 2.0 digest. |
| 899 | }, |
| 900 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 901 | "buildStepImages": [ # List of build step digests, in order corresponding to build step indices. |
| 902 | "A String", |
| 903 | ], |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 904 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 905 | "createTime": "A String", # Time at which the request to create the build was received. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 906 | # @OutputOnly |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 907 | "id": "A String", # Unique identifier of the build. |
| 908 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 909 | "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build. |
| 910 | # service. |
| 911 | "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 |
| 912 | # Storage. |
| 913 | # Google Cloud Storage. |
| 914 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 915 | # omitted, the latest generation will be used. |
| 916 | "object": "A String", # Google Cloud Storage object containing source. |
| 917 | # |
| 918 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 919 | # build. |
| 920 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 921 | # [Bucket Name |
| 922 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 923 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 924 | "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo. |
| 925 | # Repository. |
| 926 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 927 | # the build is assumed. |
| 928 | "branchName": "A String", # Name of the branch to build. |
| 929 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 930 | "tagName": "A String", # Name of the tag to build. |
| 931 | "commitSha": "A String", # Explicit commit SHA to build. |
| 932 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 933 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 934 | "buildTriggerId": "A String", # The ID of the BuildTrigger that triggered this build, if it was |
| 935 | # triggered automatically. |
| 936 | # @OutputOnly |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 937 | "steps": [ # Describes the operations to be performed on the workspace. |
| 938 | { # BuildStep describes a step to perform in the build pipeline. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 939 | "waitFor": [ # The ID(s) of the step(s) that this build step depends on. |
| 940 | # This build step will not start until all the build steps in wait_for |
| 941 | # have completed successfully. If wait_for is empty, this build step will |
| 942 | # start when all previous build steps in the Build.Steps list have completed |
| 943 | # successfully. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 944 | "A String", |
| 945 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 946 | "name": "A String", # The name of the container image that will run this particular build step. |
| 947 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 948 | # If the image is already available in the host's Docker daemon's cache, it |
| 949 | # will be run directly. If not, the host will attempt to pull the image |
| 950 | # first, using the builder service account's credentials if necessary. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 951 | # |
| 952 | # The Docker daemon's cache will already have the latest versions of all of |
| 953 | # the officially supported build steps |
| 954 | # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon |
| 955 | # will also have cached many of the layers for some popular images, like |
| 956 | # "ubuntu", "debian", but they will be refreshed at the time you attempt to |
| 957 | # use them. |
| 958 | # |
| 959 | # If you built an image in a previous build step, it will be stored in the |
| 960 | # host's Docker daemon's cache and is available to use as the name for a |
| 961 | # later build step. |
| 962 | "args": [ # A list of arguments that will be presented to the step when it is started. |
| 963 | # |
| 964 | # If the image used to run the step's container has an entrypoint, these args |
| 965 | # will be used as arguments to that entrypoint. If the image does not define |
| 966 | # an entrypoint, the first element in args will be used as the entrypoint, |
| 967 | # and the remainder will be used as arguments. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 968 | "A String", |
| 969 | ], |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 970 | "env": [ # A list of environment variable definitions to be used when running a step. |
| 971 | # |
| 972 | # The elements are of the form "KEY=VALUE" for the environment variable "KEY" |
| 973 | # being given the value "VALUE". |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 974 | "A String", |
| 975 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 976 | "id": "A String", # Optional unique identifier for this build step, used in wait_for to |
| 977 | # reference this build step as a dependency. |
| 978 | "dir": "A String", # Working directory (relative to project source root) to use when running |
| 979 | # this operation's container. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 980 | }, |
| 981 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 982 | "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source. |
| 983 | # @OutputOnly |
| 984 | # some source was used for this build. |
| 985 | "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 |
| 986 | # revisions resolved. |
| 987 | # Repository. |
| 988 | "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting |
| 989 | # the build is assumed. |
| 990 | "branchName": "A String", # Name of the branch to build. |
| 991 | "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed. |
| 992 | "tagName": "A String", # Name of the tag to build. |
| 993 | "commitSha": "A String", # Explicit commit SHA to build. |
| 994 | }, |
| 995 | "fileHashes": { # Hash(es) of the build source, which can be used to verify that the original |
| 996 | # source integrity was maintained in the build. Note that FileHashes will |
| 997 | # only be populated if BuildOptions has requested a SourceProvenanceHash. |
| 998 | # |
| 999 | # The keys to this map are file paths used as build source and the values |
| 1000 | # contain the hash values for those files. |
| 1001 | # |
| 1002 | # If the build source came in a single package such as a gzipped tarfile |
| 1003 | # (.tar.gz), the FileHash will be for the single path to that file. |
| 1004 | # @OutputOnly |
| 1005 | "a_key": { # Container message for hashes of byte content of files, used in |
| 1006 | # SourceProvenance messages to verify integrity of source input to the build. |
| 1007 | "fileHash": [ # Collection of file hashes. |
| 1008 | { # Container message for hash values. |
| 1009 | "type": "A String", # The type of hash that was performed. |
| 1010 | "value": "A String", # The hash value. |
| 1011 | }, |
| 1012 | ], |
| 1013 | }, |
| 1014 | }, |
| 1015 | "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 |
| 1016 | # generations resolved. |
| 1017 | # Google Cloud Storage. |
| 1018 | "generation": "A String", # Google Cloud Storage generation for the object. If the generation is |
| 1019 | # omitted, the latest generation will be used. |
| 1020 | "object": "A String", # Google Cloud Storage object containing source. |
| 1021 | # |
| 1022 | # This object must be a gzipped archive file (.tar.gz) containing source to |
| 1023 | # build. |
| 1024 | "bucket": "A String", # Google Cloud Storage bucket containing source (see |
| 1025 | # [Bucket Name |
| 1026 | # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| 1027 | }, |
| 1028 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1029 | "projectId": "A String", # ID of the project. |
| 1030 | # @OutputOnly. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1031 | "images": [ # A list of images to be pushed upon the successful completion of all build |
| 1032 | # steps. |
| 1033 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1034 | # The images will be pushed using the builder service account's credentials. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1035 | # |
| 1036 | # The digests of the pushed images will be stored in the Build resource's |
| 1037 | # results field. |
| 1038 | # |
| 1039 | # If any of the images fail to be pushed, the build is marked FAILURE. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1040 | "A String", |
| 1041 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1042 | "options": { # Optional arguments to enable specific features of builds. # Special options for this build. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1043 | "requestedVerifyOption": "A String", # Requested verifiability options. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1044 | "sourceProvenanceHash": [ # Requested hash for SourceProvenance. |
| 1045 | "A String", |
| 1046 | ], |
| 1047 | }, |
| 1048 | "logUrl": "A String", # URL to logs for this build in Google Cloud Logging. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1049 | # @OutputOnly |
| 1050 | }, |
| 1051 | ], |
| 1052 | }</pre> |
| 1053 | </div> |
| 1054 | |
| 1055 | <div class="method"> |
| 1056 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 1057 | <pre>Retrieves the next page of results. |
| 1058 | |
| 1059 | Args: |
| 1060 | previous_request: The request for the previous page. (required) |
| 1061 | previous_response: The response from the request for the previous page. (required) |
| 1062 | |
| 1063 | Returns: |
| 1064 | A request object that you can call 'execute()' on to request the next |
| 1065 | page. Returns None if there are no more items in the collection. |
| 1066 | </pre> |
| 1067 | </div> |
| 1068 | |
| 1069 | </body></html> |