google-cloud-build-v1 0.2.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,7 +47,7 @@ module Google
47
47
  # @return [::String]
48
48
  def build_path **args
49
49
  resources = {
50
- "build:project" => (proc do |project:, build:|
50
+ "build:project" => (proc do |project:, build:|
51
51
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
52
52
 
53
53
  "projects/#{project}/builds/#{build}"
@@ -82,6 +82,27 @@ module Google
82
82
  "projects/#{project}/triggers/#{trigger}"
83
83
  end
84
84
 
85
+ ##
86
+ # Create a fully-qualified CryptoKey resource string.
87
+ #
88
+ # The resource will be in the following format:
89
+ #
90
+ # `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
91
+ #
92
+ # @param project [String]
93
+ # @param location [String]
94
+ # @param keyring [String]
95
+ # @param key [String]
96
+ #
97
+ # @return [::String]
98
+ def crypto_key_path project:, location:, keyring:, key:
99
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
100
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
101
+ raise ::ArgumentError, "keyring cannot contain /" if keyring.to_s.include? "/"
102
+
103
+ "projects/#{project}/locations/#{location}/keyRings/#{keyring}/cryptoKeys/#{key}"
104
+ end
105
+
85
106
  ##
86
107
  # Create a fully-qualified Location resource string.
87
108
  #
@@ -113,6 +134,25 @@ module Google
113
134
  "projects/#{project}"
114
135
  end
115
136
 
137
+ ##
138
+ # Create a fully-qualified SecretVersion resource string.
139
+ #
140
+ # The resource will be in the following format:
141
+ #
142
+ # `projects/{project}/secrets/{secret}/versions/{version}`
143
+ #
144
+ # @param project [String]
145
+ # @param secret [String]
146
+ # @param version [String]
147
+ #
148
+ # @return [::String]
149
+ def secret_version_path project:, secret:, version:
150
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
151
+ raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/"
152
+
153
+ "projects/#{project}/secrets/#{secret}/versions/#{version}"
154
+ end
155
+
116
156
  ##
117
157
  # Create a fully-qualified ServiceAccount resource string.
118
158
  #
@@ -130,6 +170,40 @@ module Google
130
170
  "projects/#{project}/serviceAccounts/#{service_account}"
131
171
  end
132
172
 
173
+ ##
174
+ # Create a fully-qualified Subscription resource string.
175
+ #
176
+ # The resource will be in the following format:
177
+ #
178
+ # `projects/{project}/subscriptions/{subscription}`
179
+ #
180
+ # @param project [String]
181
+ # @param subscription [String]
182
+ #
183
+ # @return [::String]
184
+ def subscription_path project:, subscription:
185
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
186
+
187
+ "projects/#{project}/subscriptions/#{subscription}"
188
+ end
189
+
190
+ ##
191
+ # Create a fully-qualified Topic resource string.
192
+ #
193
+ # The resource will be in the following format:
194
+ #
195
+ # `projects/{project}/topics/{topic}`
196
+ #
197
+ # @param project [String]
198
+ # @param topic [String]
199
+ #
200
+ # @return [::String]
201
+ def topic_path project:, topic:
202
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
203
+
204
+ "projects/#{project}/topics/#{topic}"
205
+ end
206
+
133
207
  extend self
134
208
  end
135
209
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Build
23
23
  module V1
24
- VERSION = "0.2.1"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -6,6 +6,7 @@ require 'google/protobuf'
6
6
  require 'google/api/annotations_pb'
7
7
  require 'google/api/client_pb'
8
8
  require 'google/api/field_behavior_pb'
9
+ require 'google/api/httpbody_pb'
9
10
  require 'google/api/resource_pb'
10
11
  require 'google/longrunning/operations_pb'
11
12
  require 'google/protobuf/duration_pb'
@@ -41,10 +42,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
41
42
  optional :commit_sha, :string, 5
42
43
  end
43
44
  end
45
+ add_message "google.devtools.cloudbuild.v1.StorageSourceManifest" do
46
+ optional :bucket, :string, 1
47
+ optional :object, :string, 2
48
+ optional :generation, :int64, 3
49
+ end
44
50
  add_message "google.devtools.cloudbuild.v1.Source" do
45
51
  oneof :source do
46
52
  optional :storage_source, :message, 2, "google.devtools.cloudbuild.v1.StorageSource"
47
53
  optional :repo_source, :message, 3, "google.devtools.cloudbuild.v1.RepoSource"
54
+ optional :storage_source_manifest, :message, 8, "google.devtools.cloudbuild.v1.StorageSourceManifest"
48
55
  end
49
56
  end
50
57
  add_message "google.devtools.cloudbuild.v1.BuiltImage" do
@@ -109,6 +116,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
109
116
  repeated :secrets, :message, 32, "google.devtools.cloudbuild.v1.Secret"
110
117
  map :timing, :string, :message, 33, "google.devtools.cloudbuild.v1.TimeSpan"
111
118
  optional :service_account, :string, 42
119
+ optional :available_secrets, :message, 47, "google.devtools.cloudbuild.v1.Secrets"
112
120
  end
113
121
  add_enum "google.devtools.cloudbuild.v1.Build.Status" do
114
122
  value :STATUS_UNKNOWN, 0
@@ -140,6 +148,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
140
148
  add_message "google.devtools.cloudbuild.v1.SourceProvenance" do
141
149
  optional :resolved_storage_source, :message, 3, "google.devtools.cloudbuild.v1.StorageSource"
142
150
  optional :resolved_repo_source, :message, 6, "google.devtools.cloudbuild.v1.RepoSource"
151
+ optional :resolved_storage_source_manifest, :message, 9, "google.devtools.cloudbuild.v1.StorageSourceManifest"
143
152
  map :file_hashes, :string, :message, 4, "google.devtools.cloudbuild.v1.FileHashes"
144
153
  end
145
154
  add_message "google.devtools.cloudbuild.v1.FileHashes" do
@@ -154,6 +163,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
154
163
  value :SHA256, 1
155
164
  value :MD5, 2
156
165
  end
166
+ add_message "google.devtools.cloudbuild.v1.Secrets" do
167
+ repeated :secret_manager, :message, 1, "google.devtools.cloudbuild.v1.SecretManagerSecret"
168
+ repeated :inline, :message, 2, "google.devtools.cloudbuild.v1.InlineSecret"
169
+ end
170
+ add_message "google.devtools.cloudbuild.v1.InlineSecret" do
171
+ optional :kms_key_name, :string, 1
172
+ map :env_map, :string, :bytes, 2
173
+ end
174
+ add_message "google.devtools.cloudbuild.v1.SecretManagerSecret" do
175
+ optional :version_name, :string, 1
176
+ optional :env, :string, 2
177
+ end
157
178
  add_message "google.devtools.cloudbuild.v1.Secret" do
158
179
  optional :kms_key_name, :string, 1
159
180
  map :secret_env, :string, :bytes, 3
@@ -191,11 +212,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
191
212
  repeated :tags, :string, 19
192
213
  optional :trigger_template, :message, 7, "google.devtools.cloudbuild.v1.RepoSource"
193
214
  optional :github, :message, 13, "google.devtools.cloudbuild.v1.GitHubEventsConfig"
215
+ optional :pubsub_config, :message, 29, "google.devtools.cloudbuild.v1.PubsubConfig"
194
216
  optional :create_time, :message, 5, "google.protobuf.Timestamp"
195
217
  optional :disabled, :bool, 9
196
218
  map :substitutions, :string, :string, 11
197
219
  repeated :ignored_files, :string, 15
198
220
  repeated :included_files, :string, 16
221
+ optional :filter, :string, 30
199
222
  oneof :build_template do
200
223
  optional :build, :message, 4, "google.devtools.cloudbuild.v1.Build"
201
224
  optional :filename, :string, 8
@@ -210,6 +233,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
210
233
  optional :push, :message, 5, "google.devtools.cloudbuild.v1.PushFilter"
211
234
  end
212
235
  end
236
+ add_message "google.devtools.cloudbuild.v1.PubsubConfig" do
237
+ optional :subscription, :string, 1
238
+ optional :topic, :string, 2
239
+ optional :service_account_email, :string, 3
240
+ optional :state, :enum, 4, "google.devtools.cloudbuild.v1.PubsubConfig.State"
241
+ end
242
+ add_enum "google.devtools.cloudbuild.v1.PubsubConfig.State" do
243
+ value :STATE_UNSPECIFIED, 0
244
+ value :OK, 1
245
+ value :SUBSCRIPTION_DELETED, 2
246
+ value :TOPIC_DELETED, 3
247
+ value :SUBSCRIPTION_MISCONFIGURED, 4
248
+ end
213
249
  add_message "google.devtools.cloudbuild.v1.PullRequestFilter" do
214
250
  optional :comment_control, :enum, 5, "google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl"
215
251
  optional :invert_regex, :bool, 6
@@ -220,6 +256,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
220
256
  add_enum "google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl" do
221
257
  value :COMMENTS_DISABLED, 0
222
258
  value :COMMENTS_ENABLED, 1
259
+ value :COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY, 2
223
260
  end
224
261
  add_message "google.devtools.cloudbuild.v1.PushFilter" do
225
262
  optional :invert_regex, :bool, 4
@@ -276,6 +313,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
276
313
  value :UNSPECIFIED, 0
277
314
  value :N1_HIGHCPU_8, 1
278
315
  value :N1_HIGHCPU_32, 2
316
+ value :E2_HIGHCPU_8, 5
317
+ value :E2_HIGHCPU_32, 6
279
318
  end
280
319
  add_enum "google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption" do
281
320
  value :MUST_MATCH, 0
@@ -294,6 +333,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
294
333
  value :CLOUD_LOGGING_ONLY, 5
295
334
  value :NONE, 4
296
335
  end
336
+ add_message "google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest" do
337
+ optional :body, :message, 1, "google.api.HttpBody"
338
+ optional :project_id, :string, 2
339
+ optional :trigger, :string, 3
340
+ optional :secret, :string, 4
341
+ end
342
+ add_message "google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse" do
343
+ end
297
344
  add_message "google.devtools.cloudbuild.v1.WorkerPool" do
298
345
  optional :name, :string, 14
299
346
  optional :project_id, :string, 2
@@ -362,6 +409,7 @@ module Google
362
409
  RunBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RunBuildTriggerRequest").msgclass
363
410
  StorageSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.StorageSource").msgclass
364
411
  RepoSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RepoSource").msgclass
412
+ StorageSourceManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.StorageSourceManifest").msgclass
365
413
  Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Source").msgclass
366
414
  BuiltImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuiltImage").msgclass
367
415
  BuildStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildStep").msgclass
@@ -378,6 +426,9 @@ module Google
378
426
  FileHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.FileHashes").msgclass
379
427
  Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Hash").msgclass
380
428
  Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Hash.HashType").enummodule
429
+ Secrets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Secrets").msgclass
430
+ InlineSecret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.InlineSecret").msgclass
431
+ SecretManagerSecret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.SecretManagerSecret").msgclass
381
432
  Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Secret").msgclass
382
433
  CreateBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateBuildRequest").msgclass
383
434
  GetBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetBuildRequest").msgclass
@@ -386,6 +437,8 @@ module Google
386
437
  CancelBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CancelBuildRequest").msgclass
387
438
  BuildTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildTrigger").msgclass
388
439
  GitHubEventsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitHubEventsConfig").msgclass
440
+ PubsubConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PubsubConfig").msgclass
441
+ PubsubConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PubsubConfig.State").enummodule
389
442
  PullRequestFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PullRequestFilter").msgclass
390
443
  PullRequestFilter::CommentControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl").enummodule
391
444
  PushFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PushFilter").msgclass
@@ -401,6 +454,8 @@ module Google
401
454
  BuildOptions::SubstitutionOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption").enummodule
402
455
  BuildOptions::LogStreamingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption").enummodule
403
456
  BuildOptions::LoggingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.LoggingMode").enummodule
457
+ ReceiveTriggerWebhookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest").msgclass
458
+ ReceiveTriggerWebhookResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse").msgclass
404
459
  WorkerPool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool").msgclass
405
460
  WorkerPool::Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool.Region").enummodule
406
461
  WorkerPool::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool.Status").enummodule
@@ -34,7 +34,7 @@ module Google
34
34
  # determine the status of the build.
35
35
  class Service
36
36
 
37
- include GRPC::GenericService
37
+ include ::GRPC::GenericService
38
38
 
39
39
  self.marshal_class_method = :encode
40
40
  self.unmarshal_class_method = :decode
@@ -108,6 +108,9 @@ module Google
108
108
  rpc :UpdateBuildTrigger, ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest, ::Google::Cloud::Build::V1::BuildTrigger
109
109
  # Runs a `BuildTrigger` at a particular source revision.
110
110
  rpc :RunBuildTrigger, ::Google::Cloud::Build::V1::RunBuildTriggerRequest, ::Google::Longrunning::Operation
111
+ # ReceiveTriggerWebhook [Experimental] is called when the API receives a
112
+ # webhook request targeted at a specific trigger.
113
+ rpc :ReceiveTriggerWebhook, ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse
111
114
  # Creates a `WorkerPool` to run the builds, and returns the new worker pool.
112
115
  #
113
116
  # This API is experimental.
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # Message that represents an arbitrary HTTP body. It should only be used for
23
+ # payload formats that can't be represented as JSON, such as raw binary or
24
+ # an HTML page.
25
+ #
26
+ #
27
+ # This message can be used both in streaming and non-streaming API methods in
28
+ # the request as well as the response.
29
+ #
30
+ # It can be used as a top-level request field, which is convenient if one
31
+ # wants to extract parameters from either the URL or HTTP template into the
32
+ # request fields and also want access to the raw HTTP body.
33
+ #
34
+ # Example:
35
+ #
36
+ # message GetResourceRequest {
37
+ # // A unique request id.
38
+ # string request_id = 1;
39
+ #
40
+ # // The raw HTTP body is bound to this field.
41
+ # google.api.HttpBody http_body = 2;
42
+ # }
43
+ #
44
+ # service ResourceService {
45
+ # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
46
+ # rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);
47
+ # }
48
+ #
49
+ # Example with streaming methods:
50
+ #
51
+ # service CaldavService {
52
+ # rpc GetCalendar(stream google.api.HttpBody)
53
+ # returns (stream google.api.HttpBody);
54
+ # rpc UpdateCalendar(stream google.api.HttpBody)
55
+ # returns (stream google.api.HttpBody);
56
+ # }
57
+ #
58
+ # Use of this type only changes how the request and response bodies are
59
+ # handled, all other features will continue to work unchanged.
60
+ # @!attribute [rw] content_type
61
+ # @return [::String]
62
+ # The HTTP Content-Type string representing the content type of the body.
63
+ # @!attribute [rw] data
64
+ # @return [::String]
65
+ # HTTP body binary data.
66
+ # @!attribute [rw] extensions
67
+ # @return [::Array<::Google::Protobuf::Any>]
68
+ # Application specific response metadata. Must be set in the first response
69
+ # for streaming APIs.
70
+ class HttpBody
71
+ include ::Google::Protobuf::MessageExts
72
+ extend ::Google::Protobuf::MessageExts::ClassMethods
73
+ end
74
+ end
75
+ end
@@ -46,7 +46,7 @@ module Google
46
46
  # Required. ID of the trigger.
47
47
  # @!attribute [rw] source
48
48
  # @return [::Google::Cloud::Build::V1::RepoSource]
49
- # Required. Source to build against this trigger.
49
+ # Source to build against this trigger.
50
50
  class RunBuildTriggerRequest
51
51
  include ::Google::Protobuf::MessageExts
52
52
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -80,7 +80,7 @@ module Google
80
80
  # project ID requesting the build is assumed.
81
81
  # @!attribute [rw] repo_name
82
82
  # @return [::String]
83
- # Required. Name of the Cloud Source Repository.
83
+ # Name of the Cloud Source Repository.
84
84
  # @!attribute [rw] branch_name
85
85
  # @return [::String]
86
86
  # Regex matching branches to build.
@@ -124,6 +124,27 @@ module Google
124
124
  end
125
125
  end
126
126
 
127
+ # Location of the source manifest in Google Cloud Storage.
128
+ # This feature is in Preview.
129
+ # @!attribute [rw] bucket
130
+ # @return [::String]
131
+ # Google Cloud Storage bucket containing the source manifest (see [Bucket
132
+ # Name
133
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
134
+ # @!attribute [rw] object
135
+ # @return [::String]
136
+ # Google Cloud Storage object containing the source manifest.
137
+ #
138
+ # This object must be a JSON file.
139
+ # @!attribute [rw] generation
140
+ # @return [::Integer]
141
+ # Google Cloud Storage generation for the object. If the generation is
142
+ # omitted, the latest generation will be used.
143
+ class StorageSourceManifest
144
+ include ::Google::Protobuf::MessageExts
145
+ extend ::Google::Protobuf::MessageExts::ClassMethods
146
+ end
147
+
127
148
  # Location of the source in a supported storage service.
128
149
  # @!attribute [rw] storage_source
129
150
  # @return [::Google::Cloud::Build::V1::StorageSource]
@@ -132,6 +153,10 @@ module Google
132
153
  # @return [::Google::Cloud::Build::V1::RepoSource]
133
154
  # If provided, get the source from this location in a Cloud Source
134
155
  # Repository.
156
+ # @!attribute [rw] storage_source_manifest
157
+ # @return [::Google::Cloud::Build::V1::StorageSourceManifest]
158
+ # If provided, get the source from this manifest in Google Cloud Storage.
159
+ # This feature is in Preview.
135
160
  class Source
136
161
  include ::Google::Protobuf::MessageExts
137
162
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -325,6 +350,7 @@ module Google
325
350
  # build is created:
326
351
  #
327
352
  # - $PROJECT_ID: the project ID of the build.
353
+ # - $PROJECT_NUMBER: the project number of the build.
328
354
  # - $BUILD_ID: the autogenerated ID of the build.
329
355
  # - $REPO_NAME: the source repository name specified by RepoSource.
330
356
  # - $BRANCH_NAME: the branch name specified by RepoSource.
@@ -430,6 +456,10 @@ module Google
430
456
  # @!attribute [rw] secrets
431
457
  # @return [::Array<::Google::Cloud::Build::V1::Secret>]
432
458
  # Secrets to decrypt using Cloud Key Management Service.
459
+ # Note: Secret Manager is the recommended technique
460
+ # for managing sensitive data with Cloud Build. Use `available_secrets` to
461
+ # configure builds to access secrets from Secret Manager. For instructions,
462
+ # see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
433
463
  # @!attribute [r] timing
434
464
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Build::V1::TimeSpan}]
435
465
  # Output only. Stores timing information for phases of the build. Valid keys
@@ -447,7 +477,10 @@ module Google
447
477
  # Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
448
478
  # ACCOUNT can be email address or uniqueId of the service account.
449
479
  #
450
- # This field is in alpha and is not publicly available.
480
+ # This field is in beta.
481
+ # @!attribute [rw] available_secrets
482
+ # @return [::Google::Cloud::Build::V1::Secrets]
483
+ # Secrets and secret environment variables.
451
484
  class Build
452
485
  include ::Google::Protobuf::MessageExts
453
486
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -584,6 +617,11 @@ module Google
584
617
  # @return [::Google::Cloud::Build::V1::RepoSource]
585
618
  # A copy of the build's `source.repo_source`, if exists, with any
586
619
  # revisions resolved.
620
+ # @!attribute [rw] resolved_storage_source_manifest
621
+ # @return [::Google::Cloud::Build::V1::StorageSourceManifest]
622
+ # A copy of the build's `source.storage_source_manifest`, if exists, with any
623
+ # revisions resolved.
624
+ # This feature is in Preview.
587
625
  # @!attribute [r] file_hashes
588
626
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Build::V1::FileHashes}]
589
627
  # Output only. Hash(es) of the build source, which can be used to verify that
