google-cloud-build-v1 0.2.0 → 0.6.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.
@@ -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]
@@ -787,13 +863,17 @@ module Google
787
863
  # a build whenever a GitHub event is received.
788
864
  #
789
865
  # Mutually exclusive with `trigger_template`.
866
+ # @!attribute [rw] pubsub_config
867
+ # @return [::Google::Cloud::Build::V1::PubsubConfig]
868
+ # Optional. PubsubConfig describes the configuration of a trigger that
869
+ # creates a build whenever a Pub/Sub message is published.
790
870
  # @!attribute [rw] build
791
871
  # @return [::Google::Cloud::Build::V1::Build]
792
872
  # Contents of the build template.
793
873
  # @!attribute [rw] filename
794
874
  # @return [::String]
795
- # Path, from the source root, to a file whose contents is used for the
796
- # template.
875
+ # Path, from the source root, to the build configuration file
876
+ # (i.e. cloudbuild.yaml).
797
877
  # @!attribute [r] create_time
798
878
  # @return [::Google::Protobuf::Timestamp]
799
879
  # Output only. Time when the trigger was created.
@@ -825,6 +905,9 @@ module Google
825
905
  # filter and included_files is not empty, then we make sure that at
826
906
  # least one of those files matches a included_files glob. If not,
827
907
  # then we do not trigger a build.
908
+ # @!attribute [rw] filter
909
+ # @return [::String]
910
+ # Optional. A Common Expression Language string.
828
911
  class BuildTrigger
829
912
  include ::Google::Protobuf::MessageExts
830
913
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -866,6 +949,47 @@ module Google
866
949
  extend ::Google::Protobuf::MessageExts::ClassMethods
867
950
  end
868
951
 
952
+ # PubsubConfig describes the configuration of a trigger that
953
+ # creates a build whenever a Pub/Sub message is published.
954
+ # @!attribute [r] subscription
955
+ # @return [::String]
956
+ # Output only. Name of the subscription. Format is
957
+ # `projects/{project}/subscriptions/{subscription}`.
958
+ # @!attribute [rw] topic
959
+ # @return [::String]
960
+ # The name of the topic from which this subscription is receiving messages.
961
+ # Format is `projects/{project}/topics/{topic}`.
962
+ # @!attribute [rw] service_account_email
963
+ # @return [::String]
964
+ # Service account that will make the push request.
965
+ # @!attribute [rw] state
966
+ # @return [::Google::Cloud::Build::V1::PubsubConfig::State]
967
+ # Potential issues with the underlying Pub/Sub subscription configuration.
968
+ # Only populated on get requests.
969
+ class PubsubConfig
970
+ include ::Google::Protobuf::MessageExts
971
+ extend ::Google::Protobuf::MessageExts::ClassMethods
972
+
973
+ # Enumerates potential issues with the underlying Pub/Sub subscription
974
+ # configuration.
975
+ module State
976
+ # The subscription configuration has not been checked.
977
+ STATE_UNSPECIFIED = 0
978
+
979
+ # The Pub/Sub subscription is properly configured.
980
+ OK = 1
981
+
982
+ # The subscription has been deleted.
983
+ SUBSCRIPTION_DELETED = 2
984
+
985
+ # The topic has been deleted.
986
+ TOPIC_DELETED = 3
987
+
988
+ # Some of the subscription's field are misconfigured.
989
+ SUBSCRIPTION_MISCONFIGURED = 4
990
+ end
991
+ end
992
+
869
993
  # PullRequestFilter contains filter properties for matching GitHub Pull
870
994
  # Requests.
871
995
  # @!attribute [rw] branch
@@ -893,6 +1017,10 @@ module Google
893
1017
  # Enforce that repository owners or collaborators must comment on Pull
894
1018
  # Requests before builds are triggered.
895
1019
  COMMENTS_ENABLED = 1
1020
+
1021
+ # Enforce that repository owners or collaborators must comment on external
1022
+ # contributors' Pull Requests before builds are triggered.
1023
+ COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2
896
1024
  end
897
1025
  end
898
1026
 
@@ -1092,6 +1220,12 @@ module Google
1092
1220
 
1093
1221
  # Highcpu machine with 32 CPUs.
1094
1222
  N1_HIGHCPU_32 = 2
1223
+
1224
+ # Highcpu e2 machine with 8 CPUs.
1225
+ E2_HIGHCPU_8 = 5
1226
+
1227
+ # Highcpu e2 machine with 32 CPUs.
1228
+ E2_HIGHCPU_32 = 6
1095
1229
  end
1096
1230
 
1097
1231
  # Specifies the behavior when there is an error in the substitution checks.
@@ -1138,11 +1272,36 @@ module Google
1138
1272
  CLOUD_LOGGING_ONLY = 5
1139
1273
 
1140
1274
  # Turn off all logging. No build logs will be captured.
1141
- # Next ID: 6
1142
1275
  NONE = 4
1143
1276
  end
1144
1277
  end
1145
1278
 
1279
+ # ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by
1280
+ # the ReceiveTriggerWebhook method.
1281
+ # @!attribute [rw] body
1282
+ # @return [::Google::Api::HttpBody]
1283
+ # HTTP request body.
1284
+ # @!attribute [rw] project_id
1285
+ # @return [::String]
1286
+ # Project in which the specified trigger lives
1287
+ # @!attribute [rw] trigger
1288
+ # @return [::String]
1289
+ # Name of the trigger to run the payload against
1290
+ # @!attribute [rw] secret
1291
+ # @return [::String]
1292
+ # Secret token used for authorization if an OAuth token isn't provided.
1293
+ class ReceiveTriggerWebhookRequest
1294
+ include ::Google::Protobuf::MessageExts
1295
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1296
+ end
1297
+
1298
+ # ReceiveTriggerWebhookResponse [Experimental] is the response object for the
1299
+ # ReceiveTriggerWebhook method.
1300
+ class ReceiveTriggerWebhookResponse
1301
+ include ::Google::Protobuf::MessageExts
1302
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1303
+ end
1304
+
1146
1305
  # Configuration for a WorkerPool to run the builds.
