google-cloud-build-v1 0.1.3 → 0.2.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: 1adc0758b98d9defb7cf94df3b43daed8be2e0c4096dedfb382528b14333d29d
4
- data.tar.gz: ec5f07aca3a4ab8bbf17dbf74a1f36de49d3fa2967ed0dfc2a287bad03a98b86
3
+ metadata.gz: fb56582aa7081b96ef02b490de4d66a839256e284b121756d7d32d9ba8972e3f
4
+ data.tar.gz: 51de23808381cbfc1bfae3f682b05ce9593f7cdd19760cd501e91b5089c98a68
5
5
  SHA512:
6
- metadata.gz: 2cac391c182c4b37265d75fd089f965c32201ee2aecf4eec6be13f9b958d794a4ec66b1f601b4f9a5272b9d5ccc63d6bc9ee9a2be80572f50fcf2020f7944f84
7
- data.tar.gz: c0136c9a539f2e448f074d873aae3e86e8a58dfa3273d909991238d9f1d76efea619105cc2f6a294ec5f2f7155a4d1cad92d2841e17d911b45917f1511e6b53b
6
+ metadata.gz: 5f098c78a636092e3382c8194e76852d394533ab3d9c78c90210eaa679cf68836d1355e38f2680b62277ef28bae6d8fc0e78e1d716263fa9348652e0d95c1dba
7
+ data.tar.gz: c91613ade650a7c1b5c9ab9f3d5124447ed744b3e82b6c2859b2a4982a4be2ce4461017b4441c46d42ede7519b907dc48b4bfe736c40fa2780eae1a79c912297
@@ -23,6 +23,7 @@ require "gapic/config/method"
23
23
  require "google/cloud/build/v1/version"
24
24
 
25
25
  require "google/cloud/build/v1/cloud_build/credentials"
26
+ require "google/cloud/build/v1/cloud_build/paths"
26
27
  require "google/cloud/build/v1/cloud_build/operations"
27
28
  require "google/cloud/build/v1/cloud_build/client"
28
29
 
@@ -37,6 +37,8 @@ module Google
37
37
  # determine the status of the build.
38
38
  #
39
39
  class Client
40
+ include Paths
41
+
40
42
  # @private
41
43
  attr_reader :cloud_build_stub
42
44
 
@@ -252,11 +254,14 @@ module Google
252
254
  # @param options [::Gapic::CallOptions, ::Hash]
253
255
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
254
256
  #
255
- # @overload create_build(project_id: nil, build: nil)
257
+ # @overload create_build(parent: nil, project_id: nil, build: nil)
256
258
  # Pass arguments to `create_build` via keyword arguments. Note that at
257
259
  # least one keyword argument is required. To specify no parameters, or to keep all
258
260
  # the default parameter values, pass an empty Hash as a request object (see above).
259
261
  #
262
+ # @param parent [::String]
263
+ # The parent resource where this build will be created.
264
+ # Format: `projects/{project}/locations/{location}`
260
265
  # @param project_id [::String]
261
266
  # Required. ID of the project.
262
267
  # @param build [::Google::Cloud::Build::V1::Build, ::Hash]
@@ -324,11 +329,14 @@ module Google
324
329
  # @param options [::Gapic::CallOptions, ::Hash]
325
330
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
326
331
  #
327
- # @overload get_build(project_id: nil, id: nil)
332
+ # @overload get_build(name: nil, project_id: nil, id: nil)
328
333
  # Pass arguments to `get_build` via keyword arguments. Note that at
329
334
  # least one keyword argument is required. To specify no parameters, or to keep all
330
335
  # the default parameter values, pass an empty Hash as a request object (see above).
331
336
  #
337
+ # @param name [::String]
338
+ # The name of the `Build` to retrieve.
339
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
332
340
  # @param project_id [::String]
333
341
  # Required. ID of the project.
334
342
  # @param id [::String]
@@ -396,11 +404,14 @@ module Google
396
404
  # @param options [::Gapic::CallOptions, ::Hash]
397
405
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
398
406
  #