@@ -644,8 +682,67 @@ module Google
644
682
  end
645
683
  end
646
684
 
685
+ # Secrets and secret environment variables.
686
+ # @!attribute [rw] secret_manager
687
+ # @return [::Array<::Google::Cloud::Build::V1::SecretManagerSecret>]
688
+ # Secrets in Secret Manager and associated secret environment variable.
689
+ # @!attribute [rw] inline
690
+ # @return [::Array<::Google::Cloud::Build::V1::InlineSecret>]
691
+ # Secrets encrypted with KMS key and the associated secret environment
692
+ # variable.
693
+ class Secrets
694
+ include ::Google::Protobuf::MessageExts
695
+ extend ::Google::Protobuf::MessageExts::ClassMethods
696
+ end
697
+
698
+ # Pairs a set of secret environment variables mapped to encrypted
699
+ # values with the Cloud KMS key to use to decrypt the value.
700
+ # @!attribute [rw] kms_key_name
701
+ # @return [::String]
702
+ # Resource name of Cloud KMS crypto key to decrypt the encrypted value.
703
+ # In format: projects/*/locations/*/keyRings/*/cryptoKeys/*
704
+ # @!attribute [rw] env_map
705
+ # @return [::Google::Protobuf::Map{::String => ::String}]
706
+ # Map of environment variable name to its encrypted value.
707
+ #
708
+ # Secret environment variables must be unique across all of a build's
709
+ # secrets, and must be used by at least one build step. Values can be at most
710
+ # 64 KB in size. There can be at most 100 secret values across all of a
711
+ # build's secrets.
712
+ class InlineSecret
713
+ include ::Google::Protobuf::MessageExts
714
+ extend ::Google::Protobuf::MessageExts::ClassMethods
715
+
716
+ # @!attribute [rw] key
717
+ # @return [::String]
718
+ # @!attribute [rw] value
719
+ # @return [::String]
720
+ class EnvMapEntry
721
+ include ::Google::Protobuf::MessageExts
722
+ extend ::Google::Protobuf::MessageExts::ClassMethods
723
+ end
724
+ end
725
+
726
+ # Pairs a secret environment variable with a SecretVersion in Secret Manager.
727
+ # @!attribute [rw] version_name
728
+ # @return [::String]
729
+ # Resource name of the SecretVersion. In format:
730
+ # projects/*/secrets/*/versions/*
731
+ # @!attribute [rw] env
732
+ # @return [::String]
733
+ # Environment variable name to associate with the secret.
734
+ # Secret environment variables must be unique across all of a build's
735
+ # secrets, and must be used by at least one build step.
736
+ class SecretManagerSecret
737
+ include ::Google::Protobuf::MessageExts
738
+ extend ::Google::Protobuf::MessageExts::ClassMethods
739
+ end
740
+
647
741
  # Pairs a set of secret environment variables containing encrypted
