google-cloud-build-v1 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8ae8afcf0aba7fb3d2e94b74e95174c6fc79fd075f56e1bc09e2399b724819e
4
- data.tar.gz: 5e346d486d0cd3dd27e3b1047b7488df7fee7e48cbb475b283eb5fcba96ce8c2
3
+ metadata.gz: dac16a1f36b562c307544c2c24b9b4d293cd1fc7d085b25b73407ecddebde110
4
+ data.tar.gz: 95e447efb18e0223fedcae67c40037498c7f5fbdde71004b9270a1d4c9a68f2e
5
5
  SHA512:
6
- metadata.gz: 4c933089c27f86dab0dcaa2baabc5a5b83dce041ccdd4a5b95f78ac2277674618e353e28433a4593aae163b9516051f96f202c8df67ec201ed31875a07a56bf7
7
- data.tar.gz: abdbc0dc7f27e77211896e02d4e424d08c69cd9ff66f63db31861d1eeb5a4009a23596ae10d2c965e9903c137c5b13f4f4eb0bf7cac52afd3ae2ea6f90e05cea
6
+ metadata.gz: 56833ac3e3a4cca4cec7ba7828e561f3fc31c918199ee7427ffae463813986e49cb98dbb356d351e178ca303996c8aeea6dcbe81c039f2b86c7258ba662a7897
7
+ data.tar.gz: 6b81017c15342c203957efd889e096549653214e1e0d012c6dfb0fa11b6678c073a28f1f0d3116089b35b62a992c6bc4ea7577ebd18b39fb53c8959f94aabe1e
@@ -423,7 +423,15 @@ module Google
423
423
  # @param page_size [::Integer]
424
424
  # Number of results to return in the list.
425
425
  # @param page_token [::String]
426
- # Token to provide to skip to a particular spot in the list.
426
+ # The page token for the next page of Builds.
427
+ #
428
+ # If unspecified, the first page of results is returned.
429
+ #
430
+ # If the token is rejected for any reason, INVALID_ARGUMENT will be thrown.
431
+ # In this case, the token should be discarded, and pagination should be
432
+ # restarted from the first page of results.
433
+ #
434
+ # See https://google.aip.dev/158 for more.
427
435
  # @param filter [::String]
428
436
  # The raw filter text to constrain the results.
429
437
  #
@@ -492,7 +500,7 @@ module Google
492
500
  # the default parameter values, pass an empty Hash as a request object (see above).
493
501
  #
494
502
  # @param name [::String]
495
- # The name of the `Build` to retrieve.
503
+ # The name of the `Build` to cancel.
496
504
  # Format: `projects/{project}/locations/{location}/builds/{build}`
497
505
  # @param project_id [::String]
498
506
  # Required. ID of the project.
@@ -1025,7 +1033,7 @@ module Google
1025
1033
  # @param trigger_id [::String]
1026
1034
  # Required. ID of the trigger.
1027
1035
  # @param source [::Google::Cloud::Build::V1::RepoSource, ::Hash]
1028
- # Required. Source to build against this trigger.
1036
+ # Source to build against this trigger.
1029
1037
  #
1030
1038
  # @yield [response, operation] Access the result along with the RPC operation
1031
1039
  # @yieldparam response [::Gapic::Operation]
@@ -1074,6 +1082,80 @@ module Google
1074
1082
  raise ::Google::Cloud::Error.from_error(e)
1075
1083
  end
1076
1084
 