399
- # @overload list_builds(project_id: nil, page_size: nil, page_token: nil, filter: nil)
407
+ # @overload list_builds(parent: nil, project_id: nil, page_size: nil, page_token: nil, filter: nil)
400
408
  # Pass arguments to `list_builds` via keyword arguments. Note that at
401
409
  # least one keyword argument is required. To specify no parameters, or to keep all
402
410
  # the default parameter values, pass an empty Hash as a request object (see above).
403
411
  #
412
+ # @param parent [::String]
413
+ # The parent of the collection of `Builds`.
414
+ # Format: `projects/{project}/locations/location`
404
415
  # @param project_id [::String]
405
416
  # Required. ID of the project.
406
417
  # @param page_size [::Integer]
@@ -469,11 +480,14 @@ module Google
469
480
  # @param options [::Gapic::CallOptions, ::Hash]
470
481
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
471
482
  #
472
- # @overload cancel_build(project_id: nil, id: nil)
483
+ # @overload cancel_build(name: nil, project_id: nil, id: nil)
473
484
  # Pass arguments to `cancel_build` via keyword arguments. Note that at
474
485
  # least one keyword argument is required. To specify no parameters, or to keep all
475
486
  # the default parameter values, pass an empty Hash as a request object (see above).
476
487
  #
488
+ # @param name [::String]
489
+ # The name of the `Build` to retrieve.
490
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
477
491
  # @param project_id [::String]
478
492
  # Required. ID of the project.
479
493
  # @param id [::String]
@@ -564,11 +578,14 @@ module Google
564
578
  # @param options [::Gapic::CallOptions, ::Hash]
565
579
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
566
580
  #
567
- # @overload retry_build(project_id: nil, id: nil)
581
+ # @overload retry_build(name: nil, project_id: nil, id: nil)
568
582
  # Pass arguments to `retry_build` via keyword arguments. Note that at
569
583
  # least one keyword argument is required. To specify no parameters, or to keep all
570
584
  # the default parameter values, pass an empty Hash as a request object (see above).
571
585
  #
586
+ # @param name [::String]
587
+ # The name of the `Build` to retry.
588
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
572
589
  # @param project_id [::String]
573
590
  # Required. ID of the project.
574
591
  # @param id [::String]
@@ -0,0 +1,139 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 Cloud
22
+ module Build
23
+ module V1
24
+ module CloudBuild
25
+ # Path helper methods for the CloudBuild API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Build resource string.
29
+ #
30
+ # @overload build_path(project:, build:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/builds/{build}`
34
+ #
35
+ # @param project [String]
36
+ # @param build [String]
37
+ #
38
+ # @overload build_path(project:, location:, build:)
39
+ # The resource will be in the following format:
40
+ #
41
+ # `projects/{project}/locations/{location}/builds/{build}`
42
+ #
43
+ # @param project [String]
44
+ # @param location [String]
45
+ # @param build [String]
46
+ #
47
+ # @return [::String]
48
+ def build_path **args
49
+ resources = {
50
+ "build:project" => (proc do |project:, build:|
51
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
52
+
53
+ "projects/#{project}/builds/#{build}"
54
+ end),
55
+ "build:location:project" => (proc do |project:, location:, build:|
56
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
57
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
58
+
59
+ "projects/#{project}/locations/#{location}/builds/#{build}"
60
+ end)
61
+ }
62
+
63
+ resource = resources[args.keys.sort.join(":")]
64
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
65
+ resource.call(**args)
66
+ end
67
+
68
+ ##
69
+ # Create a fully-qualified BuildTrigger resource string.
70
+ #
71
+ # The resource will be in the following format:
72
+ #
73
+ # `projects/{project}/triggers/{trigger}`
74
+ #
75
+ # @param project [String]
76
+ # @param trigger [String]
77
+ #
78
+ # @return [::String]
79
+ def build_trigger_path project:, trigger:
80
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
81
+
82
+ "projects/#{project}/triggers/#{trigger}"
83
+ end
84
+
85
+ ##
86
+ # Create a fully-qualified Location resource string.
87
+ #
88
+ # The resource will be in the following format:
89
+ #
90
+ # `projects/{project}/locations/{location}`
91
+ #
92
+ # @param project [String]
93
+ # @param location [String]
94
+ #
95
+ # @return [::String]
96
+ def location_path project:, location:
97
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
98
+
99
+ "projects/#{project}/locations/#{location}"
100
+ end
101
+
102
+ ##
103
+ # Create a fully-qualified Project resource string.
104
+ #
105
+ # The resource will be in the following format:
106
+ #
107
+ # `projects/{project}`
108
+ #
109
+ # @param project [String]
110
+ #
111
+ # @return [::String]
112
+ def project_path project:
113
+ "projects/#{project}"
114
+ end
115
+
116
+ ##
117
+ # Create a fully-qualified ServiceAccount resource string.
118
+ #
119
+ # The resource will be in the following format:
120
+ #
121
+ # `projects/{project}/serviceAccounts/{service_account}`
122
+ #
123
+ # @param project [String]
124
+ # @param service_account [String]
125
+ #
126
+ # @return [::String]
127
+ def service_account_path project:, service_account:
128
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
129
+
130
+ "projects/#{project}/serviceAccounts/#{service_account}"
131
+ end
132
+
133
+ extend self
134
+ end
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Build
23
23
  module V1