648
742
  # values with the Cloud KMS key to use to decrypt the value.
743
+ # Note: Use `kmsKeyName` with `available_secrets` instead of using
744
+ # `kmsKeyName` with `secret`. For instructions see:
745
+ # https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
649
746
  # @!attribute [rw] kms_key_name
650
747
  # @return [::String]
651
748
  # Cloud KMS key name to use to decrypt these envs.
@@ -716,7 +813,15 @@ module Google
716
813
  # Number of results to return in the list.
717
814
  # @!attribute [rw] page_token
718
815
  # @return [::String]
719
- # Token to provide to skip to a particular spot in the list.
816
+ # The page token for the next page of Builds.
817
+ #
818
+ # If unspecified, the first page of results is returned.
819
+ #
820
+ # If the token is rejected for any reason, INVALID_ARGUMENT will be thrown.
821
+ # In this case, the token should be discarded, and pagination should be
822
+ # restarted from the first page of results.
823
+ #
824
+ # See https://google.aip.dev/158 for more.
720
825
  # @!attribute [rw] filter
721
826
  # @return [::String]
722
827
  # The raw filter text to constrain the results.
@@ -732,6 +837,7 @@ module Google
732
837
  # @!attribute [rw] next_page_token
733
838
  # @return [::String]
734
839
  # Token to receive the next page of results.