1085
+ ##
1086
+ # ReceiveTriggerWebhook [Experimental] is called when the API receives a
1087
+ # webhook request targeted at a specific trigger.
1088
+ #
1089
+ # @overload receive_trigger_webhook(request, options = nil)
1090
+ # Pass arguments to `receive_trigger_webhook` via a request object, either of type
1091
+ # {::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest} or an equivalent Hash.
1092
+ #
1093
+ # @param request [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, ::Hash]
1094
+ # A request object representing the call parameters. Required. To specify no
1095
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1096
+ # @param options [::Gapic::CallOptions, ::Hash]
1097
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1098
+ #
1099
+ # @overload receive_trigger_webhook(body: nil, project_id: nil, trigger: nil, secret: nil)
1100
+ # Pass arguments to `receive_trigger_webhook` via keyword arguments. Note that at
1101
+ # least one keyword argument is required. To specify no parameters, or to keep all
1102
+ # the default parameter values, pass an empty Hash as a request object (see above).
1103
+ #
1104
+ # @param body [::Google::Api::HttpBody, ::Hash]
1105
+ # HTTP request body.
1106
+ # @param project_id [::String]
1107
+ # Project in which the specified trigger lives
1108
+ # @param trigger [::String]
1109
+ # Name of the trigger to run the payload against
1110
+ # @param secret [::String]
1111
+ # Secret token used for authorization if an OAuth token isn't provided.
1112
+ #
1113
+ # @yield [response, operation] Access the result along with the RPC operation
1114
+ # @yieldparam response [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse]
1115
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1116
+ #
1117
+ # @return [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse]
1118
+ #
1119
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1120
+ #
1121
+ def receive_trigger_webhook request, options = nil
1122
+ raise ::ArgumentError, "request must be provided" if request.nil?
1123
+
1124
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest
1125
+
1126
+ # Converts hash and nil to an options object
1127
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1128
+
1129
+ # Customize the options with defaults
1130
+ metadata = @config.rpcs.receive_trigger_webhook.metadata.to_h
1131
+
1132
+ # Set x-goog-api-client and x-goog-user-project headers
1133
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1134
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1135
+ gapic_version: ::Google::Cloud::Build::V1::VERSION
1136
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1137
+
1138
+ header_params = {
1139
+ "project_id" => request.project_id,
1140
+ "trigger" => request.trigger
1141
+ }
1142
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1143
+ metadata[:"x-goog-request-params"] ||= request_params_header
1144
+
1145
+ options.apply_defaults timeout: @config.rpcs.receive_trigger_webhook.timeout,
1146
+ metadata: metadata,
1147
+ retry_policy: @config.rpcs.receive_trigger_webhook.retry_policy
1148
+ options.apply_defaults metadata: @config.metadata,
1149
+ retry_policy: @config.retry_policy
1150
+
1151
+ @cloud_build_stub.call_rpc :receive_trigger_webhook, request, options: options do |response, operation|
1152
+ yield response, operation if block_given?
1153
+ return response
1154
+ end
1155
+ rescue ::GRPC::BadStatus => e
1156
+ raise ::Google::Cloud::Error.from_error(e)
1157
+ end
1158
+
1077
1159
  ##
1078
1160
  # Creates a `WorkerPool` to run the builds, and returns the new worker pool.
1079
1161
  #
@@ -1583,6 +1665,11 @@ module Google
1583
1665
  #
1584
1666
  attr_reader :run_build_trigger
1585
1667
  ##
1668
+ # RPC-specific configuration for `receive_trigger_webhook`
1669
+ # @return [::Gapic::Config::Method]
1670
+ #
1671
+ attr_reader :receive_trigger_webhook
1672
+ ##
1586
1673
  # RPC-specific configuration for `create_worker_pool`
1587
1674
  # @return [::Gapic::Config::Method]
1588
1675
  #
@@ -1632,6 +1719,8 @@ module Google
1632
1719
  @update_build_trigger = ::Gapic::Config::Method.new update_build_trigger_config
1633
1720
  run_build_trigger_config = parent_rpcs.run_build_trigger if parent_rpcs.respond_to? :run_build_trigger
1634
1721
  @run_build_trigger = ::Gapic::Config::Method.new run_build_trigger_config
1722
+ receive_trigger_webhook_config = parent_rpcs.receive_trigger_webhook if parent_rpcs.respond_to? :receive_trigger_webhook
1723
+ @receive_trigger_webhook = ::Gapic::Config::Method.new receive_trigger_webhook_config
1635
1724
  create_worker_pool_config = parent_rpcs.create_worker_pool if parent_rpcs.respond_to? :create_worker_pool
1636
1725
  @create_worker_pool = ::Gapic::Config::Method.new create_worker_pool_config
1637
1726
  get_worker_pool_config = parent_rpcs.get_worker_pool if parent_rpcs.respond_to? :get_worker_pool
@@ -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
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Build
23
23
  module V1
24
- VERSION = "0.4.0"
24
+ VERSION = "0.5.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'
@@ -109,6 +110,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
109
110
  repeated :secrets, :message, 32, "google.devtools.cloudbuild.v1.Secret"
110
111
  map :timing, :string, :message, 33, "google.devtools.cloudbuild.v1.TimeSpan"
111
112
  optional :service_account, :string, 42
113
+ optional :available_secrets, :message, 47, "google.devtools.cloudbuild.v1.Secrets"
112
114
  end
113
115
  add_enum "google.devtools.cloudbuild.v1.Build.Status" do
114
116
  value :STATUS_UNKNOWN, 0
@@ -154,6 +156,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
154
156
  value :SHA256, 1
