google-apis-cloudbuild_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8f069c1d946b7924e2a0928e207be2a606f3dbbbb81665124bfdae5270da875e
4
+ data.tar.gz: 7eccc6d0db1732de32d887fa88200f6ebfbaf4351e20b47e1a77a163fa21a5b5
5
+ SHA512:
6
+ metadata.gz: e3c460100c276047bc9b557fb594b2a4e7bfd9ddad905cd19056a06423d4865b50b65ba3fb5bcdf9963257a164f1dd4161aac77b5b743b4f000b31910777bfec
7
+ data.tar.gz: 78b758ad896ad7de7dba7e9edc2ef6e9617935c389c9dd8582f2d80d635b55a0b68a156bd044536542f2d0b95748968221929db82b91357df741b785947a31cb
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-cloudbuild_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/cloudbuild_v1/*.rb
9
+ lib/google/apis/cloudbuild_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-cloudbuild_v1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201211
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1 of the Cloud Build API
2
+
3
+ This is a simple client library for version V1 of the Cloud Build API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/cloudbuild.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-cloudbuild_v1', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-cloudbuild_v1
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/cloudbuild_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::CloudbuildV1::CloudBuildService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Cloudbuild service in particular.)
67
+
68
+ For reference information on specific calls in the Cloud Build API, see the {Google::Apis::CloudbuildV1::CloudBuildService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-cloudbuild_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://cloud.google.com/cloud-build/docs/) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/cloudbuild_v1"
@@ -0,0 +1,36 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/cloudbuild_v1/service.rb'
16
+ require 'google/apis/cloudbuild_v1/classes.rb'
17
+ require 'google/apis/cloudbuild_v1/representations.rb'
18
+ require 'google/apis/cloudbuild_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Cloud Build API
23
+ #
24
+ # Creates and manages builds on Google Cloud Platform.
25
+ #
26
+ # @see https://cloud.google.com/cloud-build/docs/
27
+ module CloudbuildV1
28
+ # Version of the Cloud Build API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1'
31
+
32
+ # View and manage your data across Google Cloud Platform services
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,1725 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module CloudbuildV1
24
+
25
+ # Files in the workspace to upload to Cloud Storage upon successful completion
26
+ # of all build steps.
27
+ class ArtifactObjects
28
+ include Google::Apis::Core::Hashable
29
+
30
+ # Cloud Storage bucket and optional object path, in the form "gs://bucket/path/
31
+ # to/somewhere/". (see [Bucket Name Requirements](https://cloud.google.com/
32
+ # storage/docs/bucket-naming#requirements)). Files in the workspace matching any
33
+ # path pattern will be uploaded to Cloud Storage with this location as a prefix.
34
+ # Corresponds to the JSON property `location`
35
+ # @return [String]
36
+ attr_accessor :location
37
+
38
+ # Path globs used to match files in the build's workspace.
39
+ # Corresponds to the JSON property `paths`
40
+ # @return [Array<String>]
41
+ attr_accessor :paths
42
+
43
+ # Start and end times for a build execution phase.
44
+ # Corresponds to the JSON property `timing`
45
+ # @return [Google::Apis::CloudbuildV1::TimeSpan]
46
+ attr_accessor :timing
47
+
48
+ def initialize(**args)
49
+ update!(**args)
50
+ end
51
+
52
+ # Update properties of this object
53
+ def update!(**args)
54
+ @location = args[:location] if args.key?(:location)
55
+ @paths = args[:paths] if args.key?(:paths)
56
+ @timing = args[:timing] if args.key?(:timing)
57
+ end
58
+ end
59
+
60
+ # An artifact that was uploaded during a build. This is a single record in the
61
+ # artifact manifest JSON file.
62
+ class ArtifactResult
63
+ include Google::Apis::Core::Hashable
64
+
65
+ # The file hash of the artifact.
66
+ # Corresponds to the JSON property `fileHash`
67
+ # @return [Array<Google::Apis::CloudbuildV1::FileHashes>]
68
+ attr_accessor :file_hash
69
+
70
+ # The path of an artifact in a Google Cloud Storage bucket, with the generation
71
+ # number. For example, `gs://mybucket/path/to/output.jar#generation`.
72
+ # Corresponds to the JSON property `location`
73
+ # @return [String]
74
+ attr_accessor :location
75
+
76
+ def initialize(**args)
77
+ update!(**args)
78
+ end
79
+
80
+ # Update properties of this object
81
+ def update!(**args)
82
+ @file_hash = args[:file_hash] if args.key?(:file_hash)
83
+ @location = args[:location] if args.key?(:location)
84
+ end
85
+ end
86
+
87
+ # Artifacts produced by a build that should be uploaded upon successful
88
+ # completion of all build steps.
89
+ class Artifacts
90
+ include Google::Apis::Core::Hashable
91
+
92
+ # A list of images to be pushed upon the successful completion of all build
93
+ # steps. The images will be pushed using the builder service account's
94
+ # credentials. The digests of the pushed images will be stored in the Build
95
+ # resource's results field. If any of the images fail to be pushed, the build is
96
+ # marked FAILURE.
97
+ # Corresponds to the JSON property `images`
98
+ # @return [Array<String>]
99
+ attr_accessor :images
100
+
101
+ # Files in the workspace to upload to Cloud Storage upon successful completion
102
+ # of all build steps.
103
+ # Corresponds to the JSON property `objects`
104
+ # @return [Google::Apis::CloudbuildV1::ArtifactObjects]
105
+ attr_accessor :objects
106
+
107
+ def initialize(**args)
108
+ update!(**args)
109
+ end
110
+
111
+ # Update properties of this object
112
+ def update!(**args)
113
+ @images = args[:images] if args.key?(:images)
114
+ @objects = args[:objects] if args.key?(:objects)
115
+ end
116
+ end
117
+
118
+ # A build resource in the Cloud Build API. At a high level, a `Build` describes
119
+ # where to find source code, how to build it (for example, the builder image to
120
+ # run on the source), and where to store the built artifacts. Fields can include
121
+ # the following variables, which will be expanded when the build is created: - $
122
+ # PROJECT_ID: the project ID of the build. - $BUILD_ID: the autogenerated ID of
123
+ # the build. - $REPO_NAME: the source repository name specified by RepoSource. -
124
+ # $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag
125
+ # name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA
126
+ # specified by RepoSource or resolved from the specified branch or tag. - $
127
+ # SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
128
+ class Build
129
+ include Google::Apis::Core::Hashable
130
+
131
+ # Artifacts produced by a build that should be uploaded upon successful
132
+ # completion of all build steps.
133
+ # Corresponds to the JSON property `artifacts`
134
+ # @return [Google::Apis::CloudbuildV1::Artifacts]
135
+ attr_accessor :artifacts
136
+
137
+ # Output only. The ID of the `BuildTrigger` that triggered this build, if it was
138
+ # triggered automatically.
139
+ # Corresponds to the JSON property `buildTriggerId`
140
+ # @return [String]
141
+ attr_accessor :build_trigger_id
142
+
143
+ # Output only. Time at which the request to create the build was received.
144
+ # Corresponds to the JSON property `createTime`
145
+ # @return [String]
146
+ attr_accessor :create_time
147
+
148
+ # Output only. Time at which execution of the build was finished. The difference
149
+ # between finish_time and start_time is the duration of the build's execution.
150
+ # Corresponds to the JSON property `finishTime`
151
+ # @return [String]
152
+ attr_accessor :finish_time
153
+
154
+ # Output only. Unique identifier of the build.
155
+ # Corresponds to the JSON property `id`
156
+ # @return [String]
157
+ attr_accessor :id
158
+
159
+ # A list of images to be pushed upon the successful completion of all build
160
+ # steps. The images are pushed using the builder service account's credentials.
161
+ # The digests of the pushed images will be stored in the `Build` resource's
162
+ # results field. If any of the images fail to be pushed, the build status is
163
+ # marked `FAILURE`.
164
+ # Corresponds to the JSON property `images`
165
+ # @return [Array<String>]
166
+ attr_accessor :images
167
+
168
+ # Output only. URL to logs for this build in Google Cloud Console.
169
+ # Corresponds to the JSON property `logUrl`
170
+ # @return [String]
171
+ attr_accessor :log_url
172
+
173
+ # Google Cloud Storage bucket where logs should be written (see [Bucket Name
174
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
175
+ # ). Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`.
176
+ # Corresponds to the JSON property `logsBucket`
177
+ # @return [String]
178
+ attr_accessor :logs_bucket
179
+
180
+ # Output only. The 'Build' name with format: `projects/`project`/locations/`
181
+ # location`/builds/`build``, where `build` is a unique identifier generated by
182
+ # the service.
183
+ # Corresponds to the JSON property `name`
184
+ # @return [String]
185
+ attr_accessor :name
186
+
187
+ # Optional arguments to enable specific features of builds.
188
+ # Corresponds to the JSON property `options`
189
+ # @return [Google::Apis::CloudbuildV1::BuildOptions]
190
+ attr_accessor :options
191
+
192
+ # Output only. ID of the project.
193
+ # Corresponds to the JSON property `projectId`
194
+ # @return [String]
195
+ attr_accessor :project_id
196
+
197
+ # TTL in queue for this build. If provided and the build is enqueued longer than
198
+ # this value, the build will expire and the build status will be `EXPIRED`. The
199
+ # TTL starts ticking from create_time.
200
+ # Corresponds to the JSON property `queueTtl`
201
+ # @return [String]
202
+ attr_accessor :queue_ttl
203
+
204
+ # Artifacts created by the build pipeline.
205
+ # Corresponds to the JSON property `results`
206
+ # @return [Google::Apis::CloudbuildV1::Results]
207
+ attr_accessor :results
208
+
209
+ # Secrets to decrypt using Cloud Key Management Service.
210
+ # Corresponds to the JSON property `secrets`
211
+ # @return [Array<Google::Apis::CloudbuildV1::Secret>]
212
+ attr_accessor :secrets
213
+
214
+ # IAM service account whose credentials will be used at build runtime. Must be
215
+ # of the format `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. ACCOUNT can
216
+ # be email address or uniqueId of the service account. This field is in beta.
217
+ # Corresponds to the JSON property `serviceAccount`
218
+ # @return [String]
219
+ attr_accessor :service_account
220
+
221
+ # Location of the source in a supported storage service.
222
+ # Corresponds to the JSON property `source`
223
+ # @return [Google::Apis::CloudbuildV1::Source]
224
+ attr_accessor :source
225
+
226
+ # Provenance of the source. Ways to find the original source, or verify that
227
+ # some source was used for this build.
228
+ # Corresponds to the JSON property `sourceProvenance`
229
+ # @return [Google::Apis::CloudbuildV1::SourceProvenance]
230
+ attr_accessor :source_provenance
231
+
232
+ # Output only. Time at which execution of the build was started.
233
+ # Corresponds to the JSON property `startTime`
234
+ # @return [String]
235
+ attr_accessor :start_time
236
+
237
+ # Output only. Status of the build.
238
+ # Corresponds to the JSON property `status`
239
+ # @return [String]
240
+ attr_accessor :status
241
+
242
+ # Output only. Customer-readable message about the current status.
243
+ # Corresponds to the JSON property `statusDetail`
244
+ # @return [String]
245
+ attr_accessor :status_detail
246
+
247
+ # Required. The operations to be performed on the workspace.
248
+ # Corresponds to the JSON property `steps`
249
+ # @return [Array<Google::Apis::CloudbuildV1::BuildStep>]
250
+ attr_accessor :steps
251
+
252
+ # Substitutions data for `Build` resource.
253
+ # Corresponds to the JSON property `substitutions`
254
+ # @return [Hash<String,String>]
255
+ attr_accessor :substitutions
256
+
257
+ # Tags for annotation of a `Build`. These are not docker tags.
258
+ # Corresponds to the JSON property `tags`
259
+ # @return [Array<String>]
260
+ attr_accessor :tags
261
+
262
+ # Amount of time that this build should be allowed to run, to second granularity.
263
+ # If this amount of time elapses, work on the build will cease and the build
264
+ # status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default
265
+ # time is ten minutes.
266
+ # Corresponds to the JSON property `timeout`
267
+ # @return [String]
268
+ attr_accessor :timeout
269
+
270
+ # Output only. Stores timing information for phases of the build. Valid keys are:
271
+ # * BUILD: time to execute all build steps * PUSH: time to push all specified
272
+ # images. * FETCHSOURCE: time to fetch source. If the build does not specify
273
+ # source or images, these keys will not be included.
274
+ # Corresponds to the JSON property `timing`
275
+ # @return [Hash<String,Google::Apis::CloudbuildV1::TimeSpan>]
276
+ attr_accessor :timing
277
+
278
+ def initialize(**args)
279
+ update!(**args)
280
+ end
281
+
282
+ # Update properties of this object
283
+ def update!(**args)
284
+ @artifacts = args[:artifacts] if args.key?(:artifacts)
285
+ @build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id)
286
+ @create_time = args[:create_time] if args.key?(:create_time)
287
+ @finish_time = args[:finish_time] if args.key?(:finish_time)
288
+ @id = args[:id] if args.key?(:id)
289
+ @images = args[:images] if args.key?(:images)
290
+ @log_url = args[:log_url] if args.key?(:log_url)
291
+ @logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket)
292
+ @name = args[:name] if args.key?(:name)
293
+ @options = args[:options] if args.key?(:options)
294
+ @project_id = args[:project_id] if args.key?(:project_id)
295
+ @queue_ttl = args[:queue_ttl] if args.key?(:queue_ttl)
296
+ @results = args[:results] if args.key?(:results)
297
+ @secrets = args[:secrets] if args.key?(:secrets)
298
+ @service_account = args[:service_account] if args.key?(:service_account)
299
+ @source = args[:source] if args.key?(:source)
300
+ @source_provenance = args[:source_provenance] if args.key?(:source_provenance)
301
+ @start_time = args[:start_time] if args.key?(:start_time)
302
+ @status = args[:status] if args.key?(:status)
303
+ @status_detail = args[:status_detail] if args.key?(:status_detail)
304
+ @steps = args[:steps] if args.key?(:steps)
305
+ @substitutions = args[:substitutions] if args.key?(:substitutions)
306
+ @tags = args[:tags] if args.key?(:tags)
307
+ @timeout = args[:timeout] if args.key?(:timeout)
308
+ @timing = args[:timing] if args.key?(:timing)
309
+ end
310
+ end
311
+
312
+ # Metadata for build operations.
313
+ class BuildOperationMetadata
314
+ include Google::Apis::Core::Hashable
315
+
316
+ # A build resource in the Cloud Build API. At a high level, a `Build` describes
317
+ # where to find source code, how to build it (for example, the builder image to
318
+ # run on the source), and where to store the built artifacts. Fields can include
319
+ # the following variables, which will be expanded when the build is created: - $
320
+ # PROJECT_ID: the project ID of the build. - $BUILD_ID: the autogenerated ID of
321
+ # the build. - $REPO_NAME: the source repository name specified by RepoSource. -
322
+ # $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag
323
+ # name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA
324
+ # specified by RepoSource or resolved from the specified branch or tag. - $
325
+ # SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
326
+ # Corresponds to the JSON property `build`
327
+ # @return [Google::Apis::CloudbuildV1::Build]
328
+ attr_accessor :build
329
+
330
+ def initialize(**args)
331
+ update!(**args)
332
+ end
333
+
334
+ # Update properties of this object
335
+ def update!(**args)
336
+ @build = args[:build] if args.key?(:build)
337
+ end
338
+ end
339
+
340
+ # Optional arguments to enable specific features of builds.
341
+ class BuildOptions
342
+ include Google::Apis::Core::Hashable
343
+
344
+ # Requested disk size for the VM that runs the build. Note that this is *NOT* "
345
+ # disk free"; some of the space will be used by the operating system and build
346
+ # utilities. Also note that this is the minimum disk size that will be allocated
347
+ # for the build -- the build may run with a larger disk than requested. At
348
+ # present, the maximum disk size is 1000GB; builds that request more than the
349
+ # maximum are rejected with an error.
350
+ # Corresponds to the JSON property `diskSizeGb`
351
+ # @return [Fixnum]
352
+ attr_accessor :disk_size_gb
353
+
354
+ # Option to specify whether or not to apply bash style string operations to the
355
+ # substitutions. NOTE: this is always enabled for triggered builds and cannot be
356
+ # overridden in the build configuration file.
357
+ # Corresponds to the JSON property `dynamicSubstitutions`
358
+ # @return [Boolean]
359
+ attr_accessor :dynamic_substitutions
360
+ alias_method :dynamic_substitutions?, :dynamic_substitutions
361
+
362
+ # A list of global environment variable definitions that will exist for all
363
+ # build steps in this build. If a variable is defined in both globally and in a
364
+ # build step, the variable will use the build step value. The elements are of
365
+ # the form "KEY=VALUE" for the environment variable "KEY" being given the value "
366
+ # VALUE".
367
+ # Corresponds to the JSON property `env`
368
+ # @return [Array<String>]
369
+ attr_accessor :env
370
+
371
+ # Option to define build log streaming behavior to Google Cloud Storage.
372
+ # Corresponds to the JSON property `logStreamingOption`
373
+ # @return [String]
374
+ attr_accessor :log_streaming_option
375
+
376
+ # Option to specify the logging mode, which determines if and where build logs
377
+ # are stored.
378
+ # Corresponds to the JSON property `logging`
379
+ # @return [String]
380
+ attr_accessor :logging
381
+
382
+ # Compute Engine machine type on which to run the build.
383
+ # Corresponds to the JSON property `machineType`
384
+ # @return [String]
385
+ attr_accessor :machine_type
386
+
387
+ # Requested verifiability options.
388
+ # Corresponds to the JSON property `requestedVerifyOption`
389
+ # @return [String]
390
+ attr_accessor :requested_verify_option
391
+
392
+ # A list of global environment variables, which are encrypted using a Cloud Key
393
+ # Management Service crypto key. These values must be specified in the build's `
394
+ # Secret`. These variables will be available to all build steps in this build.
395
+ # Corresponds to the JSON property `secretEnv`
396
+ # @return [Array<String>]
397
+ attr_accessor :secret_env
398
+
399
+ # Requested hash for SourceProvenance.
400
+ # Corresponds to the JSON property `sourceProvenanceHash`
401
+ # @return [Array<String>]
402
+ attr_accessor :source_provenance_hash
403
+
404
+ # Option to specify behavior when there is an error in the substitution checks.
405
+ # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be
406
+ # overridden in the build configuration file.
407
+ # Corresponds to the JSON property `substitutionOption`
408
+ # @return [String]
409
+ attr_accessor :substitution_option
410
+
411
+ # Global list of volumes to mount for ALL build steps Each volume is created as
412
+ # an empty volume prior to starting the build process. Upon completion of the
413
+ # build, volumes and their contents are discarded. Global volume names and paths
414
+ # cannot conflict with the volumes defined a build step. Using a global volume
415
+ # in a build with only one step is not valid as it is indicative of a build
416
+ # request with an incorrect configuration.
417
+ # Corresponds to the JSON property `volumes`
418
+ # @return [Array<Google::Apis::CloudbuildV1::Volume>]
419
+ attr_accessor :volumes
420
+
421
+ # Option to specify a `WorkerPool` for the build. Format: projects/`project`/
422
+ # locations/`location`/workerPools/`workerPool` This field is in beta and is
423
+ # available only to restricted users.
424
+ # Corresponds to the JSON property `workerPool`
425
+ # @return [String]
426
+ attr_accessor :worker_pool
427
+
428
+ def initialize(**args)
429
+ update!(**args)
430
+ end
431
+
432
+ # Update properties of this object
433
+ def update!(**args)
434
+ @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
435
+ @dynamic_substitutions = args[:dynamic_substitutions] if args.key?(:dynamic_substitutions)
436
+ @env = args[:env] if args.key?(:env)
437
+ @log_streaming_option = args[:log_streaming_option] if args.key?(:log_streaming_option)
438
+ @logging = args[:logging] if args.key?(:logging)
439
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
440
+ @requested_verify_option = args[:requested_verify_option] if args.key?(:requested_verify_option)
441
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
442
+ @source_provenance_hash = args[:source_provenance_hash] if args.key?(:source_provenance_hash)
443
+ @substitution_option = args[:substitution_option] if args.key?(:substitution_option)
444
+ @volumes = args[:volumes] if args.key?(:volumes)
445
+ @worker_pool = args[:worker_pool] if args.key?(:worker_pool)
446
+ end
447
+ end
448
+
449
+ # A step in the build pipeline.
450
+ class BuildStep
451
+ include Google::Apis::Core::Hashable
452
+
453
+ # A list of arguments that will be presented to the step when it is started. If
454
+ # the image used to run the step's container has an entrypoint, the `args` are
455
+ # used as arguments to that entrypoint. If the image does not define an
456
+ # entrypoint, the first element in args is used as the entrypoint, and the
457
+ # remainder will be used as arguments.
458
+ # Corresponds to the JSON property `args`
459
+ # @return [Array<String>]
460
+ attr_accessor :args
461
+
462
+ # Working directory to use when running this step's container. If this value is
463
+ # a relative path, it is relative to the build's working directory. If this
464
+ # value is absolute, it may be outside the build's working directory, in which
465
+ # case the contents of the path may not be persisted across build step
466
+ # executions, unless a `volume` for that path is specified. If the build
467
+ # specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies
468
+ # an absolute path, the `RepoSource` `dir` is ignored for the step's execution.
469
+ # Corresponds to the JSON property `dir`
470
+ # @return [String]
471
+ attr_accessor :dir
472
+
473
+ # Entrypoint to be used instead of the build step image's default entrypoint. If
474
+ # unset, the image's default entrypoint is used.
475
+ # Corresponds to the JSON property `entrypoint`
476
+ # @return [String]
477
+ attr_accessor :entrypoint
478
+
479
+ # A list of environment variable definitions to be used when running a step. The
480
+ # elements are of the form "KEY=VALUE" for the environment variable "KEY" being
481
+ # given the value "VALUE".
482
+ # Corresponds to the JSON property `env`
483
+ # @return [Array<String>]
484
+ attr_accessor :env
485
+
486
+ # Unique identifier for this build step, used in `wait_for` to reference this
487
+ # build step as a dependency.
488
+ # Corresponds to the JSON property `id`
489
+ # @return [String]
490
+ attr_accessor :id
491
+
492
+ # Required. The name of the container image that will run this particular build
493
+ # step. If the image is available in the host's Docker daemon's cache, it will
494
+ # be run directly. If not, the host will attempt to pull the image first, using
495
+ # the builder service account's credentials if necessary. The Docker daemon's
496
+ # cache will already have the latest versions of all of the officially supported
497
+ # build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://
498
+ # github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also
499
+ # have cached many of the layers for some popular images, like "ubuntu", "debian"
500
+ # , but they will be refreshed at the time you attempt to use them. If you built
501
+ # an image in a previous build step, it will be stored in the host's Docker
502
+ # daemon's cache and is available to use as the name for a later build step.
503
+ # Corresponds to the JSON property `name`
504
+ # @return [String]
505
+ attr_accessor :name
506
+
507
+ # Start and end times for a build execution phase.
508
+ # Corresponds to the JSON property `pullTiming`
509
+ # @return [Google::Apis::CloudbuildV1::TimeSpan]
510
+ attr_accessor :pull_timing
511
+
512
+ # A list of environment variables which are encrypted using a Cloud Key
513
+ # Management Service crypto key. These values must be specified in the build's `
514
+ # Secret`.
515
+ # Corresponds to the JSON property `secretEnv`
516
+ # @return [Array<String>]
517
+ attr_accessor :secret_env
518
+
519
+ # Output only. Status of the build step. At this time, build step status is only
520
+ # updated on build completion; step status is not updated in real-time as the
521
+ # build progresses.
522
+ # Corresponds to the JSON property `status`
523
+ # @return [String]
524
+ attr_accessor :status
525
+
526
+ # Time limit for executing this build step. If not defined, the step has no time
527
+ # limit and will be allowed to continue to run until either it completes or the
528
+ # build itself times out.
529
+ # Corresponds to the JSON property `timeout`
530
+ # @return [String]
531
+ attr_accessor :timeout
532
+
533
+ # Start and end times for a build execution phase.
534
+ # Corresponds to the JSON property `timing`
535
+ # @return [Google::Apis::CloudbuildV1::TimeSpan]
536
+ attr_accessor :timing
537
+
538
+ # List of volumes to mount into the build step. Each volume is created as an
539
+ # empty volume prior to execution of the build step. Upon completion of the
540
+ # build, volumes and their contents are discarded. Using a named volume in only
541
+ # one step is not valid as it is indicative of a build request with an incorrect
542
+ # configuration.
543
+ # Corresponds to the JSON property `volumes`
544
+ # @return [Array<Google::Apis::CloudbuildV1::Volume>]
545
+ attr_accessor :volumes
546
+
547
+ # The ID(s) of the step(s) that this build step depends on. This build step will
548
+ # not start until all the build steps in `wait_for` have completed successfully.
549
+ # If `wait_for` is empty, this build step will start when all previous build
550
+ # steps in the `Build.Steps` list have completed successfully.
551
+ # Corresponds to the JSON property `waitFor`
552
+ # @return [Array<String>]
553
+ attr_accessor :wait_for
554
+
555
+ def initialize(**args)
556
+ update!(**args)
557
+ end
558
+
559
+ # Update properties of this object
560
+ def update!(**args)
561
+ @args = args[:args] if args.key?(:args)
562
+ @dir = args[:dir] if args.key?(:dir)
563
+ @entrypoint = args[:entrypoint] if args.key?(:entrypoint)
564
+ @env = args[:env] if args.key?(:env)
565
+ @id = args[:id] if args.key?(:id)
566
+ @name = args[:name] if args.key?(:name)
567
+ @pull_timing = args[:pull_timing] if args.key?(:pull_timing)
568
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
569
+ @status = args[:status] if args.key?(:status)
570
+ @timeout = args[:timeout] if args.key?(:timeout)
571
+ @timing = args[:timing] if args.key?(:timing)
572
+ @volumes = args[:volumes] if args.key?(:volumes)
573
+ @wait_for = args[:wait_for] if args.key?(:wait_for)
574
+ end
575
+ end
576
+
577
+ # Configuration for an automated build in response to source repository changes.
578
+ class BuildTrigger
579
+ include Google::Apis::Core::Hashable
580
+
581
+ # A build resource in the Cloud Build API. At a high level, a `Build` describes
582
+ # where to find source code, how to build it (for example, the builder image to
583
+ # run on the source), and where to store the built artifacts. Fields can include
584
+ # the following variables, which will be expanded when the build is created: - $
585
+ # PROJECT_ID: the project ID of the build. - $BUILD_ID: the autogenerated ID of
586
+ # the build. - $REPO_NAME: the source repository name specified by RepoSource. -
587
+ # $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag
588
+ # name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA
589
+ # specified by RepoSource or resolved from the specified branch or tag. - $
590
+ # SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
591
+ # Corresponds to the JSON property `build`
592
+ # @return [Google::Apis::CloudbuildV1::Build]
593
+ attr_accessor :build
594
+
595
+ # Output only. Time when the trigger was created.
596
+ # Corresponds to the JSON property `createTime`
597
+ # @return [String]
598
+ attr_accessor :create_time
599
+
600
+ # Human-readable description of this trigger.
601
+ # Corresponds to the JSON property `description`
602
+ # @return [String]
603
+ attr_accessor :description
604
+
605
+ # If true, the trigger will never automatically execute a build.
606
+ # Corresponds to the JSON property `disabled`
607
+ # @return [Boolean]
608
+ attr_accessor :disabled
609
+ alias_method :disabled?, :disabled
610
+
611
+ # Path, from the source root, to a file whose contents is used for the template.
612
+ # Corresponds to the JSON property `filename`
613
+ # @return [String]
614
+ attr_accessor :filename
615
+
616
+ # GitHubEventsConfig describes the configuration of a trigger that creates a
617
+ # build whenever a GitHub event is received. This message is experimental.
618
+ # Corresponds to the JSON property `github`
619
+ # @return [Google::Apis::CloudbuildV1::GitHubEventsConfig]
620
+ attr_accessor :github
621
+
622
+ # Output only. Unique identifier of the trigger.
623
+ # Corresponds to the JSON property `id`
624
+ # @return [String]
625
+ attr_accessor :id
626
+
627
+ # ignored_files and included_files are file glob matches using https://golang.
628
+ # org/pkg/path/filepath/#Match extended with support for "**". If ignored_files
629
+ # and changed files are both empty, then they are not used to determine whether
630
+ # or not to trigger a build. If ignored_files is not empty, then we ignore any
631
+ # files that match any of the ignored_file globs. If the change has no files
632
+ # that are outside of the ignored_files globs, then we do not trigger a build.
633
+ # Corresponds to the JSON property `ignoredFiles`
634
+ # @return [Array<String>]
635
+ attr_accessor :ignored_files
636
+
637
+ # If any of the files altered in the commit pass the ignored_files filter and
638
+ # included_files is empty, then as far as this filter is concerned, we should
639
+ # trigger the build. If any of the files altered in the commit pass the
640
+ # ignored_files filter and included_files is not empty, then we make sure that
641
+ # at least one of those files matches a included_files glob. If not, then we do
642
+ # not trigger a build.
643
+ # Corresponds to the JSON property `includedFiles`
644
+ # @return [Array<String>]
645
+ attr_accessor :included_files
646
+
647
+ # User-assigned name of the trigger. Must be unique within the project. Trigger
648
+ # names must meet the following requirements: + They must contain only
649
+ # alphanumeric characters and dashes. + They can be 1-64 characters long. + They
650
+ # must begin and end with an alphanumeric character.
651
+ # Corresponds to the JSON property `name`
652
+ # @return [String]
653
+ attr_accessor :name
654
+
655
+ # Substitutions for Build resource. The keys must match the following regular
656
+ # expression: `^_[A-Z0-9_]+$`.
657
+ # Corresponds to the JSON property `substitutions`
658
+ # @return [Hash<String,String>]
659
+ attr_accessor :substitutions
660
+
661
+ # Tags for annotation of a `BuildTrigger`
662
+ # Corresponds to the JSON property `tags`
663
+ # @return [Array<String>]
664
+ attr_accessor :tags
665
+
666
+ # Location of the source in a Google Cloud Source Repository.
667
+ # Corresponds to the JSON property `triggerTemplate`
668
+ # @return [Google::Apis::CloudbuildV1::RepoSource]
669
+ attr_accessor :trigger_template
670
+
671
+ def initialize(**args)
672
+ update!(**args)
673
+ end
674
+
675
+ # Update properties of this object
676
+ def update!(**args)
677
+ @build = args[:build] if args.key?(:build)
678
+ @create_time = args[:create_time] if args.key?(:create_time)
679
+ @description = args[:description] if args.key?(:description)
680
+ @disabled = args[:disabled] if args.key?(:disabled)
681
+ @filename = args[:filename] if args.key?(:filename)
682
+ @github = args[:github] if args.key?(:github)
683
+ @id = args[:id] if args.key?(:id)
684
+ @ignored_files = args[:ignored_files] if args.key?(:ignored_files)
685
+ @included_files = args[:included_files] if args.key?(:included_files)
686
+ @name = args[:name] if args.key?(:name)
687
+ @substitutions = args[:substitutions] if args.key?(:substitutions)
688
+ @tags = args[:tags] if args.key?(:tags)
689
+ @trigger_template = args[:trigger_template] if args.key?(:trigger_template)
690
+ end
691
+ end
692
+
693
+ # An image built by the pipeline.
694
+ class BuiltImage
695
+ include Google::Apis::Core::Hashable
696
+
697
+ # Docker Registry 2.0 digest.
698
+ # Corresponds to the JSON property `digest`
699
+ # @return [String]
700
+ attr_accessor :digest
701
+
702
+ # Name used to push the container image to Google Container Registry, as
703
+ # presented to `docker push`.
704
+ # Corresponds to the JSON property `name`
705
+ # @return [String]
706
+ attr_accessor :name
707
+
708
+ # Start and end times for a build execution phase.
709
+ # Corresponds to the JSON property `pushTiming`
710
+ # @return [Google::Apis::CloudbuildV1::TimeSpan]
711
+ attr_accessor :push_timing
712
+
713
+ def initialize(**args)
714
+ update!(**args)
715
+ end
716
+
717
+ # Update properties of this object
718
+ def update!(**args)
719
+ @digest = args[:digest] if args.key?(:digest)
720
+ @name = args[:name] if args.key?(:name)
721
+ @push_timing = args[:push_timing] if args.key?(:push_timing)
722
+ end
723
+ end
724
+
725
+ # Request to cancel an ongoing build.
726
+ class CancelBuildRequest
727
+ include Google::Apis::Core::Hashable
728
+
729
+ # Required. ID of the build.
730
+ # Corresponds to the JSON property `id`
731
+ # @return [String]
732
+ attr_accessor :id
733
+
734
+ # The name of the `Build` to cancel. Format: `projects/`project`/locations/`
735
+ # location`/builds/`build``
736
+ # Corresponds to the JSON property `name`
737
+ # @return [String]
738
+ attr_accessor :name
739
+
740
+ # Required. ID of the project.
741
+ # Corresponds to the JSON property `projectId`
742
+ # @return [String]
743
+ attr_accessor :project_id
744
+
745
+ def initialize(**args)
746
+ update!(**args)
747
+ end
748
+
749
+ # Update properties of this object
750
+ def update!(**args)
751
+ @id = args[:id] if args.key?(:id)
752
+ @name = args[:name] if args.key?(:name)
753
+ @project_id = args[:project_id] if args.key?(:project_id)
754
+ end
755
+ end
756
+
757
+ # The request message for Operations.CancelOperation.
758
+ class CancelOperationRequest
759
+ include Google::Apis::Core::Hashable
760
+
761
+ def initialize(**args)
762
+ update!(**args)
763
+ end
764
+
765
+ # Update properties of this object
766
+ def update!(**args)
767
+ end
768
+ end
769
+
770
+ # A generic empty message that you can re-use to avoid defining duplicated empty
771
+ # messages in your APIs. A typical example is to use it as the request or the
772
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
773
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
774
+ # `Empty` is empty JSON object ````.
775
+ class Empty
776
+ include Google::Apis::Core::Hashable
777
+
778
+ def initialize(**args)
779
+ update!(**args)
780
+ end
781
+
782
+ # Update properties of this object
783
+ def update!(**args)
784
+ end
785
+ end
786
+
787
+ # Container message for hashes of byte content of files, used in
788
+ # SourceProvenance messages to verify integrity of source input to the build.
789
+ class FileHashes
790
+ include Google::Apis::Core::Hashable
791
+
792
+ # Collection of file hashes.
793
+ # Corresponds to the JSON property `fileHash`
794
+ # @return [Array<Google::Apis::CloudbuildV1::HashProp>]
795
+ attr_accessor :file_hash
796
+
797
+ def initialize(**args)
798
+ update!(**args)
799
+ end
800
+
801
+ # Update properties of this object
802
+ def update!(**args)
803
+ @file_hash = args[:file_hash] if args.key?(:file_hash)
804
+ end
805
+ end
806
+
807
+ # GitHubEventsConfig describes the configuration of a trigger that creates a
808
+ # build whenever a GitHub event is received. This message is experimental.
809
+ class GitHubEventsConfig
810
+ include Google::Apis::Core::Hashable
811
+
812
+ # The installationID that emits the GitHub event.
813
+ # Corresponds to the JSON property `installationId`
814
+ # @return [Fixnum]
815
+ attr_accessor :installation_id
816
+
817
+ # Name of the repository. For example: The name for https://github.com/
818
+ # googlecloudplatform/cloud-builders is "cloud-builders".
819
+ # Corresponds to the JSON property `name`
820
+ # @return [String]
821
+ attr_accessor :name
822
+
823
+ # Owner of the repository. For example: The owner for https://github.com/
824
+ # googlecloudplatform/cloud-builders is "googlecloudplatform".
825
+ # Corresponds to the JSON property `owner`
826
+ # @return [String]
827
+ attr_accessor :owner
828
+
829
+ # PullRequestFilter contains filter properties for matching GitHub Pull Requests.
830
+ # Corresponds to the JSON property `pullRequest`
831
+ # @return [Google::Apis::CloudbuildV1::PullRequestFilter]
832
+ attr_accessor :pull_request
833
+
834
+ # Push contains filter properties for matching GitHub git pushes.
835
+ # Corresponds to the JSON property `push`
836
+ # @return [Google::Apis::CloudbuildV1::PushFilter]
837
+ attr_accessor :push
838
+
839
+ def initialize(**args)
840
+ update!(**args)
841
+ end
842
+
843
+ # Update properties of this object
844
+ def update!(**args)
845
+ @installation_id = args[:installation_id] if args.key?(:installation_id)
846
+ @name = args[:name] if args.key?(:name)
847
+ @owner = args[:owner] if args.key?(:owner)
848
+ @pull_request = args[:pull_request] if args.key?(:pull_request)
849
+ @push = args[:push] if args.key?(:push)
850
+ end
851
+ end
852
+
853
+ # HTTPDelivery is the delivery configuration for an HTTP notification.
854
+ class HttpDelivery
855
+ include Google::Apis::Core::Hashable
856
+
857
+ # The URI to which JSON-containing HTTP POST requests should be sent.
858
+ # Corresponds to the JSON property `uri`
859
+ # @return [String]
860
+ attr_accessor :uri
861
+
862
+ def initialize(**args)
863
+ update!(**args)
864
+ end
865
+
866
+ # Update properties of this object
867
+ def update!(**args)
868
+ @uri = args[:uri] if args.key?(:uri)
869
+ end
870
+ end
871
+
872
+ # Container message for hash values.
873
+ class HashProp
874
+ include Google::Apis::Core::Hashable
875
+
876
+ # The type of hash that was performed.
877
+ # Corresponds to the JSON property `type`
878
+ # @return [String]
879
+ attr_accessor :type
880
+
881
+ # The hash value.
882
+ # Corresponds to the JSON property `value`
883
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
884
+ # @return [String]
885
+ attr_accessor :value
886
+
887
+ def initialize(**args)
888
+ update!(**args)
889
+ end
890
+
891
+ # Update properties of this object
892
+ def update!(**args)
893
+ @type = args[:type] if args.key?(:type)
894
+ @value = args[:value] if args.key?(:value)
895
+ end
896
+ end
897
+
898
+ # Response containing existing `BuildTriggers`.
899
+ class ListBuildTriggersResponse
900
+ include Google::Apis::Core::Hashable
901
+
902
+ # Token to receive the next page of results.
903
+ # Corresponds to the JSON property `nextPageToken`
904
+ # @return [String]
905
+ attr_accessor :next_page_token
906
+
907
+ # `BuildTriggers` for the project, sorted by `create_time` descending.
908
+ # Corresponds to the JSON property `triggers`
909
+ # @return [Array<Google::Apis::CloudbuildV1::BuildTrigger>]
910
+ attr_accessor :triggers
911
+
912
+ def initialize(**args)
913
+ update!(**args)
914
+ end
915
+
916
+ # Update properties of this object
917
+ def update!(**args)
918
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
919
+ @triggers = args[:triggers] if args.key?(:triggers)
920
+ end
921
+ end
922
+
923
+ # Response including listed builds.
924
+ class ListBuildsResponse
925
+ include Google::Apis::Core::Hashable
926
+
927
+ # Builds will be sorted by `create_time`, descending.
928
+ # Corresponds to the JSON property `builds`
929
+ # @return [Array<Google::Apis::CloudbuildV1::Build>]
930
+ attr_accessor :builds
931
+
932
+ # Token to receive the next page of results. This will be absent if the end of
933
+ # the response list has been reached.
934
+ # Corresponds to the JSON property `nextPageToken`
935
+ # @return [String]
936
+ attr_accessor :next_page_token
937
+
938
+ def initialize(**args)
939
+ update!(**args)
940
+ end
941
+
942
+ # Update properties of this object
943
+ def update!(**args)
944
+ @builds = args[:builds] if args.key?(:builds)
945
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
946
+ end
947
+ end
948
+
949
+ # Notification is the container which holds the data that is relevant to this
950
+ # particular notification.
951
+ class Notification
952
+ include Google::Apis::Core::Hashable
953
+
954
+ # The filter string to use for notification filtering. Currently, this is
955
+ # assumed to be a CEL program. See https://opensource.google/projects/cel for
956
+ # more.
957
+ # Corresponds to the JSON property `filter`
958
+ # @return [String]
959
+ attr_accessor :filter
960
+
961
+ # HTTPDelivery is the delivery configuration for an HTTP notification.
962
+ # Corresponds to the JSON property `httpDelivery`
963
+ # @return [Google::Apis::CloudbuildV1::HttpDelivery]
964
+ attr_accessor :http_delivery
965
+
966
+ # SlackDelivery is the delivery configuration for delivering Slack messages via
967
+ # webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/
968
+ # webhooks.
969
+ # Corresponds to the JSON property `slackDelivery`
970
+ # @return [Google::Apis::CloudbuildV1::SlackDelivery]
971
+ attr_accessor :slack_delivery
972
+
973
+ # SMTPDelivery is the delivery configuration for an SMTP (email) notification.
974
+ # Corresponds to the JSON property `smtpDelivery`
975
+ # @return [Google::Apis::CloudbuildV1::SmtpDelivery]
976
+ attr_accessor :smtp_delivery
977
+
978
+ # Escape hatch for users to supply custom delivery configs.
979
+ # Corresponds to the JSON property `structDelivery`
980
+ # @return [Hash<String,Object>]
981
+ attr_accessor :struct_delivery
982
+
983
+ def initialize(**args)
984
+ update!(**args)
985
+ end
986
+
987
+ # Update properties of this object
988
+ def update!(**args)
989
+ @filter = args[:filter] if args.key?(:filter)
990
+ @http_delivery = args[:http_delivery] if args.key?(:http_delivery)
991
+ @slack_delivery = args[:slack_delivery] if args.key?(:slack_delivery)
992
+ @smtp_delivery = args[:smtp_delivery] if args.key?(:smtp_delivery)
993
+ @struct_delivery = args[:struct_delivery] if args.key?(:struct_delivery)
994
+ end
995
+ end
996
+
997
+ # NotifierConfig is the top-level configuration message.
998
+ class NotifierConfig
999
+ include Google::Apis::Core::Hashable
1000
+
1001
+ # The API version of this configuration format.
1002
+ # Corresponds to the JSON property `apiVersion`
1003
+ # @return [String]
1004
+ attr_accessor :api_version
1005
+
1006
+ # The type of notifier to use (e.g. SMTPNotifier).
1007
+ # Corresponds to the JSON property `kind`
1008
+ # @return [String]
1009
+ attr_accessor :kind
1010
+
1011
+ # NotifierMetadata contains the data which can be used to reference or describe
1012
+ # this notifier.
1013
+ # Corresponds to the JSON property `metadata`
1014
+ # @return [Google::Apis::CloudbuildV1::NotifierMetadata]
1015
+ attr_accessor :metadata
1016
+
1017
+ # NotifierSpec is the configuration container for notifications.
1018
+ # Corresponds to the JSON property `spec`
1019
+ # @return [Google::Apis::CloudbuildV1::NotifierSpec]
1020
+ attr_accessor :spec
1021
+
1022
+ def initialize(**args)
1023
+ update!(**args)
1024
+ end
1025
+
1026
+ # Update properties of this object
1027
+ def update!(**args)
1028
+ @api_version = args[:api_version] if args.key?(:api_version)
1029
+ @kind = args[:kind] if args.key?(:kind)
1030
+ @metadata = args[:metadata] if args.key?(:metadata)
1031
+ @spec = args[:spec] if args.key?(:spec)
1032
+ end
1033
+ end
1034
+
1035
+ # NotifierMetadata contains the data which can be used to reference or describe
1036
+ # this notifier.
1037
+ class NotifierMetadata
1038
+ include Google::Apis::Core::Hashable
1039
+
1040
+ # The human-readable and user-given name for the notifier. For example: "repo-
1041
+ # merge-email-notifier".
1042
+ # Corresponds to the JSON property `name`
1043
+ # @return [String]
1044
+ attr_accessor :name
1045
+
1046
+ # The string representing the name and version of notifier to deploy. Expected
1047
+ # to be of the form of "/:". For example: "gcr.io/my-project/notifiers/smtp:1.2.
1048
+ # 34".
1049
+ # Corresponds to the JSON property `notifier`
1050
+ # @return [String]
1051
+ attr_accessor :notifier
1052
+
1053
+ def initialize(**args)
1054
+ update!(**args)
1055
+ end
1056
+
1057
+ # Update properties of this object
1058
+ def update!(**args)
1059
+ @name = args[:name] if args.key?(:name)
1060
+ @notifier = args[:notifier] if args.key?(:notifier)
1061
+ end
1062
+ end
1063
+
1064
+ # NotifierSecret is the container that maps a secret name (reference) to its
1065
+ # Google Cloud Secret Manager resource path.
1066
+ class NotifierSecret
1067
+ include Google::Apis::Core::Hashable
1068
+
1069
+ # Name is the local name of the secret, such as the verbatim string "my-smtp-
1070
+ # password".
1071
+ # Corresponds to the JSON property `name`
1072
+ # @return [String]
1073
+ attr_accessor :name
1074
+
1075
+ # Value is interpreted to be a resource path for fetching the actual (versioned)
1076
+ # secret data for this secret. For example, this would be a Google Cloud Secret
1077
+ # Manager secret version resource path like: "projects/my-project/secrets/my-
1078
+ # secret/versions/latest".
1079
+ # Corresponds to the JSON property `value`
1080
+ # @return [String]
1081
+ attr_accessor :value
1082
+
1083
+ def initialize(**args)
1084
+ update!(**args)
1085
+ end
1086
+
1087
+ # Update properties of this object
1088
+ def update!(**args)
1089
+ @name = args[:name] if args.key?(:name)
1090
+ @value = args[:value] if args.key?(:value)
1091
+ end
1092
+ end
1093
+
1094
+ # NotifierSecretRef contains the reference to a secret stored in the
1095
+ # corresponding NotifierSpec.
1096
+ class NotifierSecretRef
1097
+ include Google::Apis::Core::Hashable
1098
+
1099
+ # The value of `secret_ref` should be a `name` that is registered in a `Secret`
1100
+ # in the `secrets` list of the `Spec`.
1101
+ # Corresponds to the JSON property `secretRef`
1102
+ # @return [String]
1103
+ attr_accessor :secret_ref
1104
+
1105
+ def initialize(**args)
1106
+ update!(**args)
1107
+ end
1108
+
1109
+ # Update properties of this object
1110
+ def update!(**args)
1111
+ @secret_ref = args[:secret_ref] if args.key?(:secret_ref)
1112
+ end
1113
+ end
1114
+
1115
+ # NotifierSpec is the configuration container for notifications.
1116
+ class NotifierSpec
1117
+ include Google::Apis::Core::Hashable
1118
+
1119
+ # Notification is the container which holds the data that is relevant to this
1120
+ # particular notification.
1121
+ # Corresponds to the JSON property `notification`
1122
+ # @return [Google::Apis::CloudbuildV1::Notification]
1123
+ attr_accessor :notification
1124
+
1125
+ # Configurations for secret resources used by this particular notifier.
1126
+ # Corresponds to the JSON property `secrets`
1127
+ # @return [Array<Google::Apis::CloudbuildV1::NotifierSecret>]
1128
+ attr_accessor :secrets
1129
+
1130
+ def initialize(**args)
1131
+ update!(**args)
1132
+ end
1133
+
1134
+ # Update properties of this object
1135
+ def update!(**args)
1136
+ @notification = args[:notification] if args.key?(:notification)
1137
+ @secrets = args[:secrets] if args.key?(:secrets)
1138
+ end
1139
+ end
1140
+
1141
+ # This resource represents a long-running operation that is the result of a
1142
+ # network API call.
1143
+ class Operation
1144
+ include Google::Apis::Core::Hashable
1145
+
1146
+ # If the value is `false`, it means the operation is still in progress. If `true`
1147
+ # , the operation is completed, and either `error` or `response` is available.
1148
+ # Corresponds to the JSON property `done`
1149
+ # @return [Boolean]
1150
+ attr_accessor :done
1151
+ alias_method :done?, :done
1152
+
1153
+ # The `Status` type defines a logical error model that is suitable for different
1154
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1155
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1156
+ # data: error code, error message, and error details. You can find out more
1157
+ # about this error model and how to work with it in the [API Design Guide](https:
1158
+ # //cloud.google.com/apis/design/errors).
1159
+ # Corresponds to the JSON property `error`
1160
+ # @return [Google::Apis::CloudbuildV1::Status]
1161
+ attr_accessor :error
1162
+
1163
+ # Service-specific metadata associated with the operation. It typically contains
1164
+ # progress information and common metadata such as create time. Some services
1165
+ # might not provide such metadata. Any method that returns a long-running
1166
+ # operation should document the metadata type, if any.
1167
+ # Corresponds to the JSON property `metadata`
1168
+ # @return [Hash<String,Object>]
1169
+ attr_accessor :metadata
1170
+
1171
+ # The server-assigned name, which is only unique within the same service that
1172
+ # originally returns it. If you use the default HTTP mapping, the `name` should
1173
+ # be a resource name ending with `operations/`unique_id``.
1174
+ # Corresponds to the JSON property `name`
1175
+ # @return [String]
1176
+ attr_accessor :name
1177
+
1178
+ # The normal response of the operation in case of success. If the original
1179
+ # method returns no data on success, such as `Delete`, the response is `google.
1180
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
1181
+ # the response should be the resource. For other methods, the response should
1182
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
1183
+ # example, if the original method name is `TakeSnapshot()`, the inferred
1184
+ # response type is `TakeSnapshotResponse`.
1185
+ # Corresponds to the JSON property `response`
1186
+ # @return [Hash<String,Object>]
1187
+ attr_accessor :response
1188
+
1189
+ def initialize(**args)
1190
+ update!(**args)
1191
+ end
1192
+
1193
+ # Update properties of this object
1194
+ def update!(**args)
1195
+ @done = args[:done] if args.key?(:done)
1196
+ @error = args[:error] if args.key?(:error)
1197
+ @metadata = args[:metadata] if args.key?(:metadata)
1198
+ @name = args[:name] if args.key?(:name)
1199
+ @response = args[:response] if args.key?(:response)
1200
+ end
1201
+ end
1202
+
1203
+ # PullRequestFilter contains filter properties for matching GitHub Pull Requests.
1204
+ class PullRequestFilter
1205
+ include Google::Apis::Core::Hashable
1206
+
1207
+ # Regex of branches to match. The syntax of the regular expressions accepted is
1208
+ # the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/
1209
+ # Syntax
1210
+ # Corresponds to the JSON property `branch`
1211
+ # @return [String]
1212
+ attr_accessor :branch
1213
+
1214
+ # Configure builds to run whether a repository owner or collaborator need to
1215
+ # comment `/gcbrun`.
1216
+ # Corresponds to the JSON property `commentControl`
1217
+ # @return [String]
1218
+ attr_accessor :comment_control
1219
+
1220
+ # If true, branches that do NOT match the git_ref will trigger a build.
1221
+ # Corresponds to the JSON property `invertRegex`
1222
+ # @return [Boolean]
1223
+ attr_accessor :invert_regex
1224
+ alias_method :invert_regex?, :invert_regex
1225
+
1226
+ def initialize(**args)
1227
+ update!(**args)
1228
+ end
1229
+
1230
+ # Update properties of this object
1231
+ def update!(**args)
1232
+ @branch = args[:branch] if args.key?(:branch)
1233
+ @comment_control = args[:comment_control] if args.key?(:comment_control)
1234
+ @invert_regex = args[:invert_regex] if args.key?(:invert_regex)
1235
+ end
1236
+ end
1237
+
1238
+ # Push contains filter properties for matching GitHub git pushes.
1239
+ class PushFilter
1240
+ include Google::Apis::Core::Hashable
1241
+
1242
+ # Regexes matching branches to build. The syntax of the regular expressions
1243
+ # accepted is the syntax accepted by RE2 and described at https://github.com/
1244
+ # google/re2/wiki/Syntax
1245
+ # Corresponds to the JSON property `branch`
1246
+ # @return [String]
1247
+ attr_accessor :branch
1248
+
1249
+ # When true, only trigger a build if the revision regex does NOT match the
1250
+ # git_ref regex.
1251
+ # Corresponds to the JSON property `invertRegex`
1252
+ # @return [Boolean]
1253
+ attr_accessor :invert_regex
1254
+ alias_method :invert_regex?, :invert_regex
1255
+
1256
+ # Regexes matching tags to build. The syntax of the regular expressions accepted
1257
+ # is the syntax accepted by RE2 and described at https://github.com/google/re2/
1258
+ # wiki/Syntax
1259
+ # Corresponds to the JSON property `tag`
1260
+ # @return [String]
1261
+ attr_accessor :tag
1262
+
1263
+ def initialize(**args)
1264
+ update!(**args)
1265
+ end
1266
+
1267
+ # Update properties of this object
1268
+ def update!(**args)
1269
+ @branch = args[:branch] if args.key?(:branch)
1270
+ @invert_regex = args[:invert_regex] if args.key?(:invert_regex)
1271
+ @tag = args[:tag] if args.key?(:tag)
1272
+ end
1273
+ end
1274
+
1275
+ # Location of the source in a Google Cloud Source Repository.
1276
+ class RepoSource
1277
+ include Google::Apis::Core::Hashable
1278
+
1279
+ # Regex matching branches to build. The syntax of the regular expressions
1280
+ # accepted is the syntax accepted by RE2 and described at https://github.com/
1281
+ # google/re2/wiki/Syntax
1282
+ # Corresponds to the JSON property `branchName`
1283
+ # @return [String]
1284
+ attr_accessor :branch_name
1285
+
1286
+ # Explicit commit SHA to build.
1287
+ # Corresponds to the JSON property `commitSha`
1288
+ # @return [String]
1289
+ attr_accessor :commit_sha
1290
+
1291
+ # Directory, relative to the source root, in which to run the build. This must
1292
+ # be a relative path. If a step's `dir` is specified and is an absolute path,
1293
+ # this value is ignored for that step's execution.
1294
+ # Corresponds to the JSON property `dir`
1295
+ # @return [String]
1296
+ attr_accessor :dir
1297
+
1298
+ # Only trigger a build if the revision regex does NOT match the revision regex.
1299
+ # Corresponds to the JSON property `invertRegex`
1300
+ # @return [Boolean]
1301
+ attr_accessor :invert_regex
1302
+ alias_method :invert_regex?, :invert_regex
1303
+
1304
+ # ID of the project that owns the Cloud Source Repository. If omitted, the
1305
+ # project ID requesting the build is assumed.
1306
+ # Corresponds to the JSON property `projectId`
1307
+ # @return [String]
1308
+ attr_accessor :project_id
1309
+
1310
+ # Required. Name of the Cloud Source Repository.
1311
+ # Corresponds to the JSON property `repoName`
1312
+ # @return [String]
1313
+ attr_accessor :repo_name
1314
+
1315
+ # Substitutions to use in a triggered build. Should only be used with
1316
+ # RunBuildTrigger
1317
+ # Corresponds to the JSON property `substitutions`
1318
+ # @return [Hash<String,String>]
1319
+ attr_accessor :substitutions
1320
+
1321
+ # Regex matching tags to build. The syntax of the regular expressions accepted
1322
+ # is the syntax accepted by RE2 and described at https://github.com/google/re2/
1323
+ # wiki/Syntax
1324
+ # Corresponds to the JSON property `tagName`
1325
+ # @return [String]
1326
+ attr_accessor :tag_name
1327
+
1328
+ def initialize(**args)
1329
+ update!(**args)
1330
+ end
1331
+
1332
+ # Update properties of this object
1333
+ def update!(**args)
1334
+ @branch_name = args[:branch_name] if args.key?(:branch_name)
1335
+ @commit_sha = args[:commit_sha] if args.key?(:commit_sha)
1336
+ @dir = args[:dir] if args.key?(:dir)
1337
+ @invert_regex = args[:invert_regex] if args.key?(:invert_regex)
1338
+ @project_id = args[:project_id] if args.key?(:project_id)
1339
+ @repo_name = args[:repo_name] if args.key?(:repo_name)
1340
+ @substitutions = args[:substitutions] if args.key?(:substitutions)
1341
+ @tag_name = args[:tag_name] if args.key?(:tag_name)
1342
+ end
1343
+ end
1344
+
1345
+ # Artifacts created by the build pipeline.
1346
+ class Results
1347
+ include Google::Apis::Core::Hashable
1348
+
1349
+ # Path to the artifact manifest. Only populated when artifacts are uploaded.
1350
+ # Corresponds to the JSON property `artifactManifest`
1351
+ # @return [String]
1352
+ attr_accessor :artifact_manifest
1353
+
1354
+ # Start and end times for a build execution phase.
1355
+ # Corresponds to the JSON property `artifactTiming`
1356
+ # @return [Google::Apis::CloudbuildV1::TimeSpan]
1357
+ attr_accessor :artifact_timing
1358
+
1359
+ # List of build step digests, in the order corresponding to build step indices.
1360
+ # Corresponds to the JSON property `buildStepImages`
1361
+ # @return [Array<String>]
1362
+ attr_accessor :build_step_images
1363
+
1364
+ # List of build step outputs, produced by builder images, in the order
1365
+ # corresponding to build step indices. [Cloud Builders](https://cloud.google.com/
1366
+ # cloud-build/docs/cloud-builders) can produce this output by writing to `$
1367
+ # BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
1368
+ # Corresponds to the JSON property `buildStepOutputs`
1369
+ # @return [Array<String>]
1370
+ attr_accessor :build_step_outputs
1371
+
1372
+ # Container images that were built as a part of the build.
1373
+ # Corresponds to the JSON property `images`
1374
+ # @return [Array<Google::Apis::CloudbuildV1::BuiltImage>]
1375
+ attr_accessor :images
1376
+
1377
+ # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1378
+ # Corresponds to the JSON property `numArtifacts`
1379
+ # @return [Fixnum]
1380
+ attr_accessor :num_artifacts
1381
+
1382
+ def initialize(**args)
1383
+ update!(**args)
1384
+ end
1385
+
1386
+ # Update properties of this object
1387
+ def update!(**args)
1388
+ @artifact_manifest = args[:artifact_manifest] if args.key?(:artifact_manifest)
1389
+ @artifact_timing = args[:artifact_timing] if args.key?(:artifact_timing)
1390
+ @build_step_images = args[:build_step_images] if args.key?(:build_step_images)
1391
+ @build_step_outputs = args[:build_step_outputs] if args.key?(:build_step_outputs)
1392
+ @images = args[:images] if args.key?(:images)
1393
+ @num_artifacts = args[:num_artifacts] if args.key?(:num_artifacts)
1394
+ end
1395
+ end
1396
+
1397
+ # Specifies a build to retry.
1398
+ class RetryBuildRequest
1399
+ include Google::Apis::Core::Hashable
1400
+
1401
+ # Required. Build ID of the original build.
1402
+ # Corresponds to the JSON property `id`
1403
+ # @return [String]
1404
+ attr_accessor :id
1405
+
1406
+ # The name of the `Build` to retry. Format: `projects/`project`/locations/`
1407
+ # location`/builds/`build``
1408
+ # Corresponds to the JSON property `name`
1409
+ # @return [String]
1410
+ attr_accessor :name
1411
+
1412
+ # Required. ID of the project.
1413
+ # Corresponds to the JSON property `projectId`
1414
+ # @return [String]
1415
+ attr_accessor :project_id
1416
+
1417
+ def initialize(**args)
1418
+ update!(**args)
1419
+ end
1420
+
1421
+ # Update properties of this object
1422
+ def update!(**args)
1423
+ @id = args[:id] if args.key?(:id)
1424
+ @name = args[:name] if args.key?(:name)
1425
+ @project_id = args[:project_id] if args.key?(:project_id)
1426
+ end
1427
+ end
1428
+
1429
+ # SMTPDelivery is the delivery configuration for an SMTP (email) notification.
1430
+ class SmtpDelivery
1431
+ include Google::Apis::Core::Hashable
1432
+
1433
+ # This is the SMTP account/email that appears in the `From:` of the email. If
1434
+ # empty, it is assumed to be sender.
1435
+ # Corresponds to the JSON property `fromAddress`
1436
+ # @return [String]
1437
+ attr_accessor :from_address
1438
+
1439
+ # NotifierSecretRef contains the reference to a secret stored in the
1440
+ # corresponding NotifierSpec.
1441
+ # Corresponds to the JSON property `password`
1442
+ # @return [Google::Apis::CloudbuildV1::NotifierSecretRef]
1443
+ attr_accessor :password
1444
+
1445
+ # The SMTP port of the server.
1446
+ # Corresponds to the JSON property `port`
1447
+ # @return [String]
1448
+ attr_accessor :port
1449
+
1450
+ # This is the list of addresses to which we send the email (i.e. in the `To:` of
1451
+ # the email).
1452
+ # Corresponds to the JSON property `recipientAddresses`
1453
+ # @return [Array<String>]
1454
+ attr_accessor :recipient_addresses
1455
+
1456
+ # This is the SMTP account/email that is used to send the message.
1457
+ # Corresponds to the JSON property `senderAddress`
1458
+ # @return [String]
1459
+ attr_accessor :sender_address
1460
+
1461
+ # The address of the SMTP server.
1462
+ # Corresponds to the JSON property `server`
1463
+ # @return [String]
1464
+ attr_accessor :server
1465
+
1466
+ def initialize(**args)
1467
+ update!(**args)
1468
+ end
1469
+
1470
+ # Update properties of this object
1471
+ def update!(**args)
1472
+ @from_address = args[:from_address] if args.key?(:from_address)
1473
+ @password = args[:password] if args.key?(:password)
1474
+ @port = args[:port] if args.key?(:port)
1475
+ @recipient_addresses = args[:recipient_addresses] if args.key?(:recipient_addresses)
1476
+ @sender_address = args[:sender_address] if args.key?(:sender_address)
1477
+ @server = args[:server] if args.key?(:server)
1478
+ end
1479
+ end
1480
+
1481
+ # Pairs a set of secret environment variables containing encrypted values with
1482
+ # the Cloud KMS key to use to decrypt the value.
1483
+ class Secret
1484
+ include Google::Apis::Core::Hashable
1485
+
1486
+ # Cloud KMS key name to use to decrypt these envs.
1487
+ # Corresponds to the JSON property `kmsKeyName`
1488
+ # @return [String]
1489
+ attr_accessor :kms_key_name
1490
+
1491
+ # Map of environment variable name to its encrypted value. Secret environment
1492
+ # variables must be unique across all of a build's secrets, and must be used by
1493
+ # at least one build step. Values can be at most 64 KB in size. There can be at
1494
+ # most 100 secret values across all of a build's secrets.
1495
+ # Corresponds to the JSON property `secretEnv`
1496
+ # @return [Hash<String,String>]
1497
+ attr_accessor :secret_env
1498
+
1499
+ def initialize(**args)
1500
+ update!(**args)
1501
+ end
1502
+
1503
+ # Update properties of this object
1504
+ def update!(**args)
1505
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1506
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
1507
+ end
1508
+ end
1509
+
1510
+ # SlackDelivery is the delivery configuration for delivering Slack messages via
1511
+ # webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/
1512
+ # webhooks.
1513
+ class SlackDelivery
1514
+ include Google::Apis::Core::Hashable
1515
+
1516
+ # NotifierSecretRef contains the reference to a secret stored in the
1517
+ # corresponding NotifierSpec.
1518
+ # Corresponds to the JSON property `webhookUri`
1519
+ # @return [Google::Apis::CloudbuildV1::NotifierSecretRef]
1520
+ attr_accessor :webhook_uri
1521
+
1522
+ def initialize(**args)
1523
+ update!(**args)
1524
+ end
1525
+
1526
+ # Update properties of this object
1527
+ def update!(**args)
1528
+ @webhook_uri = args[:webhook_uri] if args.key?(:webhook_uri)
1529
+ end
1530
+ end
1531
+
1532
+ # Location of the source in a supported storage service.
1533
+ class Source
1534
+ include Google::Apis::Core::Hashable
1535
+
1536
+ # Location of the source in a Google Cloud Source Repository.
1537
+ # Corresponds to the JSON property `repoSource`
1538
+ # @return [Google::Apis::CloudbuildV1::RepoSource]
1539
+ attr_accessor :repo_source
1540
+
1541
+ # Location of the source in an archive file in Google Cloud Storage.
1542
+ # Corresponds to the JSON property `storageSource`
1543
+ # @return [Google::Apis::CloudbuildV1::StorageSource]
1544
+ attr_accessor :storage_source
1545
+
1546
+ def initialize(**args)
1547
+ update!(**args)
1548
+ end
1549
+
1550
+ # Update properties of this object
1551
+ def update!(**args)
1552
+ @repo_source = args[:repo_source] if args.key?(:repo_source)
1553
+ @storage_source = args[:storage_source] if args.key?(:storage_source)
1554
+ end
1555
+ end
1556
+
1557
+ # Provenance of the source. Ways to find the original source, or verify that
1558
+ # some source was used for this build.
1559
+ class SourceProvenance
1560
+ include Google::Apis::Core::Hashable
1561
+
1562
+ # Output only. Hash(es) of the build source, which can be used to verify that
1563
+ # the original source integrity was maintained in the build. Note that `
1564
+ # FileHashes` will only be populated if `BuildOptions` has requested a `
1565
+ # SourceProvenanceHash`. The keys to this map are file paths used as build
1566
+ # source and the values contain the hash values for those files. If the build
1567
+ # source came in a single package such as a gzipped tarfile (`.tar.gz`), the `
1568
+ # FileHash` will be for the single path to that file.
1569
+ # Corresponds to the JSON property `fileHashes`
1570
+ # @return [Hash<String,Google::Apis::CloudbuildV1::FileHashes>]
1571
+ attr_accessor :file_hashes
1572
+
1573
+ # Location of the source in a Google Cloud Source Repository.
1574
+ # Corresponds to the JSON property `resolvedRepoSource`
1575
+ # @return [Google::Apis::CloudbuildV1::RepoSource]
1576
+ attr_accessor :resolved_repo_source
1577
+
1578
+ # Location of the source in an archive file in Google Cloud Storage.
1579
+ # Corresponds to the JSON property `resolvedStorageSource`
1580
+ # @return [Google::Apis::CloudbuildV1::StorageSource]
1581
+ attr_accessor :resolved_storage_source
1582
+
1583
+ def initialize(**args)
1584
+ update!(**args)
1585
+ end
1586
+
1587
+ # Update properties of this object
1588
+ def update!(**args)
1589
+ @file_hashes = args[:file_hashes] if args.key?(:file_hashes)
1590
+ @resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source)
1591
+ @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source)
1592
+ end
1593
+ end
1594
+
1595
+ # The `Status` type defines a logical error model that is suitable for different
1596
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1597
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1598
+ # data: error code, error message, and error details. You can find out more
1599
+ # about this error model and how to work with it in the [API Design Guide](https:
1600
+ # //cloud.google.com/apis/design/errors).
1601
+ class Status
1602
+ include Google::Apis::Core::Hashable
1603
+
1604
+ # The status code, which should be an enum value of google.rpc.Code.
1605
+ # Corresponds to the JSON property `code`
1606
+ # @return [Fixnum]
1607
+ attr_accessor :code
1608
+
1609
+ # A list of messages that carry the error details. There is a common set of
1610
+ # message types for APIs to use.
1611
+ # Corresponds to the JSON property `details`
1612
+ # @return [Array<Hash<String,Object>>]
1613
+ attr_accessor :details
1614
+
1615
+ # A developer-facing error message, which should be in English. Any user-facing
1616
+ # error message should be localized and sent in the google.rpc.Status.details
1617
+ # field, or localized by the client.
1618
+ # Corresponds to the JSON property `message`
1619
+ # @return [String]
1620
+ attr_accessor :message
1621
+
1622
+ def initialize(**args)
1623
+ update!(**args)
1624
+ end
1625
+
1626
+ # Update properties of this object
1627
+ def update!(**args)
1628
+ @code = args[:code] if args.key?(:code)
1629
+ @details = args[:details] if args.key?(:details)
1630
+ @message = args[:message] if args.key?(:message)
1631
+ end
1632
+ end
1633
+
1634
+ # Location of the source in an archive file in Google Cloud Storage.
1635
+ class StorageSource
1636
+ include Google::Apis::Core::Hashable
1637
+
1638
+ # Google Cloud Storage bucket containing the source (see [Bucket Name
1639
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
1640
+ # ).
1641
+ # Corresponds to the JSON property `bucket`
1642
+ # @return [String]
1643
+ attr_accessor :bucket
1644
+
1645
+ # Google Cloud Storage generation for the object. If the generation is omitted,
1646
+ # the latest generation will be used.
1647
+ # Corresponds to the JSON property `generation`
1648
+ # @return [Fixnum]
1649
+ attr_accessor :generation
1650
+
1651
+ # Google Cloud Storage object containing the source. This object must be a
1652
+ # gzipped archive file (`.tar.gz`) containing source to build.
1653
+ # Corresponds to the JSON property `object`
1654
+ # @return [String]
1655
+ attr_accessor :object
1656
+
1657
+ def initialize(**args)
1658
+ update!(**args)
1659
+ end
1660
+
1661
+ # Update properties of this object
1662
+ def update!(**args)
1663
+ @bucket = args[:bucket] if args.key?(:bucket)
1664
+ @generation = args[:generation] if args.key?(:generation)
1665
+ @object = args[:object] if args.key?(:object)
1666
+ end
1667
+ end
1668
+
1669
+ # Start and end times for a build execution phase.
1670
+ class TimeSpan
1671
+ include Google::Apis::Core::Hashable
1672
+
1673
+ # End of time span.
1674
+ # Corresponds to the JSON property `endTime`
1675
+ # @return [String]
1676
+ attr_accessor :end_time
1677
+
1678
+ # Start of time span.
1679
+ # Corresponds to the JSON property `startTime`
1680
+ # @return [String]
1681
+ attr_accessor :start_time
1682
+
1683
+ def initialize(**args)
1684
+ update!(**args)
1685
+ end
1686
+
1687
+ # Update properties of this object
1688
+ def update!(**args)
1689
+ @end_time = args[:end_time] if args.key?(:end_time)
1690
+ @start_time = args[:start_time] if args.key?(:start_time)
1691
+ end
1692
+ end
1693
+
1694
+ # Volume describes a Docker container volume which is mounted into build steps
1695
+ # in order to persist files across build step execution.
1696
+ class Volume
1697
+ include Google::Apis::Core::Hashable
1698
+
1699
+ # Name of the volume to mount. Volume names must be unique per build step and
1700
+ # must be valid names for Docker volumes. Each named volume must be used by at
1701
+ # least two build steps.
1702
+ # Corresponds to the JSON property `name`
1703
+ # @return [String]
1704
+ attr_accessor :name
1705
+
1706
+ # Path at which to mount the volume. Paths must be absolute and cannot conflict
1707
+ # with other volume paths on the same build step or with certain reserved volume
1708
+ # paths.
1709
+ # Corresponds to the JSON property `path`
1710
+ # @return [String]
1711
+ attr_accessor :path
1712
+
1713
+ def initialize(**args)
1714
+ update!(**args)
1715
+ end
1716
+
1717
+ # Update properties of this object
1718
+ def update!(**args)
1719
+ @name = args[:name] if args.key?(:name)
1720
+ @path = args[:path] if args.key?(:path)
1721
+ end
1722
+ end
1723
+ end
1724
+ end
1725
+ end