840
+ # This will be absent if the end of the response list has been reached.
735
841
  class ListBuildsResponse
736
842
  include ::Google::Protobuf::MessageExts
737
843
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -740,7 +846,7 @@ module Google
740
846
  # Request to cancel an ongoing build.
741
847
  # @!attribute [rw] name
742
848
  # @return [::String]
743
- # The name of the `Build` to retrieve.
849
+ # The name of the `Build` to cancel.
744
850
  # Format: `projects/{project}/locations/{location}/builds/{build}`
745
851
  # @!attribute [rw] project_id
746
852
  # @return [::String]
@@ -787,13 +893,17 @@ module Google
787
893
  # a build whenever a GitHub event is received.
788
894
  #
789
895
  # Mutually exclusive with `trigger_template`.
896
+ # @!attribute [rw] pubsub_config
897
+ # @return [::Google::Cloud::Build::V1::PubsubConfig]
898
+ # Optional. PubsubConfig describes the configuration of a trigger that
899
+ # creates a build whenever a Pub/Sub message is published.
790
900
  # @!attribute [rw] build
791
901
  # @return [::Google::Cloud::Build::V1::Build]
792
902
  # Contents of the build template.
793
903
  # @!attribute [rw] filename
794
904
  # @return [::String]
795
- # Path, from the source root, to a file whose contents is used for the
796
- # template.
905
+ # Path, from the source root, to the build configuration file
906
+ # (i.e. cloudbuild.yaml).
797
907
  # @!attribute [r] create_time