155
157
  value :MD5, 2
156
158
  end
159
+ add_message "google.devtools.cloudbuild.v1.Secrets" do
160
+ repeated :secret_manager, :message, 1, "google.devtools.cloudbuild.v1.SecretManagerSecret"
161
+ repeated :inline, :message, 2, "google.devtools.cloudbuild.v1.InlineSecret"
162
+ end
163
+ add_message "google.devtools.cloudbuild.v1.InlineSecret" do
164
+ optional :kms_key_name, :string, 1
165
+ map :env_map, :string, :bytes, 2
166
+ end
167
+ add_message "google.devtools.cloudbuild.v1.SecretManagerSecret" do
168
+ optional :version_name, :string, 1
169
+ optional :env, :string, 2
170
+ end
157
171
  add_message "google.devtools.cloudbuild.v1.Secret" do
158
172
  optional :kms_key_name, :string, 1
159
173
  map :secret_env, :string, :bytes, 3
@@ -220,6 +234,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
220
234
  add_enum "google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl" do
221
235
  value :COMMENTS_DISABLED, 0
222
236
  value :COMMENTS_ENABLED, 1
237
+ value :COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY, 2
223
238
  end
224
239
  add_message "google.devtools.cloudbuild.v1.PushFilter" do
225
240
  optional :invert_regex, :bool, 4
@@ -276,6 +291,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
276
291
  value :UNSPECIFIED, 0
277
292
  value :N1_HIGHCPU_8, 1
278
293
  value :N1_HIGHCPU_32, 2
294
+ value :E2_HIGHCPU_8, 5
295
+ value :E2_HIGHCPU_32, 6
279
296
  end
280
297
  add_enum "google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption" do
281
298
  value :MUST_MATCH, 0
@@ -294,6 +311,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
294
311
  value :CLOUD_LOGGING_ONLY, 5
295
312
  value :NONE, 4
296
313
  end
314
+ add_message "google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest" do
315
+ optional :body, :message, 1, "google.api.HttpBody"
316
+ optional :project_id, :string, 2
317
+ optional :trigger, :string, 3
318
+ optional :secret, :string, 4
319
+ end
320
+ add_message "google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse" do
321
+ end
297
322
  add_message "google.devtools.cloudbuild.v1.WorkerPool" do
298
323
  optional :name, :string, 14
299
324
  optional :project_id, :string, 2
@@ -378,6 +403,9 @@ module Google
378
403
  FileHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.FileHashes").msgclass
379
404
  Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Hash").msgclass
380
405
  Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Hash.HashType").enummodule
406
+ Secrets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Secrets").msgclass
407
+ InlineSecret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.InlineSecret").msgclass
408
+ SecretManagerSecret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.SecretManagerSecret").msgclass
381
409
  Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Secret").msgclass
382
410
  CreateBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateBuildRequest").msgclass
383
411
  GetBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetBuildRequest").msgclass
@@ -401,6 +429,8 @@ module Google
401
429
  BuildOptions::SubstitutionOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption").enummodule
402
430
  BuildOptions::LogStreamingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption").enummodule
403
431
  BuildOptions::LoggingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.LoggingMode").enummodule
432
+ ReceiveTriggerWebhookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest").msgclass
433
+ ReceiveTriggerWebhookResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse").msgclass
404
434
  WorkerPool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool").msgclass
405
435
  WorkerPool::Region = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool.Region").enummodule
406
436
  WorkerPool::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool.Status").enummodule
@@ -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.
@@ -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.
@@ -325,6 +325,7 @@ module Google
325
325
  # build is created:
326
326
  #
327
327
  # - $PROJECT_ID: the project ID of the build.
328
+ # - $PROJECT_NUMBER: the project number of the build.
328
329
  # - $BUILD_ID: the autogenerated ID of the build.
329
330
  # - $REPO_NAME: the source repository name specified by RepoSource.
330
331
  # - $BRANCH_NAME: the branch name specified by RepoSource.
@@ -430,6 +431,10 @@ module Google
430
431
  # @!attribute [rw] secrets
431
432
  # @return [::Array<::Google::Cloud::Build::V1::Secret>]
432
433
  # Secrets to decrypt using Cloud Key Management Service.
434
+ # Note: Secret Manager is the recommended technique
435
+ # for managing sensitive data with Cloud Build. Use `available_secrets` to
436
+ # configure builds to access secrets from Secret Manager. For instructions,
437
+ # see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
433
438
  # @!attribute [r] timing