24
- VERSION = "0.1.3"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -6,13 +6,16 @@ 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/resource_pb'
9
10
  require 'google/longrunning/operations_pb'
10
11
  require 'google/protobuf/duration_pb'
11
12
  require 'google/protobuf/empty_pb'
13
+ require 'google/protobuf/field_mask_pb'
12
14
  require 'google/protobuf/timestamp_pb'
13
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
16
  add_file("google/devtools/cloudbuild/v1/cloudbuild.proto", :syntax => :proto3) do
15
17
  add_message "google.devtools.cloudbuild.v1.RetryBuildRequest" do
18
+ optional :name, :string, 3
16
19
  optional :project_id, :string, 1
17
20
  optional :id, :string, 2
18
21
  end
@@ -81,6 +84,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
81
84
  repeated :file_hash, :message, 2, "google.devtools.cloudbuild.v1.FileHashes"
82
85
  end
83
86
  add_message "google.devtools.cloudbuild.v1.Build" do
87
+ optional :name, :string, 45
84
88
  optional :id, :string, 1
85
89
  optional :project_id, :string, 16
86
90
  optional :status, :enum, 2, "google.devtools.cloudbuild.v1.Build.Status"
@@ -104,6 +108,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
104
108
  repeated :tags, :string, 31
105
109
  repeated :secrets, :message, 32, "google.devtools.cloudbuild.v1.Secret"
106
110
  map :timing, :string, :message, 33, "google.devtools.cloudbuild.v1.TimeSpan"
111
+ optional :service_account, :string, 42
107
112
  end
108
113
  add_enum "google.devtools.cloudbuild.v1.Build.Status" do
109
114
  value :STATUS_UNKNOWN, 0
@@ -154,14 +159,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
154
159
  map :secret_env, :string, :bytes, 3
155
160
  end
156
161
  add_message "google.devtools.cloudbuild.v1.CreateBuildRequest" do
162
+ optional :parent, :string, 4
157
163
  optional :project_id, :string, 1
158
164
  optional :build, :message, 2, "google.devtools.cloudbuild.v1.Build"
159
165
  end
160
166
  add_message "google.devtools.cloudbuild.v1.GetBuildRequest" do
167
+ optional :name, :string, 4
161
168
  optional :project_id, :string, 1
162
169
  optional :id, :string, 2
163
170
  end
164
171
  add_message "google.devtools.cloudbuild.v1.ListBuildsRequest" do
172
+ optional :parent, :string, 9
165
173
  optional :project_id, :string, 1
166
174
  optional :page_size, :int32, 2
167
175
  optional :page_token, :string, 3
@@ -172,6 +180,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
172
180
  optional :next_page_token, :string, 2
173
181
  end
174
182
  add_message "google.devtools.cloudbuild.v1.CancelBuildRequest" do
183
+ optional :name, :string, 4
175
184
  optional :project_id, :string, 1