798
908
  # @return [::Google::Protobuf::Timestamp]
799
909
  # Output only. Time when the trigger was created.
@@ -825,6 +935,9 @@ module Google
825
935
  # filter and included_files is not empty, then we make sure that at
826
936
  # least one of those files matches a included_files glob. If not,
827
937
  # then we do not trigger a build.
938
+ # @!attribute [rw] filter
939
+ # @return [::String]
940
+ # Optional. A Common Expression Language string.
828
941
  class BuildTrigger
829
942
  include ::Google::Protobuf::MessageExts
830
943
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -866,6 +979,47 @@ module Google
866
979
  extend ::Google::Protobuf::MessageExts::ClassMethods
867
980
  end
868
981
 
982
+ # PubsubConfig describes the configuration of a trigger that
983
+ # creates a build whenever a Pub/Sub message is published.
984
+ # @!attribute [r] subscription
985
+ # @return [::String]
986
+ # Output only. Name of the subscription. Format is
987
+ # `projects/{project}/subscriptions/{subscription}`.
988
+ # @!attribute [rw] topic
989
+ # @return [::String]
990
+ # The name of the topic from which this subscription is receiving messages.
991
+ # Format is `projects/{project}/topics/{topic}`.
992
+ # @!attribute [rw] service_account_email
993
+ # @return [::String]
994
+ # Service account that will make the push request.
995
+ # @!attribute [rw] state
996
+ # @return [::Google::Cloud::Build::V1::PubsubConfig::State]
997
+ # Potential issues with the underlying Pub/Sub subscription configuration.
998
+ # Only populated on get requests.
999
+ class PubsubConfig
1000
+ include ::Google::Protobuf::MessageExts
1001
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1002
+
1003
+ # Enumerates potential issues with the underlying Pub/Sub subscription
1004
+ # configuration.
1005
+ module State
1006
+ # The subscription configuration has not been checked.
1007
+ STATE_UNSPECIFIED = 0
1008
+
1009
+ # The Pub/Sub subscription is properly configured.
1010
+ OK = 1
1011
+
1012
+ # The subscription has been deleted.
1013
+ SUBSCRIPTION_DELETED = 2
1014
+
1015
+ # The topic has been deleted.
1016
+ TOPIC_DELETED = 3
1017
+
1018
+ # Some of the subscription's field are misconfigured.
1019
+ SUBSCRIPTION_MISCONFIGURED = 4
1020
+ end
1021
+ end
1022
+
869
1023
  # PullRequestFilter contains filter properties for matching GitHub Pull