434
439
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Build::V1::TimeSpan}]
435
440
  # Output only. Stores timing information for phases of the build. Valid keys
@@ -447,7 +452,10 @@ module Google
447
452
  # Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
448
453
  # ACCOUNT can be email address or uniqueId of the service account.
449
454
  #
450
- # This field is in alpha and is not publicly available.
455
+ # This field is in beta.
456
+ # @!attribute [rw] available_secrets
457
+ # @return [::Google::Cloud::Build::V1::Secrets]
458
+ # Secrets and secret environment variables.
451
459
  class Build
452
460
  include ::Google::Protobuf::MessageExts
453
461
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -644,8 +652,67 @@ module Google
644
652
  end
645
653
  end
646
654
 
655
+ # Secrets and secret environment variables.
656
+ # @!attribute [rw] secret_manager
657
+ # @return [::Array<::Google::Cloud::Build::V1::SecretManagerSecret>]
658
+ # Secrets in Secret Manager and associated secret environment variable.
659
+ # @!attribute [rw] inline
660
+ # @return [::Array<::Google::Cloud::Build::V1::InlineSecret>]
661
+ # Secrets encrypted with KMS key and the associated secret environment
662
+ # variable.
663
+ class Secrets
664
+ include ::Google::Protobuf::MessageExts
665
+ extend ::Google::Protobuf::MessageExts::ClassMethods
666
+ end
667
+
668
+ # Pairs a set of secret environment variables mapped to encrypted
669
+ # values with the Cloud KMS key to use to decrypt the value.
670
+ # @!attribute [rw] kms_key_name
671
+ # @return [::String]
672
+ # Resource name of Cloud KMS crypto key to decrypt the encrypted value.
673
+ # In format: projects/*/locations/*/keyRings/*/cryptoKeys/*
674
+ # @!attribute [rw] env_map
675
+ # @return [::Google::Protobuf::Map{::String => ::String}]
676
+ # Map of environment variable name to its encrypted value.
677
+ #
678
+ # Secret environment variables must be unique across all of a build's
679
+ # secrets, and must be used by at least one build step. Values can be at most
680
+ # 64 KB in size. There can be at most 100 secret values across all of a
681
+ # build's secrets.
682
+ class InlineSecret
683
+ include ::Google::Protobuf::MessageExts
684
+ extend ::Google::Protobuf::MessageExts::ClassMethods
685
+
686
+ # @!attribute [rw] key
687
+ # @return [::String]
688
+ # @!attribute [rw] value
689
+ # @return [::String]
690
+ class EnvMapEntry
691
+ include ::Google::Protobuf::MessageExts
692
+ extend ::Google::Protobuf::MessageExts::ClassMethods
693
+ end
694
+ end
695
+
696
+ # Pairs a secret environment variable with a SecretVersion in Secret Manager.
697
+ # @!attribute [rw] version_name
698
+ # @return [::String]
699
+ # Resource name of the SecretVersion. In format:
700
+ # projects/*/secrets/*/versions/*
701
+ # @!attribute [rw] env
702
+ # @return [::String]
703
+ # Environment variable name to associate with the secret.
704
+ # Secret environment variables must be unique across all of a build's
705
+ # secrets, and must be used by at least one build step.
706
+ class SecretManagerSecret
707
+ include ::Google::Protobuf::MessageExts
708
+ extend ::Google::Protobuf::MessageExts::ClassMethods
709
+ end
710
+
647
711
  # Pairs a set of secret environment variables containing encrypted
648
712
  # values with the Cloud KMS key to use to decrypt the value.
713
+ # Note: Use `kmsKeyName` with `available_secrets` instead of using
714
+ # `kmsKeyName` with `secret`. For instructions see:
715
+ # https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
649
716
  # @!attribute [rw] kms_key_name
650
717
  # @return [::String]
651
718
  # Cloud KMS key name to use to decrypt these envs.
@@ -716,7 +783,15 @@ module Google
716
783
  # Number of results to return in the list.
717
784
  # @!attribute [rw] page_token
718
785
  # @return [::String]
719
- # Token to provide to skip to a particular spot in the list.
786
+ # The page token for the next page of Builds.
787
+ #
788
+ # If unspecified, the first page of results is returned.
789
+ #
790
+ # If the token is rejected for any reason, INVALID_ARGUMENT will be thrown.
791
+ # In this case, the token should be discarded, and pagination should be
792
+ # restarted from the first page of results.
793
+ #
794
+ # See https://google.aip.dev/158 for more.
720
795
  # @!attribute [rw] filter