176
185
  optional :id, :string, 2
177
186
  end
@@ -251,6 +260,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
251
260
  optional :machine_type, :enum, 3, "google.devtools.cloudbuild.v1.BuildOptions.MachineType"
252
261
  optional :disk_size_gb, :int64, 6
253
262
  optional :substitution_option, :enum, 4, "google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption"
263
+ optional :dynamic_substitutions, :bool, 17
254
264
  optional :log_streaming_option, :enum, 5, "google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption"
255
265
  optional :worker_pool, :string, 7
256
266
  optional :logging, :enum, 11, "google.devtools.cloudbuild.v1.BuildOptions.LoggingMode"
@@ -280,6 +290,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
280
290
  value :LOGGING_UNSPECIFIED, 0
281
291
  value :LEGACY, 1
282
292
  value :GCS_ONLY, 2
293
+ value :STACKDRIVER_ONLY, 3
294
+ value :CLOUD_LOGGING_ONLY, 5
295
+ value :NONE, 4
283
296
  end
284
297
  add_message "google.devtools.cloudbuild.v1.WorkerPool" do
285
298
  optional :name, :string, 14
@@ -22,6 +22,10 @@ module Google
22
22
  module Build
23
23
  module V1
24
24
  # Specifies a build to retry.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # The name of the `Build` to retry.
28
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
25
29
  # @!attribute [rw] project_id
26
30
  # @return [::String]
27
31
  # Required. ID of the project.
@@ -228,7 +232,7 @@ module Google
228
232
  # @!attribute [r] timing
229
233
  # @return [::Google::Cloud::Build::V1::TimeSpan]
230
234
  # Output only. Stores timing information for executing this build step.
231
- # @!attribute [rw] pull_timing
235
+ # @!attribute [r] pull_timing
232
236
  # @return [::Google::Cloud::Build::V1::TimeSpan]
233
237
  # Output only. Stores timing information for pulling this build step's
234
238
  # builder image only.
@@ -237,7 +241,7 @@ module Google
237
241
  # Time limit for executing this build step. If not defined, the step has no
238
242
  # time limit and will be allowed to continue to run until either it completes
239
243
  # or the build itself times out.
240
- # @!attribute [rw] status
244
+ # @!attribute [r] status
241
245
  # @return [::Google::Cloud::Build::V1::Build::Status]
242
246
  # Output only. Status of the build step. At this time, build step status is
243
247
  # only updated on build completion; step status is not updated in real-time
@@ -328,16 +332,21 @@ module Google
328
332
  # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
329
333
  # resolved from the specified branch or tag.
330
334
  # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
335
+ # @!attribute [r] name
336
+ # @return [::String]
337
+ # Output only. The 'Build' name with format:
338
+ # `projects/{project}/locations/{location}/builds/{build}`, where \\{build}
339
+ # is a unique identifier generated by the service.
331
340
  # @!attribute [r] id
332
341
  # @return [::String]
333
342
  # Output only. Unique identifier of the build.
334
343
  # @!attribute [r] project_id
335
344
  # @return [::String]
336
345
  # Output only. ID of the project.
337
- # @!attribute [rw] status
346
+ # @!attribute [r] status
338
347
  # @return [::Google::Cloud::Build::V1::Build::Status]
339
348
  # Output only. Status of the build.
340
- # @!attribute [rw] status_detail
349
+ # @!attribute [r] status_detail
341
350
  # @return [::String]
342
351
  # Output only. Customer-readable message about the current status.
343
352
  # @!attribute [rw] source
@@ -367,6 +376,8 @@ module Google
367
376
  # granularity. If this amount of time elapses, work on the build will cease
368
377
  # and the build status will be `TIMEOUT`.
369
378
  #
379
+ # `timeout` starts ticking from `startTime`.
380
+ #
370
381
  # Default time is ten minutes.
371
382
  # @!attribute [rw] images
372
383
  # @return [::Array<::String>]
@@ -397,10 +408,10 @@ module Google
397
408
  # [Bucket Name
398
409
  # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
399
410
  # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