870
1024
  # Requests.
871
1025
  # @!attribute [rw] branch
@@ -893,6 +1047,10 @@ module Google
893
1047
  # Enforce that repository owners or collaborators must comment on Pull
894
1048
  # Requests before builds are triggered.
895
1049
  COMMENTS_ENABLED = 1
1050
+
1051
+ # Enforce that repository owners or collaborators must comment on external
1052
+ # contributors' Pull Requests before builds are triggered.
1053
+ COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2
896
1054
  end
897
1055
  end
898
1056
 
@@ -1092,6 +1250,12 @@ module Google
1092
1250
 
1093
1251
  # Highcpu machine with 32 CPUs.
1094
1252
  N1_HIGHCPU_32 = 2
1253
+
1254
+ # Highcpu e2 machine with 8 CPUs.
1255
+ E2_HIGHCPU_8 = 5
1256
+
1257
+ # Highcpu e2 machine with 32 CPUs.
1258
+ E2_HIGHCPU_32 = 6
1095
1259
  end
1096
1260
 
1097
1261
  # Specifies the behavior when there is an error in the substitution checks.
@@ -1138,11 +1302,36 @@ module Google
1138
1302
  CLOUD_LOGGING_ONLY = 5
1139
1303
 
1140
1304
  # Turn off all logging. No build logs will be captured.