1147
1306
  #
1148
1307
  # Workers are machines that Cloud Build uses to run your builds. By default,
@@ -25,7 +25,7 @@ module Google
25
25
  # @return [::String]
26
26
  # The server-assigned name, which is only unique within the same service that
27
27
  # originally returns it. If you use the default HTTP mapping, the
28
- # `name` should have the format of `operations/some/unique/name`.
28
+ # `name` should be a resource name ending with `operations/{unique_id}`.
29
29
  # @!attribute [rw] metadata
30
30
  # @return [::Google::Protobuf::Any]
31
31
  # Service-specific metadata associated with the operation. It typically
@@ -35,7 +35,7 @@ module Google
35
35
  # @!attribute [rw] done
36
36
  # @return [::Boolean]
37
37
  # If the value is `false`, it means the operation is still in progress.
38
- # If true, the operation is completed, and either `error` or `response` is
38
+ # If `true`, the operation is completed, and either `error` or `response` is
39
39
  # available.
40
40
  # @!attribute [rw] error
41
41
  # @return [::Google::Rpc::Status]
@@ -67,7 +67,7 @@ module Google
67
67
  # The request message for Operations.ListOperations.
68
68
  # @!attribute [rw] name
69
69
  # @return [::String]
70
- # The name of the operation collection.
70
+ # The name of the operation's parent resource.
71
71
  # @!attribute [rw] filter
72
72
  # @return [::String]
73
73
  # The standard list filter.
@@ -112,6 +112,20 @@ module Google
112
112
  extend ::Google::Protobuf::MessageExts::ClassMethods
113
113
  end
114
114
 
115
+ # The request message for Operations.WaitOperation.
116
+ # @!attribute [rw] name
117
+ # @return [::String]
118
+ # The name of the operation resource to wait on.
119
+ # @!attribute [rw] timeout
120
+ # @return [::Google::Protobuf::Duration]
121
+ # The maximum duration to wait before timing out. If left blank, the wait
122
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
123
+ # If RPC context deadline is also specified, the shorter one will be used.
124
+ class WaitOperationRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
115
129
  # A message representing the message types used by a long-running operation.
116
130
  #
117
131
  # Example:
@@ -57,10 +57,13 @@ module Google
57
57
  # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
- # any, err := ptypes.MarshalAny(foo)
60
+ # any, err := anypb.New(foo)
61
+ # if err != nil {
62
+ # ...
63
+ # }
61
64
  # ...
62
65
  # foo := &pb.Foo{}
63
- # if err := ptypes.UnmarshalAny(any, foo); err != nil {
66
+ # if err := any.UnmarshalTo(foo); err != nil {
64
67
  # ...
65
68
  # }
66
69
  #
@@ -70,7 +70,16 @@ module Google
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
72
  #
73
- # Example 5: Compute Timestamp from current time in Python.
73
+ # Example 5: Compute Timestamp from Java `Instant.now()`.
74
+ #
75
+ # Instant now = Instant.now();
76
+ #
77
+ # Timestamp timestamp =
78
+ # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
+ # .setNanos(now.getNano()).build();
80
+ #
81
+ #
82
+ # Example 6: Compute Timestamp from current time in Python.
74
83
  #
75
84
  # timestamp = Timestamp()
76
85
  # timestamp.GetCurrentTime()
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.2.0
4
+ version: 0.6.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-09-16 00:00:00.000000000 Z
11
+ date: 2021-04-26 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
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.24.0
47
+ version: 1.25.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.24.0
54
+ version: 1.25.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -153,7 +153,9 @@ dependencies:
153
153
  description: Cloud Build is a service that executes your builds on Google Cloud Platform
154
154
  infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud
155
155
  Source Repositories, GitHub, or Bitbucket, execute a build to your specifications,
156
- and produce artifacts such as Docker containers or Java archives.
156
+ and produce artifacts such as Docker containers or Java archives. Note that google-cloud-build-v1
157
+ is a version-specific client library. For most uses, we recommend installing the
158
+ main client library google-cloud-build instead. See the readme for more details.
157
159
  email: googleapis-packages@google.com
158
160
  executables: []
159
161
  extensions: []
@@ -175,6 +177,7 @@ files:
175
177
  - lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb
176
178
  - proto_docs/README.md
177
179
  - proto_docs/google/api/field_behavior.rb
180
+ - proto_docs/google/api/httpbody.rb
178
181
  - proto_docs/google/api/resource.rb
179
182
  - proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb
180
183
  - proto_docs/google/longrunning/operations.rb
@@ -196,14 +199,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
199
  requirements:
197
200
  - - ">="
198
201
  - !ruby/object:Gem::Version
199
- version: '2.4'
202
+ version: '2.5'
200
203
  required_rubygems_version: !ruby/object:Gem::Requirement
201
204
  requirements:
202
205
  - - ">="
203
206
  - !ruby/object:Gem::Version
204
207
  version: '0'
205
208
  requirements: []
206
- rubygems_version: 3.1.4
209
+ rubygems_version: 3.2.13
207
210
  signing_key:
208
211
  specification_version: 4
209
212
  summary: API Client library for the Cloud Build V1 API