400
- # @!attribute [rw] source_provenance
411
+ # @!attribute [r] source_provenance
401
412
  # @return [::Google::Cloud::Build::V1::SourceProvenance]
402
413
  # Output only. A permanent fixed identifier for source.
403
- # @!attribute [rw] build_trigger_id
414
+ # @!attribute [r] build_trigger_id
404
415
  # @return [::String]
405
416
  # Output only. The ID of the `BuildTrigger` that triggered this build, if it
406
417
  # was triggered automatically.
@@ -430,6 +441,13 @@ module Google
430
441
  #
431
442
  # If the build does not specify source or images,
432
443
  # these keys will not be included.
444
+ # @!attribute [rw] service_account
445
+ # @return [::String]
446
+ # IAM service account whose credentials will be used at build runtime.
447
+ # Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
448
+ # ACCOUNT can be email address or uniqueId of the service account.
449
+ #
450
+ # This field is in alpha and is not publicly available.
433
451
  class Build
434
452
  include ::Google::Protobuf::MessageExts
435
453
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -526,7 +544,7 @@ module Google
526
544
  # @!attribute [rw] paths
527
545
  # @return [::Array<::String>]
528
546
  # Path globs used to match files in the build's workspace.
529
- # @!attribute [rw] timing
547
+ # @!attribute [r] timing
530
548
  # @return [::Google::Cloud::Build::V1::TimeSpan]
531
549
  # Output only. Stores timing information for pushing all artifact objects.
532
550
  class ArtifactObjects
@@ -654,6 +672,10 @@ module Google
654
672
  end
655
673
 
656
674
  # Request to create a new build.
675
+ # @!attribute [rw] parent
676
+ # @return [::String]
677
+ # The parent resource where this build will be created.
678
+ # Format: `projects/{project}/locations/{location}`
657
679
  # @!attribute [rw] project_id
658
680
  # @return [::String]
659
681
  # Required. ID of the project.
@@ -666,6 +688,10 @@ module Google
666
688
  end
667
689
 
668
690
  # Request to get a build.
691
+ # @!attribute [rw] name
692
+ # @return [::String]
693
+ # The name of the `Build` to retrieve.
694
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
669
695
  # @!attribute [rw] project_id
670
696
  # @return [::String]
671
697
  # Required. ID of the project.
@@ -678,6 +704,10 @@ module Google
678
704
  end
679
705
 
680
706
  # Request to list builds.
707
+ # @!attribute [rw] parent
708
+ # @return [::String]
709
+ # The parent of the collection of `Builds`.
710
+ # Format: `projects/{project}/locations/location`
681
711
  # @!attribute [rw] project_id
682
712
  # @return [::String]
683
713
  # Required. ID of the project.
@@ -708,6 +738,10 @@ module Google
708
738
  end
709
739
 
710
740
  # Request to cancel an ongoing build.
741
+ # @!attribute [rw] name
742
+ # @return [::String]
743
+ # The name of the `Build` to retrieve.
744
+ # Format: `projects/{project}/locations/{location}/builds/{build}`
711
745
  # @!attribute [rw] project_id
712
746
  # @return [::String]
713
747
  # Required. ID of the project.
@@ -765,12 +799,11 @@ module Google
765
799
  # Output only. Time when the trigger was created.
766
800
  # @!attribute [rw] disabled
767
801
  # @return [::Boolean]
768
- # If true, the trigger will never result in a build.
802
+ # If true, the trigger will never automatically execute a build.
769
803
  # @!attribute [rw] substitutions
770
804
  # @return [::Google::Protobuf::Map{::String => ::String}]
771
805
  # Substitutions for Build resource. The keys must match the following
772
- # regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the
773
- # keys in bindings.
806
+ # regular expression: `^_[A-Z0-9_]+$`.
774
807
  # @!attribute [rw] ignored_files
775
808
  # @return [::Array<::String>]
776
809
  # ignored_files and included_files are file glob matches using
@@ -843,8 +876,8 @@ module Google
843
876
  # RE2 and described at https://github.com/google/re2/wiki/Syntax
844
877
  # @!attribute [rw] comment_control
845
878
  # @return [::Google::Cloud::Build::V1::PullRequestFilter::CommentControl]
