google-cloud-build-v1 0.10.0 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/lib/google/cloud/build/v1/cloud_build/client.rb +452 -62
- data/lib/google/cloud/build/v1/cloud_build/operations.rb +115 -12
- data/lib/google/cloud/build/v1/version.rb +1 -1
- data/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb +4 -2
- data/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb +1 -1
- data/proto_docs/google/api/httpbody.rb +7 -3
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb +12 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7cf84214a764ea56eda2047b8340fefc1d578dcacf3a2f62d379e271c2a383f
|
4
|
+
data.tar.gz: 6abd21d58b454c04320d767494dc940ffc348c4df912b71b68f9e276ffd64e8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a00c18ca99af8da6b38a44186379488affb22fba9c084f77f1918b5653cbde0147812a6109c52355639f481cb8f60a79959ef0ce99508730402db07133418c3
|
7
|
+
data.tar.gz: ce40ebb9b70da3cfefae23ce0acb7b05a50a4b34ef57f23cef6d0e7e22d01b87a6506b1d445f2d56641c29e5d09ddc34c118733dbaa3663d23fb57816100ba9e
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
@@ -195,6 +195,7 @@ module Google
|
|
195
195
|
|
196
196
|
@operations_client = Operations.new do |config|
|
197
197
|
config.credentials = credentials
|
198
|
+
config.quota_project = @quota_project_id
|
198
199
|
config.endpoint = @config.endpoint
|
199
200
|
end
|
200
201
|
|
@@ -254,6 +255,28 @@ module Google
|
|
254
255
|
#
|
255
256
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
256
257
|
#
|
258
|
+
# @example Basic example
|
259
|
+
# require "google/cloud/build/v1"
|
260
|
+
#
|
261
|
+
# # Create a client object. The client can be reused for multiple calls.
|
262
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
263
|
+
#
|
264
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
265
|
+
# request = Google::Cloud::Build::V1::CreateBuildRequest.new
|
266
|
+
#
|
267
|
+
# # Call the create_build method.
|
268
|
+
# result = client.create_build request
|
269
|
+
#
|
270
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
271
|
+
# # object to check the status of an operation, cancel it, or wait
|
272
|
+
# # for results. Here is how to block until completion:
|
273
|
+
# result.wait_until_done! timeout: 60
|
274
|
+
# if result.response?
|
275
|
+
# p result.response
|
276
|
+
# else
|
277
|
+
# puts "Error!"
|
278
|
+
# end
|
279
|
+
#
|
257
280
|
def create_build request, options = nil
|
258
281
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
259
282
|
|
@@ -271,9 +294,11 @@ module Google
|
|
271
294
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
272
295
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
273
296
|
|
274
|
-
header_params = {
|
275
|
-
|
276
|
-
|
297
|
+
header_params = {}
|
298
|
+
if request.project_id
|
299
|
+
header_params["project_id"] = request.project_id
|
300
|
+
end
|
301
|
+
|
277
302
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
278
303
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
279
304
|
|
@@ -331,6 +356,21 @@ module Google
|
|
331
356
|
#
|
332
357
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
333
358
|
#
|
359
|
+
# @example Basic example
|
360
|
+
# require "google/cloud/build/v1"
|
361
|
+
#
|
362
|
+
# # Create a client object. The client can be reused for multiple calls.
|
363
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
364
|
+
#
|
365
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
366
|
+
# request = Google::Cloud::Build::V1::GetBuildRequest.new
|
367
|
+
#
|
368
|
+
# # Call the get_build method.
|
369
|
+
# result = client.get_build request
|
370
|
+
#
|
371
|
+
# # The returned object is of type Google::Cloud::Build::V1::Build.
|
372
|
+
# p result
|
373
|
+
#
|
334
374
|
def get_build request, options = nil
|
335
375
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
336
376
|
|
@@ -348,10 +388,14 @@ module Google
|
|
348
388
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
349
389
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
350
390
|
|
351
|
-
header_params = {
|
352
|
-
|
353
|
-
"
|
354
|
-
|
391
|
+
header_params = {}
|
392
|
+
if request.project_id
|
393
|
+
header_params["project_id"] = request.project_id
|
394
|
+
end
|
395
|
+
if request.id
|
396
|
+
header_params["id"] = request.id
|
397
|
+
end
|
398
|
+
|
355
399
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
356
400
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
357
401
|
|
@@ -420,6 +464,27 @@ module Google
|
|
420
464
|
#
|
421
465
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
422
466
|
#
|
467
|
+
# @example Basic example
|
468
|
+
# require "google/cloud/build/v1"
|
469
|
+
#
|
470
|
+
# # Create a client object. The client can be reused for multiple calls.
|
471
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
472
|
+
#
|
473
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
474
|
+
# request = Google::Cloud::Build::V1::ListBuildsRequest.new
|
475
|
+
#
|
476
|
+
# # Call the list_builds method.
|
477
|
+
# result = client.list_builds request
|
478
|
+
#
|
479
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
480
|
+
# # iterate over all elements by calling #each, and the enumerable
|
481
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
482
|
+
# # methods are also available for managing paging directly.
|
483
|
+
# result.each do |response|
|
484
|
+
# # Each element is of type ::Google::Cloud::Build::V1::Build.
|
485
|
+
# p response
|
486
|
+
# end
|
487
|
+
#
|
423
488
|
def list_builds request, options = nil
|
424
489
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
425
490
|
|
@@ -437,9 +502,11 @@ module Google
|
|
437
502
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
438
503
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
439
504
|
|
440
|
-
header_params = {
|
441
|
-
|
442
|
-
|
505
|
+
header_params = {}
|
506
|
+
if request.project_id
|
507
|
+
header_params["project_id"] = request.project_id
|
508
|
+
end
|
509
|
+
|
443
510
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
444
511
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
445
512
|
|
@@ -494,6 +561,21 @@ module Google
|
|
494
561
|
#
|
495
562
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
496
563
|
#
|
564
|
+
# @example Basic example
|
565
|
+
# require "google/cloud/build/v1"
|
566
|
+
#
|
567
|
+
# # Create a client object. The client can be reused for multiple calls.
|
568
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
569
|
+
#
|
570
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
571
|
+
# request = Google::Cloud::Build::V1::CancelBuildRequest.new
|
572
|
+
#
|
573
|
+
# # Call the cancel_build method.
|
574
|
+
# result = client.cancel_build request
|
575
|
+
#
|
576
|
+
# # The returned object is of type Google::Cloud::Build::V1::Build.
|
577
|
+
# p result
|
578
|
+
#
|
497
579
|
def cancel_build request, options = nil
|
498
580
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
499
581
|
|
@@ -511,10 +593,14 @@ module Google
|
|
511
593
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
512
594
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
513
595
|
|
514
|
-
header_params = {
|
515
|
-
|
516
|
-
"
|
517
|
-
|
596
|
+
header_params = {}
|
597
|
+
if request.project_id
|
598
|
+
header_params["project_id"] = request.project_id
|
599
|
+
end
|
600
|
+
if request.id
|
601
|
+
header_params["id"] = request.id
|
602
|
+
end
|
603
|
+
|
518
604
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
519
605
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
520
606
|
|
@@ -594,6 +680,28 @@ module Google
|
|
594
680
|
#
|
595
681
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
596
682
|
#
|
683
|
+
# @example Basic example
|
684
|
+
# require "google/cloud/build/v1"
|
685
|
+
#
|
686
|
+
# # Create a client object. The client can be reused for multiple calls.
|
687
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
688
|
+
#
|
689
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
690
|
+
# request = Google::Cloud::Build::V1::RetryBuildRequest.new
|
691
|
+
#
|
692
|
+
# # Call the retry_build method.
|
693
|
+
# result = client.retry_build request
|
694
|
+
#
|
695
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
696
|
+
# # object to check the status of an operation, cancel it, or wait
|
697
|
+
# # for results. Here is how to block until completion:
|
698
|
+
# result.wait_until_done! timeout: 60
|
699
|
+
# if result.response?
|
700
|
+
# p result.response
|
701
|
+
# else
|
702
|
+
# puts "Error!"
|
703
|
+
# end
|
704
|
+
#
|
597
705
|
def retry_build request, options = nil
|
598
706
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
599
707
|
|
@@ -611,10 +719,14 @@ module Google
|
|
611
719
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
612
720
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
613
721
|
|
614
|
-
header_params = {
|
615
|
-
|
616
|
-
"
|
617
|
-
|
722
|
+
header_params = {}
|
723
|
+
if request.project_id
|
724
|
+
header_params["project_id"] = request.project_id
|
725
|
+
end
|
726
|
+
if request.id
|
727
|
+
header_params["id"] = request.id
|
728
|
+
end
|
729
|
+
|
618
730
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
619
731
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
620
732
|
|
@@ -672,6 +784,28 @@ module Google
|
|
672
784
|
#
|
673
785
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
674
786
|
#
|
787
|
+
# @example Basic example
|
788
|
+
# require "google/cloud/build/v1"
|
789
|
+
#
|
790
|
+
# # Create a client object. The client can be reused for multiple calls.
|
791
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
792
|
+
#
|
793
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
794
|
+
# request = Google::Cloud::Build::V1::ApproveBuildRequest.new
|
795
|
+
#
|
796
|
+
# # Call the approve_build method.
|
797
|
+
# result = client.approve_build request
|
798
|
+
#
|
799
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
800
|
+
# # object to check the status of an operation, cancel it, or wait
|
801
|
+
# # for results. Here is how to block until completion:
|
802
|
+
# result.wait_until_done! timeout: 60
|
803
|
+
# if result.response?
|
804
|
+
# p result.response
|
805
|
+
# else
|
806
|
+
# puts "Error!"
|
807
|
+
# end
|
808
|
+
#
|
675
809
|
def approve_build request, options = nil
|
676
810
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
677
811
|
|
@@ -689,9 +823,11 @@ module Google
|
|
689
823
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
690
824
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
691
825
|
|
692
|
-
header_params = {
|
693
|
-
|
694
|
-
|
826
|
+
header_params = {}
|
827
|
+
if request.name
|
828
|
+
header_params["name"] = request.name
|
829
|
+
end
|
830
|
+
|
695
831
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
696
832
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
697
833
|
|
@@ -748,6 +884,21 @@ module Google
|
|
748
884
|
#
|
749
885
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
750
886
|
#
|
887
|
+
# @example Basic example
|
888
|
+
# require "google/cloud/build/v1"
|
889
|
+
#
|
890
|
+
# # Create a client object. The client can be reused for multiple calls.
|
891
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
892
|
+
#
|
893
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
894
|
+
# request = Google::Cloud::Build::V1::CreateBuildTriggerRequest.new
|
895
|
+
#
|
896
|
+
# # Call the create_build_trigger method.
|
897
|
+
# result = client.create_build_trigger request
|
898
|
+
#
|
899
|
+
# # The returned object is of type Google::Cloud::Build::V1::BuildTrigger.
|
900
|
+
# p result
|
901
|
+
#
|
751
902
|
def create_build_trigger request, options = nil
|
752
903
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
753
904
|
|
@@ -765,9 +916,11 @@ module Google
|
|
765
916
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
766
917
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
767
918
|
|
768
|
-
header_params = {
|
769
|
-
|
770
|
-
|
919
|
+
header_params = {}
|
920
|
+
if request.project_id
|
921
|
+
header_params["project_id"] = request.project_id
|
922
|
+
end
|
923
|
+
|
771
924
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
772
925
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
773
926
|
|
@@ -823,6 +976,21 @@ module Google
|
|
823
976
|
#
|
824
977
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
825
978
|
#
|
979
|
+
# @example Basic example
|
980
|
+
# require "google/cloud/build/v1"
|
981
|
+
#
|
982
|
+
# # Create a client object. The client can be reused for multiple calls.
|
983
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
984
|
+
#
|
985
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
986
|
+
# request = Google::Cloud::Build::V1::GetBuildTriggerRequest.new
|
987
|
+
#
|
988
|
+
# # Call the get_build_trigger method.
|
989
|
+
# result = client.get_build_trigger request
|
990
|
+
#
|
991
|
+
# # The returned object is of type Google::Cloud::Build::V1::BuildTrigger.
|
992
|
+
# p result
|
993
|
+
#
|
826
994
|
def get_build_trigger request, options = nil
|
827
995
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
828
996
|
|
@@ -840,10 +1008,14 @@ module Google
|
|
840
1008
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
841
1009
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
842
1010
|
|
843
|
-
header_params = {
|
844
|
-
|
845
|
-
"
|
846
|
-
|
1011
|
+
header_params = {}
|
1012
|
+
if request.project_id
|
1013
|
+
header_params["project_id"] = request.project_id
|
1014
|
+
end
|
1015
|
+
if request.trigger_id
|
1016
|
+
header_params["trigger_id"] = request.trigger_id
|
1017
|
+
end
|
1018
|
+
|
847
1019
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
848
1020
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
849
1021
|
|
@@ -901,6 +1073,27 @@ module Google
|
|
901
1073
|
#
|
902
1074
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
903
1075
|
#
|
1076
|
+
# @example Basic example
|
1077
|
+
# require "google/cloud/build/v1"
|
1078
|
+
#
|
1079
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1080
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
1081
|
+
#
|
1082
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1083
|
+
# request = Google::Cloud::Build::V1::ListBuildTriggersRequest.new
|
1084
|
+
#
|
1085
|
+
# # Call the list_build_triggers method.
|
1086
|
+
# result = client.list_build_triggers request
|
1087
|
+
#
|
1088
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1089
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1090
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1091
|
+
# # methods are also available for managing paging directly.
|
1092
|
+
# result.each do |response|
|
1093
|
+
# # Each element is of type ::Google::Cloud::Build::V1::BuildTrigger.
|
1094
|
+
# p response
|
1095
|
+
# end
|
1096
|
+
#
|
904
1097
|
def list_build_triggers request, options = nil
|
905
1098
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
906
1099
|
|
@@ -918,9 +1111,11 @@ module Google
|
|
918
1111
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
919
1112
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
920
1113
|
|
921
|
-
header_params = {
|
922
|
-
|
923
|
-
|
1114
|
+
header_params = {}
|
1115
|
+
if request.project_id
|
1116
|
+
header_params["project_id"] = request.project_id
|
1117
|
+
end
|
1118
|
+
|
924
1119
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
925
1120
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
926
1121
|
|
@@ -977,6 +1172,21 @@ module Google
|
|
977
1172
|
#
|
978
1173
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
979
1174
|
#
|
1175
|
+
# @example Basic example
|
1176
|
+
# require "google/cloud/build/v1"
|
1177
|
+
#
|
1178
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1179
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
1180
|
+
#
|
1181
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1182
|
+
# request = Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new
|
1183
|
+
#
|
1184
|
+
# # Call the delete_build_trigger method.
|
1185
|
+
# result = client.delete_build_trigger request
|
1186
|
+
#
|
1187
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1188
|
+
# p result
|
1189
|
+
#
|
980
1190
|
def delete_build_trigger request, options = nil
|
981
1191
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
982
1192
|
|
@@ -994,10 +1204,14 @@ module Google
|
|
994
1204
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
995
1205
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
996
1206
|
|
997
|
-
header_params = {
|
998
|
-
|
999
|
-
"
|
1000
|
-
|
1207
|
+
header_params = {}
|
1208
|
+
if request.project_id
|
1209
|
+
header_params["project_id"] = request.project_id
|
1210
|
+
end
|
1211
|
+
if request.trigger_id
|
1212
|
+
header_params["trigger_id"] = request.trigger_id
|
1213
|
+
end
|
1214
|
+
|
1001
1215
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1002
1216
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1003
1217
|
|
@@ -1052,6 +1266,21 @@ module Google
|
|
1052
1266
|
#
|
1053
1267
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1054
1268
|
#
|
1269
|
+
# @example Basic example
|
1270
|
+
# require "google/cloud/build/v1"
|
1271
|
+
#
|
1272
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1273
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
1274
|
+
#
|
1275
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1276
|
+
# request = Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new
|
1277
|
+
#
|
1278
|
+
# # Call the update_build_trigger method.
|
1279
|
+
# result = client.update_build_trigger request
|
1280
|
+
#
|
1281
|
+
# # The returned object is of type Google::Cloud::Build::V1::BuildTrigger.
|
1282
|
+
# p result
|
1283
|
+
#
|
1055
1284
|
def update_build_trigger request, options = nil
|
1056
1285
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1057
1286
|
|
@@ -1069,10 +1298,14 @@ module Google
|
|
1069
1298
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1070
1299
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1071
1300
|
|
1072
|
-
header_params = {
|
1073
|
-
|
1074
|
-
"
|
1075
|
-
|
1301
|
+
header_params = {}
|
1302
|
+
if request.project_id
|
1303
|
+
header_params["project_id"] = request.project_id
|
1304
|
+
end
|
1305
|
+
if request.trigger_id
|
1306
|
+
header_params["trigger_id"] = request.trigger_id
|
1307
|
+
end
|
1308
|
+
|
1076
1309
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1077
1310
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1078
1311
|
|
@@ -1128,6 +1361,28 @@ module Google
|
|
1128
1361
|
#
|
1129
1362
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1130
1363
|
#
|
1364
|
+
# @example Basic example
|
1365
|
+
# require "google/cloud/build/v1"
|
1366
|
+
#
|
1367
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1368
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
1369
|
+
#
|
1370
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1371
|
+
# request = Google::Cloud::Build::V1::RunBuildTriggerRequest.new
|
1372
|
+
#
|
1373
|
+
# # Call the run_build_trigger method.
|
1374
|
+
# result = client.run_build_trigger request
|
1375
|
+
#
|
1376
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1377
|
+
# # object to check the status of an operation, cancel it, or wait
|
1378
|
+
# # for results. Here is how to block until completion:
|
1379
|
+
# result.wait_until_done! timeout: 60
|
1380
|
+
# if result.response?
|
1381
|
+
# p result.response
|
1382
|
+
# else
|
1383
|
+
# puts "Error!"
|
1384
|
+
# end
|
1385
|
+
#
|
1131
1386
|
def run_build_trigger request, options = nil
|
1132
1387
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1133
1388
|
|
@@ -1145,10 +1400,14 @@ module Google
|
|
1145
1400
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1146
1401
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1147
1402
|
|
1148
|
-
header_params = {
|
1149
|
-
|
1150
|
-
"
|
1151
|
-
|
1403
|
+
header_params = {}
|
1404
|
+
if request.project_id
|
1405
|
+
header_params["project_id"] = request.project_id
|
1406
|
+
end
|
1407
|
+
if request.trigger_id
|
1408
|
+
header_params["trigger_id"] = request.trigger_id
|
1409
|
+
end
|
1410
|
+
|
1152
1411
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1153
1412
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1154
1413
|
|
@@ -1208,6 +1467,21 @@ module Google
|
|
1208
1467
|
#
|
1209
1468
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1210
1469
|
#
|
1470
|
+
# @example Basic example
|
1471
|
+
# require "google/cloud/build/v1"
|
1472
|
+
#
|
1473
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1474
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
1475
|
+
#
|
1476
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1477
|
+
# request = Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new
|
1478
|
+
#
|
1479
|
+
# # Call the receive_trigger_webhook method.
|
1480
|
+
# result = client.receive_trigger_webhook request
|
1481
|
+
#
|
1482
|
+
# # The returned object is of type Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse.
|
1483
|
+
# p result
|
1484
|
+
#
|
1211
1485
|
def receive_trigger_webhook request, options = nil
|
1212
1486
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1213
1487
|
|
@@ -1225,10 +1499,14 @@ module Google
|
|
1225
1499
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1226
1500
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1227
1501
|
|
1228
|
-
header_params = {
|
1229
|
-
|
1230
|
-
"
|
1231
|
-
|
1502
|
+
header_params = {}
|
1503
|
+
if request.project_id
|
1504
|
+
header_params["project_id"] = request.project_id
|
1505
|
+
end
|
1506
|
+
if request.trigger
|
1507
|
+
header_params["trigger"] = request.trigger
|
1508
|
+
end
|
1509
|
+
|
1232
1510
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1233
1511
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1234
1512
|
|
@@ -1289,6 +1567,28 @@ module Google
|
|
1289
1567
|
#
|
1290
1568
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1291
1569
|
#
|
1570
|
+
# @example Basic example
|
1571
|
+
# require "google/cloud/build/v1"
|
1572
|
+
#
|
1573
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1574
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
1575
|
+
#
|
1576
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1577
|
+
# request = Google::Cloud::Build::V1::CreateWorkerPoolRequest.new
|
1578
|
+
#
|
1579
|
+
# # Call the create_worker_pool method.
|
1580
|
+
# result = client.create_worker_pool request
|
1581
|
+
#
|
1582
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1583
|
+
# # object to check the status of an operation, cancel it, or wait
|
1584
|
+
# # for results. Here is how to block until completion:
|
1585
|
+
# result.wait_until_done! timeout: 60
|
1586
|
+
# if result.response?
|
1587
|
+
# p result.response
|
1588
|
+
# else
|
1589
|
+
# puts "Error!"
|
1590
|
+
# end
|
1591
|
+
#
|
1292
1592
|
def create_worker_pool request, options = nil
|
1293
1593
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1294
1594
|
|
@@ -1306,9 +1606,11 @@ module Google
|
|
1306
1606
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1307
1607
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1308
1608
|
|
1309
|
-
header_params = {
|
1310
|
-
|
1311
|
-
|
1609
|
+
header_params = {}
|
1610
|
+
if request.parent
|
1611
|
+
header_params["parent"] = request.parent
|
1612
|
+
end
|
1613
|
+
|
1312
1614
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1313
1615
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1314
1616
|
|
@@ -1359,6 +1661,21 @@ module Google
|
|
1359
1661
|
#
|
1360
1662
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1361
1663
|
#
|
1664
|
+
# @example Basic example
|
1665
|
+
# require "google/cloud/build/v1"
|
1666
|
+
#
|
1667
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1668
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
1669
|
+
#
|
1670
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1671
|
+
# request = Google::Cloud::Build::V1::GetWorkerPoolRequest.new
|
1672
|
+
#
|
1673
|
+
# # Call the get_worker_pool method.
|
1674
|
+
# result = client.get_worker_pool request
|
1675
|
+
#
|
1676
|
+
# # The returned object is of type Google::Cloud::Build::V1::WorkerPool.
|
1677
|
+
# p result
|
1678
|
+
#
|
1362
1679
|
def get_worker_pool request, options = nil
|
1363
1680
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1364
1681
|
|
@@ -1376,9 +1693,11 @@ module Google
|
|
1376
1693
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1377
1694
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1378
1695
|
|
1379
|
-
header_params = {
|
1380
|
-
|
1381
|
-
|
1696
|
+
header_params = {}
|
1697
|
+
if request.name
|
1698
|
+
header_params["name"] = request.name
|
1699
|
+
end
|
1700
|
+
|
1382
1701
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1383
1702
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1384
1703
|
|
@@ -1438,6 +1757,28 @@ module Google
|
|
1438
1757
|
#
|
1439
1758
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1440
1759
|
#
|
1760
|
+
# @example Basic example
|
1761
|
+
# require "google/cloud/build/v1"
|
1762
|
+
#
|
1763
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1764
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
1765
|
+
#
|
1766
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1767
|
+
# request = Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new
|
1768
|
+
#
|
1769
|
+
# # Call the delete_worker_pool method.
|
1770
|
+
# result = client.delete_worker_pool request
|
1771
|
+
#
|
1772
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1773
|
+
# # object to check the status of an operation, cancel it, or wait
|
1774
|
+
# # for results. Here is how to block until completion:
|
1775
|
+
# result.wait_until_done! timeout: 60
|
1776
|
+
# if result.response?
|
1777
|
+
# p result.response
|
1778
|
+
# else
|
1779
|
+
# puts "Error!"
|
1780
|
+
# end
|
1781
|
+
#
|
1441
1782
|
def delete_worker_pool request, options = nil
|
1442
1783
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1443
1784
|
|
@@ -1455,9 +1796,11 @@ module Google
|
|
1455
1796
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1456
1797
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1457
1798
|
|
1458
|
-
header_params = {
|
1459
|
-
|
1460
|
-
|
1799
|
+
header_params = {}
|
1800
|
+
if request.name
|
1801
|
+
header_params["name"] = request.name
|
1802
|
+
end
|
1803
|
+
|
1461
1804
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1462
1805
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1463
1806
|
|
@@ -1515,6 +1858,28 @@ module Google
|
|
1515
1858
|
#
|
1516
1859
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1517
1860
|
#
|
1861
|
+
# @example Basic example
|
1862
|
+
# require "google/cloud/build/v1"
|
1863
|
+
#
|
1864
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1865
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
1866
|
+
#
|
1867
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1868
|
+
# request = Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new
|
1869
|
+
#
|
1870
|
+
# # Call the update_worker_pool method.
|
1871
|
+
# result = client.update_worker_pool request
|
1872
|
+
#
|
1873
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1874
|
+
# # object to check the status of an operation, cancel it, or wait
|
1875
|
+
# # for results. Here is how to block until completion:
|
1876
|
+
# result.wait_until_done! timeout: 60
|
1877
|
+
# if result.response?
|
1878
|
+
# p result.response
|
1879
|
+
# else
|
1880
|
+
# puts "Error!"
|
1881
|
+
# end
|
1882
|
+
#
|
1518
1883
|
def update_worker_pool request, options = nil
|
1519
1884
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1520
1885
|
|
@@ -1532,9 +1897,11 @@ module Google
|
|
1532
1897
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1533
1898
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1534
1899
|
|
1535
|
-
header_params = {
|
1536
|
-
|
1537
|
-
|
1900
|
+
header_params = {}
|
1901
|
+
if request.worker_pool&.name
|
1902
|
+
header_params["worker_pool.name"] = request.worker_pool.name
|
1903
|
+
end
|
1904
|
+
|
1538
1905
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1539
1906
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1540
1907
|
|
@@ -1591,6 +1958,27 @@ module Google
|
|
1591
1958
|
#
|
1592
1959
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1593
1960
|
#
|
1961
|
+
# @example Basic example
|
1962
|
+
# require "google/cloud/build/v1"
|
1963
|
+
#
|
1964
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1965
|
+
# client = Google::Cloud::Build::V1::CloudBuild::Client.new
|
1966
|
+
#
|
1967
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1968
|
+
# request = Google::Cloud::Build::V1::ListWorkerPoolsRequest.new
|
1969
|
+
#
|
1970
|
+
# # Call the list_worker_pools method.
|
1971
|
+
# result = client.list_worker_pools request
|
1972
|
+
#
|
1973
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1974
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1975
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1976
|
+
# # methods are also available for managing paging directly.
|
1977
|
+
# result.each do |response|
|
1978
|
+
# # Each element is of type ::Google::Cloud::Build::V1::WorkerPool.
|
1979
|
+
# p response
|
1980
|
+
# end
|
1981
|
+
#
|
1594
1982
|
def list_worker_pools request, options = nil
|
1595
1983
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1596
1984
|
|
@@ -1608,9 +1996,11 @@ module Google
|
|
1608
1996
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1609
1997
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1610
1998
|
|
1611
|
-
header_params = {
|
1612
|
-
|
1613
|
-
|
1999
|
+
header_params = {}
|
2000
|
+
if request.parent
|
2001
|
+
header_params["parent"] = request.parent
|
2002
|
+
end
|
2003
|
+
|
1614
2004
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1615
2005
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1616
2006
|
|
@@ -143,6 +143,27 @@ module Google
|
|
143
143
|
#
|
144
144
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
145
145
|
#
|
146
|
+
# @example Basic example
|
147
|
+
# require "google/longrunning"
|
148
|
+
#
|
149
|
+
# # Create a client object. The client can be reused for multiple calls.
|
150
|
+
# client = Google::Longrunning::Operations::Client.new
|
151
|
+
#
|
152
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
153
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
154
|
+
#
|
155
|
+
# # Call the list_operations method.
|
156
|
+
# result = client.list_operations request
|
157
|
+
#
|
158
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
159
|
+
# # iterate over all elements by calling #each, and the enumerable
|
160
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
161
|
+
# # methods are also available for managing paging directly.
|
162
|
+
# result.each do |response|
|
163
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
164
|
+
# p response
|
165
|
+
# end
|
166
|
+
#
|
146
167
|
def list_operations request, options = nil
|
147
168
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
148
169
|
|
@@ -160,9 +181,11 @@ module Google
|
|
160
181
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
161
182
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
162
183
|
|
163
|
-
header_params = {
|
164
|
-
|
165
|
-
|
184
|
+
header_params = {}
|
185
|
+
if request.name
|
186
|
+
header_params["name"] = request.name
|
187
|
+
end
|
188
|
+
|
166
189
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
167
190
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
168
191
|
|
@@ -215,6 +238,28 @@ module Google
|
|
215
238
|
#
|
216
239
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
217
240
|
#
|
241
|
+
# @example Basic example
|
242
|
+
# require "google/longrunning"
|
243
|
+
#
|
244
|
+
# # Create a client object. The client can be reused for multiple calls.
|
245
|
+
# client = Google::Longrunning::Operations::Client.new
|
246
|
+
#
|
247
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
248
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
249
|
+
#
|
250
|
+
# # Call the get_operation method.
|
251
|
+
# result = client.get_operation request
|
252
|
+
#
|
253
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
254
|
+
# # object to check the status of an operation, cancel it, or wait
|
255
|
+
# # for results. Here is how to block until completion:
|
256
|
+
# result.wait_until_done! timeout: 60
|
257
|
+
# if result.response?
|
258
|
+
# p result.response
|
259
|
+
# else
|
260
|
+
# puts "Error!"
|
261
|
+
# end
|
262
|
+
#
|
218
263
|
def get_operation request, options = nil
|
219
264
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
220
265
|
|
@@ -232,9 +277,11 @@ module Google
|
|
232
277
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
233
278
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
234
279
|
|
235
|
-
header_params = {
|
236
|
-
|
237
|
-
|
280
|
+
header_params = {}
|
281
|
+
if request.name
|
282
|
+
header_params["name"] = request.name
|
283
|
+
end
|
284
|
+
|
238
285
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
239
286
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
240
287
|
|
@@ -287,6 +334,21 @@ module Google
|
|
287
334
|
#
|
288
335
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
289
336
|
#
|
337
|
+
# @example Basic example
|
338
|
+
# require "google/longrunning"
|
339
|
+
#
|
340
|
+
# # Create a client object. The client can be reused for multiple calls.
|
341
|
+
# client = Google::Longrunning::Operations::Client.new
|
342
|
+
#
|
343
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
344
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
345
|
+
#
|
346
|
+
# # Call the delete_operation method.
|
347
|
+
# result = client.delete_operation request
|
348
|
+
#
|
349
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
350
|
+
# p result
|
351
|
+
#
|
290
352
|
def delete_operation request, options = nil
|
291
353
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
292
354
|
|
@@ -304,9 +366,11 @@ module Google
|
|
304
366
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
305
367
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
306
368
|
|
307
|
-
header_params = {
|
308
|
-
|
309
|
-
|
369
|
+
header_params = {}
|
370
|
+
if request.name
|
371
|
+
header_params["name"] = request.name
|
372
|
+
end
|
373
|
+
|
310
374
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
311
375
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
312
376
|
|
@@ -364,6 +428,21 @@ module Google
|
|
364
428
|
#
|
365
429
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
366
430
|
#
|
431
|
+
# @example Basic example
|
432
|
+
# require "google/longrunning"
|
433
|
+
#
|
434
|
+
# # Create a client object. The client can be reused for multiple calls.
|
435
|
+
# client = Google::Longrunning::Operations::Client.new
|
436
|
+
#
|
437
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
438
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
439
|
+
#
|
440
|
+
# # Call the cancel_operation method.
|
441
|
+
# result = client.cancel_operation request
|
442
|
+
#
|
443
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
444
|
+
# p result
|
445
|
+
#
|
367
446
|
def cancel_operation request, options = nil
|
368
447
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
369
448
|
|
@@ -381,9 +460,11 @@ module Google
|
|
381
460
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
382
461
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
383
462
|
|
384
|
-
header_params = {
|
385
|
-
|
386
|
-
|
463
|
+
header_params = {}
|
464
|
+
if request.name
|
465
|
+
header_params["name"] = request.name
|
466
|
+
end
|
467
|
+
|
387
468
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
388
469
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
389
470
|
|
@@ -444,6 +525,28 @@ module Google
|
|
444
525
|
#
|
445
526
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
446
527
|
#
|
528
|
+
# @example Basic example
|
529
|
+
# require "google/longrunning"
|
530
|
+
#
|
531
|
+
# # Create a client object. The client can be reused for multiple calls.
|
532
|
+
# client = Google::Longrunning::Operations::Client.new
|
533
|
+
#
|
534
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
535
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
536
|
+
#
|
537
|
+
# # Call the wait_operation method.
|
538
|
+
# result = client.wait_operation request
|
539
|
+
#
|
540
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
541
|
+
# # object to check the status of an operation, cancel it, or wait
|
542
|
+
# # for results. Here is how to block until completion:
|
543
|
+
# result.wait_until_done! timeout: 60
|
544
|
+
# if result.response?
|
545
|
+
# p result.response
|
546
|
+
# else
|
547
|
+
# puts "Error!"
|
548
|
+
# end
|
549
|
+
#
|
447
550
|
def wait_operation request, options = nil
|
448
551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
449
552
|
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/devtools/cloudbuild/v1/cloudbuild.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -13,6 +11,8 @@ require 'google/protobuf/duration_pb'
|
|
13
11
|
require 'google/protobuf/empty_pb'
|
14
12
|
require 'google/protobuf/field_mask_pb'
|
15
13
|
require 'google/protobuf/timestamp_pb'
|
14
|
+
require 'google/protobuf'
|
15
|
+
|
16
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
17
|
add_file("google/devtools/cloudbuild/v1/cloudbuild.proto", :syntax => :proto3) do
|
18
18
|
add_message "google.devtools.cloudbuild.v1.RetryBuildRequest" do
|
@@ -74,6 +74,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
74
74
|
optional :pull_timing, :message, 13, "google.devtools.cloudbuild.v1.TimeSpan"
|
75
75
|
optional :timeout, :message, 11, "google.protobuf.Duration"
|
76
76
|
optional :status, :enum, 12, "google.devtools.cloudbuild.v1.Build.Status"
|
77
|
+
optional :script, :string, 19
|
77
78
|
end
|
78
79
|
add_message "google.devtools.cloudbuild.v1.Volume" do
|
79
80
|
optional :name, :string, 1
|
@@ -280,6 +281,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
280
281
|
repeated :ignored_files, :string, 15
|
281
282
|
repeated :included_files, :string, 16
|
282
283
|
optional :filter, :string, 30
|
284
|
+
optional :service_account, :string, 33
|
283
285
|
oneof :build_template do
|
284
286
|
optional :autodetect, :bool, 18
|
285
287
|
optional :build, :message, 4, "google.devtools.cloudbuild.v1.Build"
|
@@ -39,12 +39,15 @@ module Google
|
|
39
39
|
#
|
40
40
|
# // The raw HTTP body is bound to this field.
|
41
41
|
# google.api.HttpBody http_body = 2;
|
42
|
+
#
|
42
43
|
# }
|
43
44
|
#
|
44
45
|
# service ResourceService {
|
45
|
-
# rpc GetResource(GetResourceRequest)
|
46
|
-
#
|
47
|
-
# (google.
|
46
|
+
# rpc GetResource(GetResourceRequest)
|
47
|
+
# returns (google.api.HttpBody);
|
48
|
+
# rpc UpdateResource(google.api.HttpBody)
|
49
|
+
# returns (google.protobuf.Empty);
|
50
|
+
#
|
48
51
|
# }
|
49
52
|
#
|
50
53
|
# Example with streaming methods:
|
@@ -54,6 +57,7 @@ module Google
|
|
54
57
|
# returns (stream google.api.HttpBody);
|
55
58
|
# rpc UpdateCalendar(stream google.api.HttpBody)
|
56
59
|
# returns (stream google.api.HttpBody);
|
60
|
+
#
|
57
61
|
# }
|
58
62
|
#
|
59
63
|
# Use of this type only changes how the request and response bodies are
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
@@ -277,6 +277,11 @@ module Google
|
|
277
277
|
# Output only. Status of the build step. At this time, build step status is
|
278
278
|
# only updated on build completion; step status is not updated in real-time
|
279
279
|
# as the build progresses.
|
280
|
+
# @!attribute [rw] script
|
281
|
+
# @return [::String]
|
282
|
+
# A shell script to be executed in the step.
|
283
|
+
#
|
284
|
+
# When script is provided, the user cannot specify the entrypoint or args.
|
280
285
|
class BuildStep
|
281
286
|
include ::Google::Protobuf::MessageExts
|
282
287
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -1139,6 +1144,13 @@ module Google
|
|
1139
1144
|
# @!attribute [rw] filter
|
1140
1145
|
# @return [::String]
|
1141
1146
|
# Optional. A Common Expression Language string.
|
1147
|
+
# @!attribute [rw] service_account
|
1148
|
+
# @return [::String]
|
1149
|
+
# The service account used for all user-controlled operations including
|
1150
|
+
# UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
|
1151
|
+
# If no service account is set, then the standard Cloud Build service account
|
1152
|
+
# ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
|
1153
|
+
# Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
|
1142
1154
|
class BuildTrigger
|
1143
1155
|
include ::Google::Protobuf::MessageExts
|
1144
1156
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
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
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
215
|
-
rubygems_version: 3.
|
215
|
+
rubygems_version: 3.3.4
|
216
216
|
signing_key:
|
217
217
|
specification_version: 4
|
218
218
|
summary: API Client library for the Cloud Build V1 API
|