1141
- # Next ID: 6
1142
1305
  NONE = 4
1143
1306
  end
1144
1307
  end
1145
1308
 
1309
+ # ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by
1310
+ # the ReceiveTriggerWebhook method.
1311
+ # @!attribute [rw] body
1312
+ # @return [::Google::Api::HttpBody]
1313
+ # HTTP request body.
1314
+ # @!attribute [rw] project_id
1315
+ # @return [::String]
1316
+ # Project in which the specified trigger lives
1317
+ # @!attribute [rw] trigger
1318
+ # @return [::String]
1319
+ # Name of the trigger to run the payload against
1320
+ # @!attribute [rw] secret
1321
+ # @return [::String]
1322
+ # Secret token used for authorization if an OAuth token isn't provided.
1323
+ class ReceiveTriggerWebhookRequest
1324
+ include ::Google::Protobuf::MessageExts
1325
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1326
+ end
1327
+
1328
+ # ReceiveTriggerWebhookResponse [Experimental] is the response object for the
1329
+ # ReceiveTriggerWebhook method.
1330
+ class ReceiveTriggerWebhookResponse
1331
+ include ::Google::Protobuf::MessageExts
1332
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1333
+ end
1334
+
1146
1335
  # Configuration for a WorkerPool to run the builds.
1147
1336
  #
1148
1337
  # Workers are machines that Cloud Build uses to run your builds. By default,