846
- # Whether to block builds on a "/gcbrun" comment from a repository admin or
847
- # collaborator.
879
+ # Configure builds to run whether a repository owner or collaborator need to
880
+ # comment `/gcbrun`.
848
881
  # @!attribute [rw] invert_regex
849
882
  # @return [::Boolean]
850
883
  # If true, branches that do NOT match the git_ref will trigger a build.
@@ -985,6 +1018,16 @@ module Google
985
1018
  # @return [::Google::Cloud::Build::V1::BuildOptions::SubstitutionOption]
986
1019
  # Option to specify behavior when there is an error in the substitution
987
1020
  # checks.
1021
+ #
1022
+ # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
1023
+ # be overridden in the build configuration file.
1024
+ # @!attribute [rw] dynamic_substitutions
1025
+ # @return [::Boolean]
1026
+ # Option to specify whether or not to apply bash style string
1027
+ # operations to the substitutions.
1028
+ #
1029
+ # NOTE: this is always enabled for triggered builds and cannot be
1030
+ # overridden in the build configuration file.
988
1031
  # @!attribute [rw] log_streaming_option
989
1032
  # @return [::Google::Cloud::Build::V1::BuildOptions::LogStreamingOption]
990
1033
  # Option to define build log streaming behavior to Google Cloud
@@ -997,8 +1040,8 @@ module Google
997
1040
  # This field is experimental.
998
1041
  # @!attribute [rw] logging
999
1042
  # @return [::Google::Cloud::Build::V1::BuildOptions::LoggingMode]
1000
- # Option to specify the logging mode, which determines where the logs are
1001
- # stored.
1043
+ # Option to specify the logging mode, which determines if and where build
1044
+ # logs are stored.
1002
1045
  # @!attribute [rw] env
1003
1046
  # @return [::Array<::String>]
1004
1047
  # A list of global environment variable definitions that will exist for all
@@ -1037,7 +1080,9 @@ module Google
1037
1080
  VERIFIED = 1
1038
1081
  end
1039
1082
 
1040
- # Supported VM sizes.
1083
+ # Supported Compute Engine machine types.
1084
+ # For more information, see [Machine
1085
+ # types](https://cloud.google.com/compute/docs/machine-types).
1041
1086
  module MachineType
1042
1087
  # Standard machine type.
1043
1088
  UNSPECIFIED = 0
@@ -1078,11 +1123,23 @@ module Google
1078
1123
  # rely on the default logging behavior as it may change in the future.
1079
1124
  LOGGING_UNSPECIFIED = 0
1080
1125
 
1081
- # Stackdriver logging and Cloud Storage logging are enabled.
1126
+ # Cloud Logging and Cloud Storage logging are enabled.
1082
1127
  LEGACY = 1
1083
1128
 
1084
1129
  # Only Cloud Storage logging is enabled.
1085
1130
  GCS_ONLY = 2
1131
+
1132
+ # This option is the same as CLOUD_LOGGING_ONLY.
1133
+ STACKDRIVER_ONLY = 3
1134
+
1135
+ # Only Cloud Logging is enabled. Note that logs for both the Cloud Console
1136
+ # UI and Cloud SDK are based on Cloud Storage logs, so neither will provide
1137
+ # logs if this option is chosen.
1138
+ CLOUD_LOGGING_ONLY = 5
1139
+
1140
+ # Turn off all logging. No build logs will be captured.
1141
+ # Next ID: 6
1142
+ NONE = 4
1086
1143
  end
1087
1144
  end
1088
1145
 