721
796
  # @return [::String]
722
797
  # The raw filter text to constrain the results.
@@ -732,6 +807,7 @@ module Google
732
807
  # @!attribute [rw] next_page_token
733
808
  # @return [::String]
734
809
  # Token to receive the next page of results.
810
+ # This will be absent if the end of the response list has been reached.
735
811
  class ListBuildsResponse
736
812
  include ::Google::Protobuf::MessageExts
737
813
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -740,7 +816,7 @@ module Google
740
816
  # Request to cancel an ongoing build.
741
817
  # @!attribute [rw] name
742
818
  # @return [::String]
743
- # The name of the `Build` to retrieve.
819
+ # The name of the `Build` to cancel.
744
820
  # Format: `projects/{project}/locations/{location}/builds/{build}`
745
821
  # @!attribute [rw] project_id
746
822
  # @return [::String]
@@ -792,8 +868,8 @@ module Google
792
868
  # Contents of the build template.
793
869
  # @!attribute [rw] filename
794
870
  # @return [::String]
795
- # Path, from the source root, to a file whose contents is used for the
796
- # template.
871
+ # Path, from the source root, to the build configuration file
872
+ # (i.e. cloudbuild.yaml).
797
873
  # @!attribute [r] create_time
798
874
  # @return [::Google::Protobuf::Timestamp]
799
875
  # Output only. Time when the trigger was created.
@@ -893,6 +969,10 @@ module Google
893
969
  # Enforce that repository owners or collaborators must comment on Pull
894
970
  # Requests before builds are triggered.
895
971
  COMMENTS_ENABLED = 1
972
+
973
+ # Enforce that repository owners or collaborators must comment on external
974
+ # contributors' Pull Requests before builds are triggered.
975
+ COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2
896
976
  end
897
977
  end
898
978
 
@@ -1092,6 +1172,12 @@ module Google
1092
1172
 
1093
1173
  # Highcpu machine with 32 CPUs.
1094
1174
  N1_HIGHCPU_32 = 2
1175
+
1176
+ # Highcpu e2 machine with 8 CPUs.
1177
+ E2_HIGHCPU_8 = 5
1178
+
1179
+ # Highcpu e2 machine with 32 CPUs.
1180
+ E2_HIGHCPU_32 = 6
1095
1181
  end
1096
1182
 
1097
1183
  # Specifies the behavior when there is an error in the substitution checks.
@@ -1138,11 +1224,36 @@ module Google
1138
1224
  CLOUD_LOGGING_ONLY = 5
1139
1225
 
1140
1226
  # Turn off all logging. No build logs will be captured.
1141
- # Next ID: 6
1142
1227
  NONE = 4
1143
1228
  end
1144
1229
  end
1145
1230
 
1231
+ # ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by
1232
+ # the ReceiveTriggerWebhook method.
1233
+ # @!attribute [rw] body
1234
+ # @return [::Google::Api::HttpBody]
1235
+ # HTTP request body.
1236
+ # @!attribute [rw] project_id
1237
+ # @return [::String]
1238
+ # Project in which the specified trigger lives
1239
+ # @!attribute [rw] trigger
1240
+ # @return [::String]
1241
+ # Name of the trigger to run the payload against
1242
+ # @!attribute [rw] secret
1243
+ # @return [::String]
1244
+ # Secret token used for authorization if an OAuth token isn't provided.
1245
+ class ReceiveTriggerWebhookRequest
1246
+ include ::Google::Protobuf::MessageExts
1247
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1248
+ end
1249
+
1250
+ # ReceiveTriggerWebhookResponse [Experimental] is the response object for the
1251
+ # ReceiveTriggerWebhook method.
1252
+ class ReceiveTriggerWebhookResponse
1253
+ include ::Google::Protobuf::MessageExts
1254
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1255
+ end
1256
+
1146
1257
  # Configuration for a WorkerPool to run the builds.
1147
1258
  #
1148
1259
  # Workers are machines that Cloud Build uses to run your builds. By default,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-build-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-09 00:00:00.000000000 Z
11
+ date: 2021-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.3'
19
+ version: '0.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.3'
26
+ version: '0.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-errors
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -177,6 +177,7 @@ files:
177
177
  - lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb
178
178
  - proto_docs/README.md
179
179
  - proto_docs/google/api/field_behavior.rb
180
+ - proto_docs/google/api/httpbody.rb
180
181
  - proto_docs/google/api/resource.rb
181
182
  - proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb
182
183
  - proto_docs/google/longrunning/operations.rb