@@ -0,0 +1,229 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 Protobuf
22
+ # `FieldMask` represents a set of symbolic field paths, for example:
23
+ #
24
+ # paths: "f.a"
25
+ # paths: "f.b.d"
26
+ #
27
+ # Here `f` represents a field in some root message, `a` and `b`
28
+ # fields in the message found in `f`, and `d` a field found in the
29
+ # message in `f.b`.
30
+ #
31
+ # Field masks are used to specify a subset of fields that should be
32
+ # returned by a get operation or modified by an update operation.
33
+ # Field masks also have a custom JSON encoding (see below).
34
+ #
35
+ # # Field Masks in Projections
36
+ #
37
+ # When used in the context of a projection, a response message or
38
+ # sub-message is filtered by the API to only contain those fields as
39
+ # specified in the mask. For example, if the mask in the previous
40
+ # example is applied to a response message as follows:
41
+ #
42
+ # f {
43
+ # a : 22
44
+ # b {
45
+ # d : 1
46
+ # x : 2
47
+ # }
48
+ # y : 13
49
+ # }
50
+ # z: 8
51
+ #
52
+ # The result will not contain specific values for fields x,y and z
53
+ # (their value will be set to the default, and omitted in proto text
54
+ # output):
55
+ #
56
+ #
57
+ # f {
58
+ # a : 22
59
+ # b {
60
+ # d : 1
61
+ # }
62
+ # }
63
+ #
64
+ # A repeated field is not allowed except at the last position of a
65
+ # paths string.
66
+ #
67
+ # If a FieldMask object is not present in a get operation, the
68
+ # operation applies to all fields (as if a FieldMask of all fields
69
+ # had been specified).
70
+ #
71
+ # Note that a field mask does not necessarily apply to the
72
+ # top-level response message. In case of a REST get operation, the
73
+ # field mask applies directly to the response, but in case of a REST
74
+ # list operation, the mask instead applies to each individual message
75
+ # in the returned resource list. In case of a REST custom method,
76
+ # other definitions may be used. Where the mask applies will be
77
+ # clearly documented together with its declaration in the API. In
78
+ # any case, the effect on the returned resource/resources is required
79
+ # behavior for APIs.
80
+ #
81
+ # # Field Masks in Update Operations
82
+ #
83
+ # A field mask in update operations specifies which fields of the
84
+ # targeted resource are going to be updated. The API is required
85
+ # to only change the values of the fields as specified in the mask
86
+ # and leave the others untouched. If a resource is passed in to
87
+ # describe the updated values, the API ignores the values of all
88
+ # fields not covered by the mask.
89
+ #
90
+ # If a repeated field is specified for an update operation, new values will
91
+ # be appended to the existing repeated field in the target resource. Note that
92
+ # a repeated field is only allowed in the last position of a `paths` string.
93
+ #
94
+ # If a sub-message is specified in the last position of the field mask for an
95
+ # update operation, then new value will be merged into the existing sub-message
96
+ # in the target resource.
97
+ #
98
+ # For example, given the target message:
99
+ #
100
+ # f {
101
+ # b {
102
+ # d: 1
103
+ # x: 2
104
+ # }
105
+ # c: [1]
106
+ # }
107
+ #
108
+ # And an update message:
109
+ #
110
+ # f {
111
+ # b {
112
+ # d: 10
113
+ # }
114
+ # c: [2]
115
+ # }
116
+ #
117
+ # then if the field mask is:
118
+ #
119
+ # paths: ["f.b", "f.c"]
120
+ #
121
+ # then the result will be:
122
+ #
123
+ # f {
124
+ # b {
125
+ # d: 10
126
+ # x: 2
127
+ # }
128
+ # c: [1, 2]
129
+ # }
130
+ #
131
+ # An implementation may provide options to override this default behavior for
132
+ # repeated and message fields.
133
+ #
134
+ # In order to reset a field's value to the default, the field must
135
+ # be in the mask and set to the default value in the provided resource.
136
+ # Hence, in order to reset all fields of a resource, provide a default
137
+ # instance of the resource and set all fields in the mask, or do
138
+ # not provide a mask as described below.
139
+ #
140
+ # If a field mask is not present on update, the operation applies to
141
+ # all fields (as if a field mask of all fields has been specified).
142
+ # Note that in the presence of schema evolution, this may mean that
143
+ # fields the client does not know and has therefore not filled into
144
+ # the request will be reset to their default. If this is unwanted
145
+ # behavior, a specific service may require a client to always specify
146
+ # a field mask, producing an error if not.
147
+ #
148
+ # As with get operations, the location of the resource which
149
+ # describes the updated values in the request message depends on the
150
+ # operation kind. In any case, the effect of the field mask is
151
+ # required to be honored by the API.
152
+ #
153
+ # ## Considerations for HTTP REST
154
+ #
155
+ # The HTTP kind of an update operation which uses a field mask must
156
+ # be set to PATCH instead of PUT in order to satisfy HTTP semantics
157
+ # (PUT must only be used for full updates).
158
+ #
159
+ # # JSON Encoding of Field Masks
160
+ #
161
+ # In JSON, a field mask is encoded as a single string where paths are
162
+ # separated by a comma. Fields name in each path are converted
163
+ # to/from lower-camel naming conventions.
164
+ #
165
+ # As an example, consider the following message declarations:
166
+ #
167
+ # message Profile {
168
+ # User user = 1;
169
+ # Photo photo = 2;
170
+ # }
171
+ # message User {
172
+ # string display_name = 1;
173
+ # string address = 2;
174
+ # }
175
+ #
176
+ # In proto a field mask for `Profile` may look as such:
177
+ #
178
+ # mask {
179
+ # paths: "user.display_name"
180
+ # paths: "photo"
181
+ # }
182
+ #
183
+ # In JSON, the same mask is represented as below:
184
+ #
185
+ # {
186
+ # mask: "user.displayName,photo"
187
+ # }
188
+ #
189
+ # # Field Masks and Oneof Fields
190
+ #
191
+ # Field masks treat fields in oneofs just as regular fields. Consider the
192
+ # following message:
193
+ #
194
+ # message SampleMessage {
195
+ # oneof test_oneof {
196
+ # string name = 4;
197
+ # SubMessage sub_message = 9;
198
+ # }
199
+ # }
200
+ #
201
+ # The field mask can be:
202
+ #
203
+ # mask {
204
+ # paths: "name"
205
+ # }
206
+ #
207
+ # Or:
208
+ #
209
+ # mask {
210
+ # paths: "sub_message"
211
+ # }
212
+ #
213
+ # Note that oneof type names ("test_oneof" in this case) cannot be used in
214
+ # paths.
215
+ #
216
+ # ## Field Mask Verification
217
+ #
218
+ # The implementation of any API method which has a FieldMask type field in the
219
+ # request should verify the included field paths, and return an
220
+ # `INVALID_ARGUMENT` error if any path is unmappable.
221
+ # @!attribute [rw] paths
222
+ # @return [::Array<::String>]
223
+ # The set of field mask paths.
224
+ class FieldMask
225
+ include ::Google::Protobuf::MessageExts
226
+ extend ::Google::Protobuf::MessageExts::ClassMethods
227
+ end
228
+ end
229
+ end
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.1.3
4
+ version: 0.2.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: 2020-08-10 00:00:00.000000000 Z
11
+ date: 2020-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -169,6 +169,7 @@ files:
169
169
  - lib/google/cloud/build/v1/cloud_build/client.rb
170
170
  - lib/google/cloud/build/v1/cloud_build/credentials.rb
171
171
  - lib/google/cloud/build/v1/cloud_build/operations.rb
172
+ - lib/google/cloud/build/v1/cloud_build/paths.rb
172
173
  - lib/google/cloud/build/v1/version.rb
173
174
  - lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb
174
175
  - lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb
@@ -180,6 +181,7 @@ files:
180
181
  - proto_docs/google/protobuf/any.rb
181
182
  - proto_docs/google/protobuf/duration.rb
182
183
  - proto_docs/google/protobuf/empty.rb
184
+ - proto_docs/google/protobuf/field_mask.rb
183
185
  - proto_docs/google/protobuf/timestamp.rb
184
186
  - proto_docs/google/rpc/status.rb
185
187
  homepage: https://github.com/googleapis/google-cloud-ruby
@@ -201,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
203
  - !ruby/object:Gem::Version
202
204
  version: '0'
203
205
  requirements: []
204
- rubygems_version: 3.1.3
206
+ rubygems_version: 3.1.4
205
207
  signing_key:
206
208
  specification_version: 4
207
209
  summary: API Client library for the Cloud Build V1 API