google-cloud-build-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-build-v1.rb +21 -0
- data/lib/google/cloud/build/v1.rb +35 -0
- data/lib/google/cloud/build/v1/cloud_build.rb +56 -0
- data/lib/google/cloud/build/v1/cloud_build/client.rb +1610 -0
- data/lib/google/cloud/build/v1/cloud_build/credentials.rb +51 -0
- data/lib/google/cloud/build/v1/cloud_build/operations.rb +570 -0
- data/lib/google/cloud/build/v1/version.rb +28 -0
- data/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb +405 -0
- data/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb +138 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb +1299 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +208 -0
@@ -0,0 +1,59 @@
|
|
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 Api
|
22
|
+
# An indicator of the behavior of a given field (for example, that a field
|
23
|
+
# is required in requests, or given as output but ignored as input).
|
24
|
+
# This **does not** change the behavior in protocol buffers itself; it only
|
25
|
+
# denotes the behavior and may affect how API tooling handles the field.
|
26
|
+
#
|
27
|
+
# Note: This enum **may** receive new values in the future.
|
28
|
+
module FieldBehavior
|
29
|
+
# Conventional default for enums. Do not use this.
|
30
|
+
FIELD_BEHAVIOR_UNSPECIFIED = 0
|
31
|
+
|
32
|
+
# Specifically denotes a field as optional.
|
33
|
+
# While all fields in protocol buffers are optional, this may be specified
|
34
|
+
# for emphasis if appropriate.
|
35
|
+
OPTIONAL = 1
|
36
|
+
|
37
|
+
# Denotes a field as required.
|
38
|
+
# This indicates that the field **must** be provided as part of the request,
|
39
|
+
# and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
|
40
|
+
REQUIRED = 2
|
41
|
+
|
42
|
+
# Denotes a field as output only.
|
43
|
+
# This indicates that the field is provided in responses, but including the
|
44
|
+
# field in a request does nothing (the server *must* ignore it and
|
45
|
+
# *must not* throw an error as a result of the field's presence).
|
46
|
+
OUTPUT_ONLY = 3
|
47
|
+
|
48
|
+
# Denotes a field as input only.
|
49
|
+
# This indicates that the field is provided in requests, and the
|
50
|
+
# corresponding field is not included in output.
|
51
|
+
INPUT_ONLY = 4
|
52
|
+
|
53
|
+
# Denotes a field as immutable.
|
54
|
+
# This indicates that the field may be set once in a request to create a
|
55
|
+
# resource, but may not be changed thereafter.
|
56
|
+
IMMUTABLE = 5
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,247 @@
|
|
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 Api
|
22
|
+
# A simple descriptor of a resource type.
|
23
|
+
#
|
24
|
+
# ResourceDescriptor annotates a resource message (either by means of a
|
25
|
+
# protobuf annotation or use in the service config), and associates the
|
26
|
+
# resource's schema, the resource type, and the pattern of the resource name.
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# message Topic {
|
31
|
+
# // Indicates this message defines a resource schema.
|
32
|
+
# // Declares the resource type in the format of {service}/{kind}.
|
33
|
+
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
|
+
# option (google.api.resource) = {
|
35
|
+
# type: "pubsub.googleapis.com/Topic"
|
36
|
+
# name_descriptor: {
|
37
|
+
# pattern: "projects/{project}/topics/{topic}"
|
38
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
+
# parent_name_extractor: "projects/{project}"
|
40
|
+
# }
|
41
|
+
# };
|
42
|
+
# }
|
43
|
+
#
|
44
|
+
# The ResourceDescriptor Yaml config will look like:
|
45
|
+
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/\\{project}/topics/\\{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/\\{project}"
|
52
|
+
#
|
53
|
+
# Sometimes, resources have multiple patterns, typically because they can
|
54
|
+
# live under multiple parents.
|
55
|
+
#
|
56
|
+
# Example:
|
57
|
+
#
|
58
|
+
# message LogEntry {
|
59
|
+
# option (google.api.resource) = {
|
60
|
+
# type: "logging.googleapis.com/LogEntry"
|
61
|
+
# name_descriptor: {
|
62
|
+
# pattern: "projects/{project}/logs/{log}"
|
63
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
64
|
+
# parent_name_extractor: "projects/{project}"
|
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
|
+
# }
|
81
|
+
# };
|
82
|
+
# }
|
83
|
+
#
|
84
|
+
# The ResourceDescriptor Yaml config will look like:
|
85
|
+
#
|
86
|
+
# resources:
|
87
|
+
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
+
# name_descriptor:
|
89
|
+
# - pattern: "projects/{project}/logs/{log}"
|
90
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
91
|
+
# parent_name_extractor: "projects/{project}"
|
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"
|
130
|
+
# @!attribute [rw] type
|
131
|
+
# @return [::String]
|
132
|
+
# The resource type. It must be in the format of
|
133
|
+
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
134
|
+
# singular and must not include version numbers.
|
135
|
+
#
|
136
|
+
# Example: `storage.googleapis.com/Bucket`
|
137
|
+
#
|
138
|
+
# The value of the resource_type_kind must follow the regular expression
|
139
|
+
# /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
140
|
+
# should use PascalCase (UpperCamelCase). The maximum number of
|
141
|
+
# characters allowed for the `resource_type_kind` is 100.
|
142
|
+
# @!attribute [rw] pattern
|
143
|
+
# @return [::Array<::String>]
|
144
|
+
# Optional. The relative resource name pattern associated with this resource
|
145
|
+
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
146
|
+
#
|
147
|
+
# The path pattern must follow the syntax, which aligns with HTTP binding
|
148
|
+
# syntax:
|
149
|
+
#
|
150
|
+
# Template = Segment { "/" Segment } ;
|
151
|
+
# Segment = LITERAL | Variable ;
|
152
|
+
# Variable = "{" LITERAL "}" ;
|
153
|
+
#
|
154
|
+
# Examples:
|
155
|
+
#
|
156
|
+
# - "projects/\\{project}/topics/\\{topic}"
|
157
|
+
# - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
|
158
|
+
#
|
159
|
+
# The components in braces correspond to the IDs for each resource in the
|
160
|
+
# hierarchy. It is expected that, if multiple patterns are provided,
|
161
|
+
# the same component name (e.g. "project") refers to IDs of the same
|
162
|
+
# type of resource.
|
163
|
+
# @!attribute [rw] name_field
|
164
|
+
# @return [::String]
|
165
|
+
# Optional. The field on the resource that designates the resource name
|
166
|
+
# field. If omitted, this is assumed to be "name".
|
167
|
+
# @!attribute [rw] history
|
168
|
+
# @return [::Google::Api::ResourceDescriptor::History]
|
169
|
+
# Optional. The historical or future-looking state of the resource pattern.
|
170
|
+
#
|
171
|
+
# Example:
|
172
|
+
#
|
173
|
+
# // The InspectTemplate message originally only supported resource
|
174
|
+
# // names with organization, and project was added later.
|
175
|
+
# message InspectTemplate {
|
176
|
+
# option (google.api.resource) = {
|
177
|
+
# type: "dlp.googleapis.com/InspectTemplate"
|
178
|
+
# pattern:
|
179
|
+
# "organizations/{organization}/inspectTemplates/{inspect_template}"
|
180
|
+
# pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
181
|
+
# history: ORIGINALLY_SINGLE_PATTERN
|
182
|
+
# };
|
183
|
+
# }
|
184
|
+
# @!attribute [rw] plural
|
185
|
+
# @return [::String]
|
186
|
+
# The plural name used in the resource name, such as 'projects' for
|
187
|
+
# the name of 'projects/\\{project}'. It is the same concept of the `plural`
|
188
|
+
# field in k8s CRD spec
|
189
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
190
|
+
# @!attribute [rw] singular
|
191
|
+
# @return [::String]
|
192
|
+
# The same concept of the `singular` field in k8s CRD spec
|
193
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
194
|
+
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
195
|
+
class ResourceDescriptor
|
196
|
+
include ::Google::Protobuf::MessageExts
|
197
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
198
|
+
|
199
|
+
# A description of the historical or future-looking state of the
|
200
|
+
# resource pattern.
|
201
|
+
module History
|
202
|
+
# The "unset" value.
|
203
|
+
HISTORY_UNSPECIFIED = 0
|
204
|
+
|
205
|
+
# The resource originally had one pattern and launched as such, and
|
206
|
+
# additional patterns were added later.
|
207
|
+
ORIGINALLY_SINGLE_PATTERN = 1
|
208
|
+
|
209
|
+
# The resource has one pattern, but the API owner expects to add more
|
210
|
+
# later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
211
|
+
# that from being necessary once there are multiple patterns.)
|
212
|
+
FUTURE_MULTI_PATTERN = 2
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# Defines a proto annotation that describes a string field that refers to
|
217
|
+
# an API resource.
|
218
|
+
# @!attribute [rw] type
|
219
|
+
# @return [::String]
|
220
|
+
# The resource type that the annotated field references.
|
221
|
+
#
|
222
|
+
# Example:
|
223
|
+
#
|
224
|
+
# message Subscription {
|
225
|
+
# string topic = 2 [(google.api.resource_reference) = {
|
226
|
+
# type: "pubsub.googleapis.com/Topic"
|
227
|
+
# }];
|
228
|
+
# }
|
229
|
+
# @!attribute [rw] child_type
|
230
|
+
# @return [::String]
|
231
|
+
# The resource type of a child collection that the annotated field
|
232
|
+
# references. This is useful for annotating the `parent` field that
|
233
|
+
# doesn't have a fixed resource type.
|
234
|
+
#
|
235
|
+
# Example:
|
236
|
+
#
|
237
|
+
# message ListLogEntriesRequest {
|
238
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
239
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
240
|
+
# };
|
241
|
+
# }
|
242
|
+
class ResourceReference
|
243
|
+
include ::Google::Protobuf::MessageExts
|
244
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
@@ -0,0 +1,1299 @@
|
|
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
|
+
# Specifies a build to retry.
|
25
|
+
# @!attribute [rw] project_id
|
26
|
+
# @return [::String]
|
27
|
+
# Required. ID of the project.
|
28
|
+
# @!attribute [rw] id
|
29
|
+
# @return [::String]
|
30
|
+
# Required. Build ID of the original build.
|
31
|
+
class RetryBuildRequest
|
32
|
+
include ::Google::Protobuf::MessageExts
|
33
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
34
|
+
end
|
35
|
+
|
36
|
+
# Specifies a build trigger to run and the source to use.
|
37
|
+
# @!attribute [rw] project_id
|
38
|
+
# @return [::String]
|
39
|
+
# Required. ID of the project.
|
40
|
+
# @!attribute [rw] trigger_id
|
41
|
+
# @return [::String]
|
42
|
+
# Required. ID of the trigger.
|
43
|
+
# @!attribute [rw] source
|
44
|
+
# @return [::Google::Cloud::Build::V1::RepoSource]
|
45
|
+
# Required. Source to build against this trigger.
|
46
|
+
class RunBuildTriggerRequest
|
47
|
+
include ::Google::Protobuf::MessageExts
|
48
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
49
|
+
end
|
50
|
+
|
51
|
+
# Location of the source in an archive file in Google Cloud Storage.
|
52
|
+
# @!attribute [rw] bucket
|
53
|
+
# @return [::String]
|
54
|
+
# Google Cloud Storage bucket containing the source (see
|
55
|
+
# [Bucket Name
|
56
|
+
# Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
|
57
|
+
# @!attribute [rw] object
|
58
|
+
# @return [::String]
|
59
|
+
# Google Cloud Storage object containing the source.
|
60
|
+
#
|
61
|
+
# This object must be a gzipped archive file (`.tar.gz`) containing source to
|
62
|
+
# build.
|
63
|
+
# @!attribute [rw] generation
|
64
|
+
# @return [::Integer]
|
65
|
+
# Google Cloud Storage generation for the object. If the generation is
|
66
|
+
# omitted, the latest generation will be used.
|
67
|
+
class StorageSource
|
68
|
+
include ::Google::Protobuf::MessageExts
|
69
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
70
|
+
end
|
71
|
+
|
72
|
+
# Location of the source in a Google Cloud Source Repository.
|
73
|
+
# @!attribute [rw] project_id
|
74
|
+
# @return [::String]
|
75
|
+
# ID of the project that owns the Cloud Source Repository. If omitted, the
|
76
|
+
# project ID requesting the build is assumed.
|
77
|
+
# @!attribute [rw] repo_name
|
78
|
+
# @return [::String]
|
79
|
+
# Required. Name of the Cloud Source Repository.
|
80
|
+
# @!attribute [rw] branch_name
|
81
|
+
# @return [::String]
|
82
|
+
# Regex matching branches to build.
|
83
|
+
#
|
84
|
+
# The syntax of the regular expressions accepted is the syntax accepted by
|
85
|
+
# RE2 and described at https://github.com/google/re2/wiki/Syntax
|
86
|
+
# @!attribute [rw] tag_name
|
87
|
+
# @return [::String]
|
88
|
+
# Regex matching tags to build.
|
89
|
+
#
|
90
|
+
# The syntax of the regular expressions accepted is the syntax accepted by
|
91
|
+
# RE2 and described at https://github.com/google/re2/wiki/Syntax
|
92
|
+
# @!attribute [rw] commit_sha
|
93
|
+
# @return [::String]
|
94
|
+
# Explicit commit SHA to build.
|
95
|
+
# @!attribute [rw] dir
|
96
|
+
# @return [::String]
|
97
|
+
# Directory, relative to the source root, in which to run the build.
|
98
|
+
#
|
99
|
+
# This must be a relative path. If a step's `dir` is specified and is an
|
100
|
+
# absolute path, this value is ignored for that step's execution.
|
101
|
+
# @!attribute [rw] invert_regex
|
102
|
+
# @return [::Boolean]
|
103
|
+
# Only trigger a build if the revision regex does NOT match the revision
|
104
|
+
# regex.
|
105
|
+
# @!attribute [rw] substitutions
|
106
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
107
|
+
# Substitutions to use in a triggered build.
|
108
|
+
# Should only be used with RunBuildTrigger
|
109
|
+
class RepoSource
|
110
|
+
include ::Google::Protobuf::MessageExts
|
111
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
112
|
+
|
113
|
+
# @!attribute [rw] key
|
114
|
+
# @return [::String]
|
115
|
+
# @!attribute [rw] value
|
116
|
+
# @return [::String]
|
117
|
+
class SubstitutionsEntry
|
118
|
+
include ::Google::Protobuf::MessageExts
|
119
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
# Location of the source in a supported storage service.
|
124
|
+
# @!attribute [rw] storage_source
|
125
|
+
# @return [::Google::Cloud::Build::V1::StorageSource]
|
126
|
+
# If provided, get the source from this location in Google Cloud Storage.
|
127
|
+
# @!attribute [rw] repo_source
|
128
|
+
# @return [::Google::Cloud::Build::V1::RepoSource]
|
129
|
+
# If provided, get the source from this location in a Cloud Source
|
130
|
+
# Repository.
|
131
|
+
class Source
|
132
|
+
include ::Google::Protobuf::MessageExts
|
133
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
134
|
+
end
|
135
|
+
|
136
|
+
# An image built by the pipeline.
|
137
|
+
# @!attribute [rw] name
|
138
|
+
# @return [::String]
|
139
|
+
# Name used to push the container image to Google Container Registry, as
|
140
|
+
# presented to `docker push`.
|
141
|
+
# @!attribute [rw] digest
|
142
|
+
# @return [::String]
|
143
|
+
# Docker Registry 2.0 digest.
|
144
|
+
# @!attribute [r] push_timing
|
145
|
+
# @return [::Google::Cloud::Build::V1::TimeSpan]
|
146
|
+
# Output only. Stores timing information for pushing the specified image.
|
147
|
+
class BuiltImage
|
148
|
+
include ::Google::Protobuf::MessageExts
|
149
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
150
|
+
end
|
151
|
+
|
152
|
+
# A step in the build pipeline.
|
153
|
+
# @!attribute [rw] name
|
154
|
+
# @return [::String]
|
155
|
+
# Required. The name of the container image that will run this particular
|
156
|
+
# build step.
|
157
|
+
#
|
158
|
+
# If the image is available in the host's Docker daemon's cache, it
|
159
|
+
# will be run directly. If not, the host will attempt to pull the image
|
160
|
+
# first, using the builder service account's credentials if necessary.
|
161
|
+
#
|
162
|
+
# The Docker daemon's cache will already have the latest versions of all of
|
163
|
+
# the officially supported build steps
|
164
|
+
# ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)).
|
165
|
+
# The Docker daemon will also have cached many of the layers for some popular
|
166
|
+
# images, like "ubuntu", "debian", but they will be refreshed at the time you
|
167
|
+
# attempt to use them.
|
168
|
+
#
|
169
|
+
# If you built an image in a previous build step, it will be stored in the
|
170
|
+
# host's Docker daemon's cache and is available to use as the name for a
|
171
|
+
# later build step.
|
172
|
+
# @!attribute [rw] env
|
173
|
+
# @return [::Array<::String>]
|
174
|
+
# A list of environment variable definitions to be used when running a step.
|
175
|
+
#
|
176
|
+
# The elements are of the form "KEY=VALUE" for the environment variable "KEY"
|
177
|
+
# being given the value "VALUE".
|
178
|
+
# @!attribute [rw] args
|
179
|
+
# @return [::Array<::String>]
|
180
|
+
# A list of arguments that will be presented to the step when it is started.
|
181
|
+
#
|
182
|
+
# If the image used to run the step's container has an entrypoint, the `args`
|
183
|
+
# are used as arguments to that entrypoint. If the image does not define
|
184
|
+
# an entrypoint, the first element in args is used as the entrypoint,
|
185
|
+
# and the remainder will be used as arguments.
|
186
|
+
# @!attribute [rw] dir
|
187
|
+
# @return [::String]
|
188
|
+
# Working directory to use when running this step's container.
|
189
|
+
#
|
190
|
+
# If this value is a relative path, it is relative to the build's working
|
191
|
+
# directory. If this value is absolute, it may be outside the build's working
|
192
|
+
# directory, in which case the contents of the path may not be persisted
|
193
|
+
# across build step executions, unless a `volume` for that path is specified.
|
194
|
+
#
|
195
|
+
# If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
|
196
|
+
# which specifies an absolute path, the `RepoSource` `dir` is ignored for
|
197
|
+
# the step's execution.
|
198
|
+
# @!attribute [rw] id
|
199
|
+
# @return [::String]
|
200
|
+
# Unique identifier for this build step, used in `wait_for` to
|
201
|
+
# reference this build step as a dependency.
|
202
|
+
# @!attribute [rw] wait_for
|
203
|
+
# @return [::Array<::String>]
|
204
|
+
# The ID(s) of the step(s) that this build step depends on.
|
205
|
+
# This build step will not start until all the build steps in `wait_for`
|
206
|
+
# have completed successfully. If `wait_for` is empty, this build step will
|
207
|
+
# start when all previous build steps in the `Build.Steps` list have
|
208
|
+
# completed successfully.
|
209
|
+
# @!attribute [rw] entrypoint
|
210
|
+
# @return [::String]
|
211
|
+
# Entrypoint to be used instead of the build step image's default entrypoint.
|
212
|
+
# If unset, the image's default entrypoint is used.
|
213
|
+
# @!attribute [rw] secret_env
|
214
|
+
# @return [::Array<::String>]
|
215
|
+
# A list of environment variables which are encrypted using a Cloud Key
|
216
|
+
# Management Service crypto key. These values must be specified in the
|
217
|
+
# build's `Secret`.
|
218
|
+
# @!attribute [rw] volumes
|
219
|
+
# @return [::Array<::Google::Cloud::Build::V1::Volume>]
|
220
|
+
# List of volumes to mount into the build step.
|
221
|
+
#
|
222
|
+
# Each volume is created as an empty volume prior to execution of the
|
223
|
+
# build step. Upon completion of the build, volumes and their contents are
|
224
|
+
# discarded.
|
225
|
+
#
|
226
|
+
# Using a named volume in only one step is not valid as it is indicative
|
227
|
+
# of a build request with an incorrect configuration.
|
228
|
+
# @!attribute [r] timing
|
229
|
+
# @return [::Google::Cloud::Build::V1::TimeSpan]
|
230
|
+
# Output only. Stores timing information for executing this build step.
|
231
|
+
# @!attribute [rw] pull_timing
|
232
|
+
# @return [::Google::Cloud::Build::V1::TimeSpan]
|
233
|
+
# Output only. Stores timing information for pulling this build step's
|
234
|
+
# builder image only.
|
235
|
+
# @!attribute [rw] timeout
|
236
|
+
# @return [::Google::Protobuf::Duration]
|
237
|
+
# Time limit for executing this build step. If not defined, the step has no
|
238
|
+
# time limit and will be allowed to continue to run until either it completes
|
239
|
+
# or the build itself times out.
|
240
|
+
# @!attribute [rw] status
|
241
|
+
# @return [::Google::Cloud::Build::V1::Build::Status]
|
242
|
+
# Output only. Status of the build step. At this time, build step status is
|
243
|
+
# only updated on build completion; step status is not updated in real-time
|
244
|
+
# as the build progresses.
|
245
|
+
class BuildStep
|
246
|
+
include ::Google::Protobuf::MessageExts
|
247
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
248
|
+
end
|
249
|
+
|
250
|
+
# Volume describes a Docker container volume which is mounted into build steps
|
251
|
+
# in order to persist files across build step execution.
|
252
|
+
# @!attribute [rw] name
|
253
|
+
# @return [::String]
|
254
|
+
# Name of the volume to mount.
|
255
|
+
#
|
256
|
+
# Volume names must be unique per build step and must be valid names for
|
257
|
+
# Docker volumes. Each named volume must be used by at least two build steps.
|
258
|
+
# @!attribute [rw] path
|
259
|
+
# @return [::String]
|
260
|
+
# Path at which to mount the volume.
|
261
|
+
#
|
262
|
+
# Paths must be absolute and cannot conflict with other volume paths on the
|
263
|
+
# same build step or with certain reserved volume paths.
|
264
|
+
class Volume
|
265
|
+
include ::Google::Protobuf::MessageExts
|
266
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
267
|
+
end
|
268
|
+
|
269
|
+
# Artifacts created by the build pipeline.
|
270
|
+
# @!attribute [rw] images
|
271
|
+
# @return [::Array<::Google::Cloud::Build::V1::BuiltImage>]
|
272
|
+
# Container images that were built as a part of the build.
|
273
|
+
# @!attribute [rw] build_step_images
|
274
|
+
# @return [::Array<::String>]
|
275
|
+
# List of build step digests, in the order corresponding to build step
|
276
|
+
# indices.
|
277
|
+
# @!attribute [rw] artifact_manifest
|
278
|
+
# @return [::String]
|
279
|
+
# Path to the artifact manifest. Only populated when artifacts are uploaded.
|
280
|
+
# @!attribute [rw] num_artifacts
|
281
|
+
# @return [::Integer]
|
282
|
+
# Number of artifacts uploaded. Only populated when artifacts are uploaded.
|
283
|
+
# @!attribute [rw] build_step_outputs
|
284
|
+
# @return [::Array<::String>]
|
285
|
+
# List of build step outputs, produced by builder images, in the order
|
286
|
+
# corresponding to build step indices.
|
287
|
+
#
|
288
|
+
# [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
|
289
|
+
# can produce this output by writing to `$BUILDER_OUTPUT/output`.
|
290
|
+
# Only the first 4KB of data is stored.
|
291
|
+
# @!attribute [rw] artifact_timing
|
292
|
+
# @return [::Google::Cloud::Build::V1::TimeSpan]
|
293
|
+
# Time to push all non-container artifacts.
|
294
|
+
class Results
|
295
|
+
include ::Google::Protobuf::MessageExts
|
296
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
297
|
+
end
|
298
|
+
|
299
|
+
# An artifact that was uploaded during a build. This
|
300
|
+
# is a single record in the artifact manifest JSON file.
|
301
|
+
# @!attribute [rw] location
|
302
|
+
# @return [::String]
|
303
|
+
# The path of an artifact in a Google Cloud Storage bucket, with the
|
304
|
+
# generation number. For example,
|
305
|
+
# `gs://mybucket/path/to/output.jar#generation`.
|
306
|
+
# @!attribute [rw] file_hash
|
307
|
+
# @return [::Array<::Google::Cloud::Build::V1::FileHashes>]
|
308
|
+
# The file hash of the artifact.
|
309
|
+
class ArtifactResult
|
310
|
+
include ::Google::Protobuf::MessageExts
|
311
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
312
|
+
end
|
313
|
+
|
314
|
+
# A build resource in the Cloud Build API.
|
315
|
+
#
|
316
|
+
# At a high level, a `Build` describes where to find source code, how to build
|
317
|
+
# it (for example, the builder image to run on the source), and where to store
|
318
|
+
# the built artifacts.
|
319
|
+
#
|
320
|
+
# Fields can include the following variables, which will be expanded when the
|
321
|
+
# build is created:
|
322
|
+
#
|
323
|
+
# - $PROJECT_ID: the project ID of the build.
|
324
|
+
# - $BUILD_ID: the autogenerated ID of the build.
|
325
|
+
# - $REPO_NAME: the source repository name specified by RepoSource.
|
326
|
+
# - $BRANCH_NAME: the branch name specified by RepoSource.
|
327
|
+
# - $TAG_NAME: the tag name specified by RepoSource.
|
328
|
+
# - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
|
329
|
+
# resolved from the specified branch or tag.
|
330
|
+
# - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
|
331
|
+
# @!attribute [r] id
|
332
|
+
# @return [::String]
|
333
|
+
# Output only. Unique identifier of the build.
|
334
|
+
# @!attribute [r] project_id
|
335
|
+
# @return [::String]
|
336
|
+
# Output only. ID of the project.
|
337
|
+
# @!attribute [rw] status
|
338
|
+
# @return [::Google::Cloud::Build::V1::Build::Status]
|
339
|
+
# Output only. Status of the build.
|
340
|
+
# @!attribute [rw] status_detail
|
341
|
+
# @return [::String]
|
342
|
+
# Output only. Customer-readable message about the current status.
|
343
|
+
# @!attribute [rw] source
|
344
|
+
# @return [::Google::Cloud::Build::V1::Source]
|
345
|
+
# The location of the source files to build.
|
346
|
+
# @!attribute [rw] steps
|
347
|
+
# @return [::Array<::Google::Cloud::Build::V1::BuildStep>]
|
348
|
+
# Required. The operations to be performed on the workspace.
|
349
|
+
# @!attribute [r] results
|
350
|
+
# @return [::Google::Cloud::Build::V1::Results]
|
351
|
+
# Output only. Results of the build.
|
352
|
+
# @!attribute [r] create_time
|
353
|
+
# @return [::Google::Protobuf::Timestamp]
|
354
|
+
# Output only. Time at which the request to create the build was received.
|
355
|
+
# @!attribute [r] start_time
|
356
|
+
# @return [::Google::Protobuf::Timestamp]
|
357
|
+
# Output only. Time at which execution of the build was started.
|
358
|
+
# @!attribute [r] finish_time
|
359
|
+
# @return [::Google::Protobuf::Timestamp]
|
360
|
+
# Output only. Time at which execution of the build was finished.
|
361
|
+
#
|
362
|
+
# The difference between finish_time and start_time is the duration of the
|
363
|
+
# build's execution.
|
364
|
+
# @!attribute [rw] timeout
|
365
|
+
# @return [::Google::Protobuf::Duration]
|
366
|
+
# Amount of time that this build should be allowed to run, to second
|
367
|
+
# granularity. If this amount of time elapses, work on the build will cease
|
368
|
+
# and the build status will be `TIMEOUT`.
|
369
|
+
#
|
370
|
+
# Default time is ten minutes.
|
371
|
+
# @!attribute [rw] images
|
372
|
+
# @return [::Array<::String>]
|
373
|
+
# A list of images to be pushed upon the successful completion of all build
|
374
|
+
# steps.
|
375
|
+
#
|
376
|
+
# The images are pushed using the builder service account's credentials.
|
377
|
+
#
|
378
|
+
# The digests of the pushed images will be stored in the `Build` resource's
|
379
|
+
# results field.
|
380
|
+
#
|
381
|
+
# If any of the images fail to be pushed, the build status is marked
|
382
|
+
# `FAILURE`.
|
383
|
+
# @!attribute [rw] queue_ttl
|
384
|
+
# @return [::Google::Protobuf::Duration]
|
385
|
+
# TTL in queue for this build. If provided and the build is enqueued longer
|
386
|
+
# than this value, the build will expire and the build status will be
|
387
|
+
# `EXPIRED`.
|
388
|
+
#
|
389
|
+
# The TTL starts ticking from create_time.
|
390
|
+
# @!attribute [rw] artifacts
|
391
|
+
# @return [::Google::Cloud::Build::V1::Artifacts]
|
392
|
+
# Artifacts produced by the build that should be uploaded upon
|
393
|
+
# successful completion of all build steps.
|
394
|
+
# @!attribute [rw] logs_bucket
|
395
|
+
# @return [::String]
|
396
|
+
# Google Cloud Storage bucket where logs should be written (see
|
397
|
+
# [Bucket Name
|
398
|
+
# Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
|
399
|
+
# Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
|
400
|
+
# @!attribute [rw] source_provenance
|
401
|
+
# @return [::Google::Cloud::Build::V1::SourceProvenance]
|
402
|
+
# Output only. A permanent fixed identifier for source.
|
403
|
+
# @!attribute [rw] build_trigger_id
|
404
|
+
# @return [::String]
|
405
|
+
# Output only. The ID of the `BuildTrigger` that triggered this build, if it
|
406
|
+
# was triggered automatically.
|
407
|
+
# @!attribute [rw] options
|
408
|
+
# @return [::Google::Cloud::Build::V1::BuildOptions]
|
409
|
+
# Special options for this build.
|
410
|
+
# @!attribute [r] log_url
|
411
|
+
# @return [::String]
|
412
|
+
# Output only. URL to logs for this build in Google Cloud Console.
|
413
|
+
# @!attribute [rw] substitutions
|
414
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
415
|
+
# Substitutions data for `Build` resource.
|
416
|
+
# @!attribute [rw] tags
|
417
|
+
# @return [::Array<::String>]
|
418
|
+
# Tags for annotation of a `Build`. These are not docker tags.
|
419
|
+
# @!attribute [rw] secrets
|
420
|
+
# @return [::Array<::Google::Cloud::Build::V1::Secret>]
|
421
|
+
# Secrets to decrypt using Cloud Key Management Service.
|
422
|
+
# @!attribute [r] timing
|
423
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Build::V1::TimeSpan}]
|
424
|
+
# Output only. Stores timing information for phases of the build. Valid keys
|
425
|
+
# are:
|
426
|
+
#
|
427
|
+
# * BUILD: time to execute all build steps
|
428
|
+
# * PUSH: time to push all specified images.
|
429
|
+
# * FETCHSOURCE: time to fetch source.
|
430
|
+
#
|
431
|
+
# If the build does not specify source or images,
|
432
|
+
# these keys will not be included.
|
433
|
+
class Build
|
434
|
+
include ::Google::Protobuf::MessageExts
|
435
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
436
|
+
|
437
|
+
# @!attribute [rw] key
|
438
|
+
# @return [::String]
|
439
|
+
# @!attribute [rw] value
|
440
|
+
# @return [::String]
|
441
|
+
class SubstitutionsEntry
|
442
|
+
include ::Google::Protobuf::MessageExts
|
443
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
444
|
+
end
|
445
|
+
|
446
|
+
# @!attribute [rw] key
|
447
|
+
# @return [::String]
|
448
|
+
# @!attribute [rw] value
|
449
|
+
# @return [::Google::Cloud::Build::V1::TimeSpan]
|
450
|
+
class TimingEntry
|
451
|
+
include ::Google::Protobuf::MessageExts
|
452
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
453
|
+
end
|
454
|
+
|
455
|
+
# Possible status of a build or build step.
|
456
|
+
module Status
|
457
|
+
# Status of the build is unknown.
|
458
|
+
STATUS_UNKNOWN = 0
|
459
|
+
|
460
|
+
# Build or step is queued; work has not yet begun.
|
461
|
+
QUEUED = 1
|
462
|
+
|
463
|
+
# Build or step is being executed.
|
464
|
+
WORKING = 2
|
465
|
+
|
466
|
+
# Build or step finished successfully.
|
467
|
+
SUCCESS = 3
|
468
|
+
|
469
|
+
# Build or step failed to complete successfully.
|
470
|
+
FAILURE = 4
|
471
|
+
|
472
|
+
# Build or step failed due to an internal cause.
|
473
|
+
INTERNAL_ERROR = 5
|
474
|
+
|
475
|
+
# Build or step took longer than was allowed.
|
476
|
+
TIMEOUT = 6
|
477
|
+
|
478
|
+
# Build or step was canceled by a user.
|
479
|
+
CANCELLED = 7
|
480
|
+
|
481
|
+
# Build was enqueued for longer than the value of `queue_ttl`.
|
482
|
+
EXPIRED = 9
|
483
|
+
end
|
484
|
+
end
|
485
|
+
|
486
|
+
# Artifacts produced by a build that should be uploaded upon
|
487
|
+
# successful completion of all build steps.
|
488
|
+
# @!attribute [rw] images
|
489
|
+
# @return [::Array<::String>]
|
490
|
+
# A list of images to be pushed upon the successful completion of all build
|
491
|
+
# steps.
|
492
|
+
#
|
493
|
+
# The images will be pushed using the builder service account's credentials.
|
494
|
+
#
|
495
|
+
# The digests of the pushed images will be stored in the Build resource's
|
496
|
+
# results field.
|
497
|
+
#
|
498
|
+
# If any of the images fail to be pushed, the build is marked FAILURE.
|
499
|
+
# @!attribute [rw] objects
|
500
|
+
# @return [::Google::Cloud::Build::V1::Artifacts::ArtifactObjects]
|
501
|
+
# A list of objects to be uploaded to Cloud Storage upon successful
|
502
|
+
# completion of all build steps.
|
503
|
+
#
|
504
|
+
# Files in the workspace matching specified paths globs will be uploaded to
|
505
|
+
# the specified Cloud Storage location using the builder service account's
|
506
|
+
# credentials.
|
507
|
+
#
|
508
|
+
# The location and generation of the uploaded objects will be stored in the
|
509
|
+
# Build resource's results field.
|
510
|
+
#
|
511
|
+
# If any objects fail to be pushed, the build is marked FAILURE.
|
512
|
+
class Artifacts
|
513
|
+
include ::Google::Protobuf::MessageExts
|
514
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
515
|
+
|
516
|
+
# Files in the workspace to upload to Cloud Storage upon successful
|
517
|
+
# completion of all build steps.
|
518
|
+
# @!attribute [rw] location
|
519
|
+
# @return [::String]
|
520
|
+
# Cloud Storage bucket and optional object path, in the form
|
521
|
+
# "gs://bucket/path/to/somewhere/". (see [Bucket Name
|
522
|
+
# Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
|
523
|
+
#
|
524
|
+
# Files in the workspace matching any path pattern will be uploaded to
|
525
|
+
# Cloud Storage with this location as a prefix.
|
526
|
+
# @!attribute [rw] paths
|
527
|
+
# @return [::Array<::String>]
|
528
|
+
# Path globs used to match files in the build's workspace.
|
529
|
+
# @!attribute [rw] timing
|
530
|
+
# @return [::Google::Cloud::Build::V1::TimeSpan]
|
531
|
+
# Output only. Stores timing information for pushing all artifact objects.
|
532
|
+
class ArtifactObjects
|
533
|
+
include ::Google::Protobuf::MessageExts
|
534
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
535
|
+
end
|
536
|
+
end
|
537
|
+
|
538
|
+
# Start and end times for a build execution phase.
|
539
|
+
# @!attribute [rw] start_time
|
540
|
+
# @return [::Google::Protobuf::Timestamp]
|
541
|
+
# Start of time span.
|
542
|
+
# @!attribute [rw] end_time
|
543
|
+
# @return [::Google::Protobuf::Timestamp]
|
544
|
+
# End of time span.
|
545
|
+
class TimeSpan
|
546
|
+
include ::Google::Protobuf::MessageExts
|
547
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
548
|
+
end
|
549
|
+
|
550
|
+
# Metadata for build operations.
|
551
|
+
# @!attribute [rw] build
|
552
|
+
# @return [::Google::Cloud::Build::V1::Build]
|
553
|
+
# The build that the operation is tracking.
|
554
|
+
class BuildOperationMetadata
|
555
|
+
include ::Google::Protobuf::MessageExts
|
556
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
557
|
+
end
|
558
|
+
|
559
|
+
# Provenance of the source. Ways to find the original source, or verify that
|
560
|
+
# some source was used for this build.
|
561
|
+
# @!attribute [rw] resolved_storage_source
|
562
|
+
# @return [::Google::Cloud::Build::V1::StorageSource]
|
563
|
+
# A copy of the build's `source.storage_source`, if exists, with any
|
564
|
+
# generations resolved.
|
565
|
+
# @!attribute [rw] resolved_repo_source
|
566
|
+
# @return [::Google::Cloud::Build::V1::RepoSource]
|
567
|
+
# A copy of the build's `source.repo_source`, if exists, with any
|
568
|
+
# revisions resolved.
|
569
|
+
# @!attribute [r] file_hashes
|
570
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Build::V1::FileHashes}]
|
571
|
+
# Output only. Hash(es) of the build source, which can be used to verify that
|
572
|
+
# the original source integrity was maintained in the build. Note that
|
573
|
+
# `FileHashes` will only be populated if `BuildOptions` has requested a
|
574
|
+
# `SourceProvenanceHash`.
|
575
|
+
#
|
576
|
+
# The keys to this map are file paths used as build source and the values
|
577
|
+
# contain the hash values for those files.
|
578
|
+
#
|
579
|
+
# If the build source came in a single package such as a gzipped tarfile
|
580
|
+
# (`.tar.gz`), the `FileHash` will be for the single path to that file.
|
581
|
+
class SourceProvenance
|
582
|
+
include ::Google::Protobuf::MessageExts
|
583
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
584
|
+
|
585
|
+
# @!attribute [rw] key
|
586
|
+
# @return [::String]
|
587
|
+
# @!attribute [rw] value
|
588
|
+
# @return [::Google::Cloud::Build::V1::FileHashes]
|
589
|
+
class FileHashesEntry
|
590
|
+
include ::Google::Protobuf::MessageExts
|
591
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
592
|
+
end
|
593
|
+
end
|
594
|
+
|
595
|
+
# Container message for hashes of byte content of files, used in
|
596
|
+
# SourceProvenance messages to verify integrity of source input to the build.
|
597
|
+
# @!attribute [rw] file_hash
|
598
|
+
# @return [::Array<::Google::Cloud::Build::V1::Hash>]
|
599
|
+
# Collection of file hashes.
|
600
|
+
class FileHashes
|
601
|
+
include ::Google::Protobuf::MessageExts
|
602
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
603
|
+
end
|
604
|
+
|
605
|
+
# Container message for hash values.
|
606
|
+
# @!attribute [rw] type
|
607
|
+
# @return [::Google::Cloud::Build::V1::Hash::HashType]
|
608
|
+
# The type of hash that was performed.
|
609
|
+
# @!attribute [rw] value
|
610
|
+
# @return [::String]
|
611
|
+
# The hash value.
|
612
|
+
class Hash
|
613
|
+
include ::Google::Protobuf::MessageExts
|
614
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
615
|
+
|
616
|
+
# Specifies the hash algorithm, if any.
|
617
|
+
module HashType
|
618
|
+
# No hash requested.
|
619
|
+
NONE = 0
|
620
|
+
|
621
|
+
# Use a sha256 hash.
|
622
|
+
SHA256 = 1
|
623
|
+
|
624
|
+
# Use a md5 hash.
|
625
|
+
MD5 = 2
|
626
|
+
end
|
627
|
+
end
|
628
|
+
|
629
|
+
# Pairs a set of secret environment variables containing encrypted
|
630
|
+
# values with the Cloud KMS key to use to decrypt the value.
|
631
|
+
# @!attribute [rw] kms_key_name
|
632
|
+
# @return [::String]
|
633
|
+
# Cloud KMS key name to use to decrypt these envs.
|
634
|
+
# @!attribute [rw] secret_env
|
635
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
636
|
+
# Map of environment variable name to its encrypted value.
|
637
|
+
#
|
638
|
+
# Secret environment variables must be unique across all of a build's
|
639
|
+
# secrets, and must be used by at least one build step. Values can be at most
|
640
|
+
# 64 KB in size. There can be at most 100 secret values across all of a
|
641
|
+
# build's secrets.
|
642
|
+
class Secret
|
643
|
+
include ::Google::Protobuf::MessageExts
|
644
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
645
|
+
|
646
|
+
# @!attribute [rw] key
|
647
|
+
# @return [::String]
|
648
|
+
# @!attribute [rw] value
|
649
|
+
# @return [::String]
|
650
|
+
class SecretEnvEntry
|
651
|
+
include ::Google::Protobuf::MessageExts
|
652
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
653
|
+
end
|
654
|
+
end
|
655
|
+
|
656
|
+
# Request to create a new build.
|
657
|
+
# @!attribute [rw] project_id
|
658
|
+
# @return [::String]
|
659
|
+
# Required. ID of the project.
|
660
|
+
# @!attribute [rw] build
|
661
|
+
# @return [::Google::Cloud::Build::V1::Build]
|
662
|
+
# Required. Build resource to create.
|
663
|
+
class CreateBuildRequest
|
664
|
+
include ::Google::Protobuf::MessageExts
|
665
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
666
|
+
end
|
667
|
+
|
668
|
+
# Request to get a build.
|
669
|
+
# @!attribute [rw] project_id
|
670
|
+
# @return [::String]
|
671
|
+
# Required. ID of the project.
|
672
|
+
# @!attribute [rw] id
|
673
|
+
# @return [::String]
|
674
|
+
# Required. ID of the build.
|
675
|
+
class GetBuildRequest
|
676
|
+
include ::Google::Protobuf::MessageExts
|
677
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
678
|
+
end
|
679
|
+
|
680
|
+
# Request to list builds.
|
681
|
+
# @!attribute [rw] project_id
|
682
|
+
# @return [::String]
|
683
|
+
# Required. ID of the project.
|
684
|
+
# @!attribute [rw] page_size
|
685
|
+
# @return [::Integer]
|
686
|
+
# Number of results to return in the list.
|
687
|
+
# @!attribute [rw] page_token
|
688
|
+
# @return [::String]
|
689
|
+
# Token to provide to skip to a particular spot in the list.
|
690
|
+
# @!attribute [rw] filter
|
691
|
+
# @return [::String]
|
692
|
+
# The raw filter text to constrain the results.
|
693
|
+
class ListBuildsRequest
|
694
|
+
include ::Google::Protobuf::MessageExts
|
695
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
696
|
+
end
|
697
|
+
|
698
|
+
# Response including listed builds.
|
699
|
+
# @!attribute [rw] builds
|
700
|
+
# @return [::Array<::Google::Cloud::Build::V1::Build>]
|
701
|
+
# Builds will be sorted by `create_time`, descending.
|
702
|
+
# @!attribute [rw] next_page_token
|
703
|
+
# @return [::String]
|
704
|
+
# Token to receive the next page of results.
|
705
|
+
class ListBuildsResponse
|
706
|
+
include ::Google::Protobuf::MessageExts
|
707
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
708
|
+
end
|
709
|
+
|
710
|
+
# Request to cancel an ongoing build.
|
711
|
+
# @!attribute [rw] project_id
|
712
|
+
# @return [::String]
|
713
|
+
# Required. ID of the project.
|
714
|
+
# @!attribute [rw] id
|
715
|
+
# @return [::String]
|
716
|
+
# Required. ID of the build.
|
717
|
+
class CancelBuildRequest
|
718
|
+
include ::Google::Protobuf::MessageExts
|
719
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
720
|
+
end
|
721
|
+
|
722
|
+
# Configuration for an automated build in response to source repository
|
723
|
+
# changes.
|
724
|
+
# @!attribute [r] id
|
725
|
+
# @return [::String]
|
726
|
+
# Output only. Unique identifier of the trigger.
|
727
|
+
# @!attribute [rw] description
|
728
|
+
# @return [::String]
|
729
|
+
# Human-readable description of this trigger.
|
730
|
+
# @!attribute [rw] name
|
731
|
+
# @return [::String]
|
732
|
+
# User-assigned name of the trigger. Must be unique within the project.
|
733
|
+
# Trigger names must meet the following requirements:
|
734
|
+
#
|
735
|
+
# + They must contain only alphanumeric characters and dashes.
|
736
|
+
# + They can be 1-64 characters long.
|
737
|
+
# + They must begin and end with an alphanumeric character.
|
738
|
+
# @!attribute [rw] tags
|
739
|
+
# @return [::Array<::String>]
|
740
|
+
# Tags for annotation of a `BuildTrigger`
|
741
|
+
# @!attribute [rw] trigger_template
|
742
|
+
# @return [::Google::Cloud::Build::V1::RepoSource]
|
743
|
+
# Template describing the types of source changes to trigger a build.
|
744
|
+
#
|
745
|
+
# Branch and tag names in trigger templates are interpreted as regular
|
746
|
+
# expressions. Any branch or tag change that matches that regular expression
|
747
|
+
# will trigger a build.
|
748
|
+
#
|
749
|
+
# Mutually exclusive with `github`.
|
750
|
+
# @!attribute [rw] github
|
751
|
+
# @return [::Google::Cloud::Build::V1::GitHubEventsConfig]
|
752
|
+
# GitHubEventsConfig describes the configuration of a trigger that creates
|
753
|
+
# a build whenever a GitHub event is received.
|
754
|
+
#
|
755
|
+
# Mutually exclusive with `trigger_template`.
|
756
|
+
# @!attribute [rw] build
|
757
|
+
# @return [::Google::Cloud::Build::V1::Build]
|
758
|
+
# Contents of the build template.
|
759
|
+
# @!attribute [rw] filename
|
760
|
+
# @return [::String]
|
761
|
+
# Path, from the source root, to a file whose contents is used for the
|
762
|
+
# template.
|
763
|
+
# @!attribute [r] create_time
|
764
|
+
# @return [::Google::Protobuf::Timestamp]
|
765
|
+
# Output only. Time when the trigger was created.
|
766
|
+
# @!attribute [rw] disabled
|
767
|
+
# @return [::Boolean]
|
768
|
+
# If true, the trigger will never result in a build.
|
769
|
+
# @!attribute [rw] substitutions
|
770
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
771
|
+
# 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.
|
774
|
+
# @!attribute [rw] ignored_files
|
775
|
+
# @return [::Array<::String>]
|
776
|
+
# ignored_files and included_files are file glob matches using
|
777
|
+
# https://golang.org/pkg/path/filepath/#Match extended with support for "**".
|
778
|
+
#
|
779
|
+
# If ignored_files and changed files are both empty, then they are
|
780
|
+
# not used to determine whether or not to trigger a build.
|
781
|
+
#
|
782
|
+
# If ignored_files is not empty, then we ignore any files that match
|
783
|
+
# any of the ignored_file globs. If the change has no files that are
|
784
|
+
# outside of the ignored_files globs, then we do not trigger a build.
|
785
|
+
# @!attribute [rw] included_files
|
786
|
+
# @return [::Array<::String>]
|
787
|
+
# If any of the files altered in the commit pass the ignored_files
|
788
|
+
# filter and included_files is empty, then as far as this filter is
|
789
|
+
# concerned, we should trigger the build.
|
790
|
+
#
|
791
|
+
# If any of the files altered in the commit pass the ignored_files
|
792
|
+
# filter and included_files is not empty, then we make sure that at
|
793
|
+
# least one of those files matches a included_files glob. If not,
|
794
|
+
# then we do not trigger a build.
|
795
|
+
class BuildTrigger
|
796
|
+
include ::Google::Protobuf::MessageExts
|
797
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
798
|
+
|
799
|
+
# @!attribute [rw] key
|
800
|
+
# @return [::String]
|
801
|
+
# @!attribute [rw] value
|
802
|
+
# @return [::String]
|
803
|
+
class SubstitutionsEntry
|
804
|
+
include ::Google::Protobuf::MessageExts
|
805
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
806
|
+
end
|
807
|
+
end
|
808
|
+
|
809
|
+
# GitHubEventsConfig describes the configuration of a trigger that creates a
|
810
|
+
# build whenever a GitHub event is received.
|
811
|
+
#
|
812
|
+
# This message is experimental.
|
813
|
+
# @!attribute [rw] installation_id
|
814
|
+
# @return [::Integer]
|
815
|
+
# The installationID that emits the GitHub event.
|
816
|
+
# @!attribute [rw] owner
|
817
|
+
# @return [::String]
|
818
|
+
# Owner of the repository. For example: The owner for
|
819
|
+
# https://github.com/googlecloudplatform/cloud-builders is
|
820
|
+
# "googlecloudplatform".
|
821
|
+
# @!attribute [rw] name
|
822
|
+
# @return [::String]
|
823
|
+
# Name of the repository. For example: The name for
|
824
|
+
# https://github.com/googlecloudplatform/cloud-builders is "cloud-builders".
|
825
|
+
# @!attribute [rw] pull_request
|
826
|
+
# @return [::Google::Cloud::Build::V1::PullRequestFilter]
|
827
|
+
# filter to match changes in pull requests.
|
828
|
+
# @!attribute [rw] push
|
829
|
+
# @return [::Google::Cloud::Build::V1::PushFilter]
|
830
|
+
# filter to match changes in refs like branches, tags.
|
831
|
+
class GitHubEventsConfig
|
832
|
+
include ::Google::Protobuf::MessageExts
|
833
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
834
|
+
end
|
835
|
+
|
836
|
+
# PullRequestFilter contains filter properties for matching GitHub Pull
|
837
|
+
# Requests.
|
838
|
+
# @!attribute [rw] branch
|
839
|
+
# @return [::String]
|
840
|
+
# Regex of branches to match.
|
841
|
+
#
|
842
|
+
# The syntax of the regular expressions accepted is the syntax accepted by
|
843
|
+
# RE2 and described at https://github.com/google/re2/wiki/Syntax
|
844
|
+
# @!attribute [rw] comment_control
|
845
|
+
# @return [::Google::Cloud::Build::V1::PullRequestFilter::CommentControl]
|
846
|
+
# Whether to block builds on a "/gcbrun" comment from a repository admin or
|
847
|
+
# collaborator.
|
848
|
+
# @!attribute [rw] invert_regex
|
849
|
+
# @return [::Boolean]
|
850
|
+
# If true, branches that do NOT match the git_ref will trigger a build.
|
851
|
+
class PullRequestFilter
|
852
|
+
include ::Google::Protobuf::MessageExts
|
853
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
854
|
+
|
855
|
+
# Controls behavior of Pull Request comments.
|
856
|
+
module CommentControl
|
857
|
+
# Do not require comments on Pull Requests before builds are triggered.
|
858
|
+
COMMENTS_DISABLED = 0
|
859
|
+
|
860
|
+
# Enforce that repository owners or collaborators must comment on Pull
|
861
|
+
# Requests before builds are triggered.
|
862
|
+
COMMENTS_ENABLED = 1
|
863
|
+
end
|
864
|
+
end
|
865
|
+
|
866
|
+
# Push contains filter properties for matching GitHub git pushes.
|
867
|
+
# @!attribute [rw] branch
|
868
|
+
# @return [::String]
|
869
|
+
# Regexes matching branches to build.
|
870
|
+
#
|
871
|
+
# The syntax of the regular expressions accepted is the syntax accepted by
|
872
|
+
# RE2 and described at https://github.com/google/re2/wiki/Syntax
|
873
|
+
# @!attribute [rw] tag
|
874
|
+
# @return [::String]
|
875
|
+
# Regexes matching tags to build.
|
876
|
+
#
|
877
|
+
# The syntax of the regular expressions accepted is the syntax accepted by
|
878
|
+
# RE2 and described at https://github.com/google/re2/wiki/Syntax
|
879
|
+
# @!attribute [rw] invert_regex
|
880
|
+
# @return [::Boolean]
|
881
|
+
# When true, only trigger a build if the revision regex does NOT match the
|
882
|
+
# git_ref regex.
|
883
|
+
class PushFilter
|
884
|
+
include ::Google::Protobuf::MessageExts
|
885
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
886
|
+
end
|
887
|
+
|
888
|
+
# Request to create a new `BuildTrigger`.
|
889
|
+
# @!attribute [rw] project_id
|
890
|
+
# @return [::String]
|
891
|
+
# Required. ID of the project for which to configure automatic builds.
|
892
|
+
# @!attribute [rw] trigger
|
893
|
+
# @return [::Google::Cloud::Build::V1::BuildTrigger]
|
894
|
+
# Required. `BuildTrigger` to create.
|
895
|
+
class CreateBuildTriggerRequest
|
896
|
+
include ::Google::Protobuf::MessageExts
|
897
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
898
|
+
end
|
899
|
+
|
900
|
+
# Returns the `BuildTrigger` with the specified ID.
|
901
|
+
# @!attribute [rw] project_id
|
902
|
+
# @return [::String]
|
903
|
+
# Required. ID of the project that owns the trigger.
|
904
|
+
# @!attribute [rw] trigger_id
|
905
|
+
# @return [::String]
|
906
|
+
# Required. Identifier (`id` or `name`) of the `BuildTrigger` to get.
|
907
|
+
class GetBuildTriggerRequest
|
908
|
+
include ::Google::Protobuf::MessageExts
|
909
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
910
|
+
end
|
911
|
+
|
912
|
+
# Request to list existing `BuildTriggers`.
|
913
|
+
# @!attribute [rw] project_id
|
914
|
+
# @return [::String]
|
915
|
+
# Required. ID of the project for which to list BuildTriggers.
|
916
|
+
# @!attribute [rw] page_size
|
917
|
+
# @return [::Integer]
|
918
|
+
# Number of results to return in the list.
|
919
|
+
# @!attribute [rw] page_token
|
920
|
+
# @return [::String]
|
921
|
+
# Token to provide to skip to a particular spot in the list.
|
922
|
+
class ListBuildTriggersRequest
|
923
|
+
include ::Google::Protobuf::MessageExts
|
924
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
925
|
+
end
|
926
|
+
|
927
|
+
# Response containing existing `BuildTriggers`.
|
928
|
+
# @!attribute [rw] triggers
|
929
|
+
# @return [::Array<::Google::Cloud::Build::V1::BuildTrigger>]
|
930
|
+
# `BuildTriggers` for the project, sorted by `create_time` descending.
|
931
|
+
# @!attribute [rw] next_page_token
|
932
|
+
# @return [::String]
|
933
|
+
# Token to receive the next page of results.
|
934
|
+
class ListBuildTriggersResponse
|
935
|
+
include ::Google::Protobuf::MessageExts
|
936
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
937
|
+
end
|
938
|
+
|
939
|
+
# Request to delete a `BuildTrigger`.
|
940
|
+
# @!attribute [rw] project_id
|
941
|
+
# @return [::String]
|
942
|
+
# Required. ID of the project that owns the trigger.
|
943
|
+
# @!attribute [rw] trigger_id
|
944
|
+
# @return [::String]
|
945
|
+
# Required. ID of the `BuildTrigger` to delete.
|
946
|
+
class DeleteBuildTriggerRequest
|
947
|
+
include ::Google::Protobuf::MessageExts
|
948
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
949
|
+
end
|
950
|
+
|
951
|
+
# Request to update an existing `BuildTrigger`.
|
952
|
+
# @!attribute [rw] project_id
|
953
|
+
# @return [::String]
|
954
|
+
# Required. ID of the project that owns the trigger.
|
955
|
+
# @!attribute [rw] trigger_id
|
956
|
+
# @return [::String]
|
957
|
+
# Required. ID of the `BuildTrigger` to update.
|
958
|
+
# @!attribute [rw] trigger
|
959
|
+
# @return [::Google::Cloud::Build::V1::BuildTrigger]
|
960
|
+
# Required. `BuildTrigger` to update.
|
961
|
+
class UpdateBuildTriggerRequest
|
962
|
+
include ::Google::Protobuf::MessageExts
|
963
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
964
|
+
end
|
965
|
+
|
966
|
+
# Optional arguments to enable specific features of builds.
|
967
|
+
# @!attribute [rw] source_provenance_hash
|
968
|
+
# @return [::Array<::Google::Cloud::Build::V1::Hash::HashType>]
|
969
|
+
# Requested hash for SourceProvenance.
|
970
|
+
# @!attribute [rw] requested_verify_option
|
971
|
+
# @return [::Google::Cloud::Build::V1::BuildOptions::VerifyOption]
|
972
|
+
# Requested verifiability options.
|
973
|
+
# @!attribute [rw] machine_type
|
974
|
+
# @return [::Google::Cloud::Build::V1::BuildOptions::MachineType]
|
975
|
+
# Compute Engine machine type on which to run the build.
|
976
|
+
# @!attribute [rw] disk_size_gb
|
977
|
+
# @return [::Integer]
|
978
|
+
# Requested disk size for the VM that runs the build. Note that this is *NOT*
|
979
|
+
# "disk free"; some of the space will be used by the operating system and
|
980
|
+
# build utilities. Also note that this is the minimum disk size that will be
|
981
|
+
# allocated for the build -- the build may run with a larger disk than
|
982
|
+
# requested. At present, the maximum disk size is 1000GB; builds that request
|
983
|
+
# more than the maximum are rejected with an error.
|
984
|
+
# @!attribute [rw] substitution_option
|
985
|
+
# @return [::Google::Cloud::Build::V1::BuildOptions::SubstitutionOption]
|
986
|
+
# Option to specify behavior when there is an error in the substitution
|
987
|
+
# checks.
|
988
|
+
# @!attribute [rw] log_streaming_option
|
989
|
+
# @return [::Google::Cloud::Build::V1::BuildOptions::LogStreamingOption]
|
990
|
+
# Option to define build log streaming behavior to Google Cloud
|
991
|
+
# Storage.
|
992
|
+
# @!attribute [rw] worker_pool
|
993
|
+
# @return [::String]
|
994
|
+
# Option to specify a `WorkerPool` for the build.
|
995
|
+
# Format: projects/\\{project}/workerPools/\\{workerPool}
|
996
|
+
#
|
997
|
+
# This field is experimental.
|
998
|
+
# @!attribute [rw] logging
|
999
|
+
# @return [::Google::Cloud::Build::V1::BuildOptions::LoggingMode]
|
1000
|
+
# Option to specify the logging mode, which determines where the logs are
|
1001
|
+
# stored.
|
1002
|
+
# @!attribute [rw] env
|
1003
|
+
# @return [::Array<::String>]
|
1004
|
+
# A list of global environment variable definitions that will exist for all
|
1005
|
+
# build steps in this build. If a variable is defined in both globally and in
|
1006
|
+
# a build step, the variable will use the build step value.
|
1007
|
+
#
|
1008
|
+
# The elements are of the form "KEY=VALUE" for the environment variable "KEY"
|
1009
|
+
# being given the value "VALUE".
|
1010
|
+
# @!attribute [rw] secret_env
|
1011
|
+
# @return [::Array<::String>]
|
1012
|
+
# A list of global environment variables, which are encrypted using a Cloud
|
1013
|
+
# Key Management Service crypto key. These values must be specified in the
|
1014
|
+
# build's `Secret`. These variables will be available to all build steps
|
1015
|
+
# in this build.
|
1016
|
+
# @!attribute [rw] volumes
|
1017
|
+
# @return [::Array<::Google::Cloud::Build::V1::Volume>]
|
1018
|
+
# Global list of volumes to mount for ALL build steps
|
1019
|
+
#
|
1020
|
+
# Each volume is created as an empty volume prior to starting the build
|
1021
|
+
# process. Upon completion of the build, volumes and their contents are
|
1022
|
+
# discarded. Global volume names and paths cannot conflict with the volumes
|
1023
|
+
# defined a build step.
|
1024
|
+
#
|
1025
|
+
# Using a global volume in a build with only one step is not valid as
|
1026
|
+
# it is indicative of a build request with an incorrect configuration.
|
1027
|
+
class BuildOptions
|
1028
|
+
include ::Google::Protobuf::MessageExts
|
1029
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1030
|
+
|
1031
|
+
# Specifies the manner in which the build should be verified, if at all.
|
1032
|
+
module VerifyOption
|
1033
|
+
# Not a verifiable build. (default)
|
1034
|
+
NOT_VERIFIED = 0
|
1035
|
+
|
1036
|
+
# Verified build.
|
1037
|
+
VERIFIED = 1
|
1038
|
+
end
|
1039
|
+
|
1040
|
+
# Supported VM sizes.
|
1041
|
+
module MachineType
|
1042
|
+
# Standard machine type.
|
1043
|
+
UNSPECIFIED = 0
|
1044
|
+
|
1045
|
+
# Highcpu machine with 8 CPUs.
|
1046
|
+
N1_HIGHCPU_8 = 1
|
1047
|
+
|
1048
|
+
# Highcpu machine with 32 CPUs.
|
1049
|
+
N1_HIGHCPU_32 = 2
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# Specifies the behavior when there is an error in the substitution checks.
|
1053
|
+
module SubstitutionOption
|
1054
|
+
# Fails the build if error in substitutions checks, like missing
|
1055
|
+
# a substitution in the template or in the map.
|
1056
|
+
MUST_MATCH = 0
|
1057
|
+
|
1058
|
+
# Do not fail the build if error in substitutions checks.
|
1059
|
+
ALLOW_LOOSE = 1
|
1060
|
+
end
|
1061
|
+
|
1062
|
+
# Specifies the behavior when writing build logs to Google Cloud Storage.
|
1063
|
+
module LogStreamingOption
|
1064
|
+
# Service may automatically determine build log streaming behavior.
|
1065
|
+
STREAM_DEFAULT = 0
|
1066
|
+
|
1067
|
+
# Build logs should be streamed to Google Cloud Storage.
|
1068
|
+
STREAM_ON = 1
|
1069
|
+
|
1070
|
+
# Build logs should not be streamed to Google Cloud Storage; they will be
|
1071
|
+
# written when the build is completed.
|
1072
|
+
STREAM_OFF = 2
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
# Specifies the logging mode.
|
1076
|
+
module LoggingMode
|
1077
|
+
# The service determines the logging mode. The default is `LEGACY`. Do not
|
1078
|
+
# rely on the default logging behavior as it may change in the future.
|
1079
|
+
LOGGING_UNSPECIFIED = 0
|
1080
|
+
|
1081
|
+
# Stackdriver logging and Cloud Storage logging are enabled.
|
1082
|
+
LEGACY = 1
|
1083
|
+
|
1084
|
+
# Only Cloud Storage logging is enabled.
|
1085
|
+
GCS_ONLY = 2
|
1086
|
+
end
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
# Configuration for a WorkerPool to run the builds.
|
1090
|
+
#
|
1091
|
+
# Workers are machines that Cloud Build uses to run your builds. By default,
|
1092
|
+
# all workers run in a project owned by Cloud Build. To have full control over
|
1093
|
+
# the workers that execute your builds -- such as enabling them to access
|
1094
|
+
# private resources on your private network -- you can request Cloud Build to
|
1095
|
+
# run the workers in your own project by creating a custom workers pool.
|
1096
|
+
# @!attribute [rw] name
|
1097
|
+
# @return [::String]
|
1098
|
+
# User-defined name of the `WorkerPool`.
|
1099
|
+
# @!attribute [rw] project_id
|
1100
|
+
# @return [::String]
|
1101
|
+
# The project ID of the GCP project for which the `WorkerPool` is created.
|
1102
|
+
# @!attribute [rw] service_account_email
|
1103
|
+
# @return [::String]
|
1104
|
+
# Output only. The service account used to manage the `WorkerPool`. The
|
1105
|
+
# service account must have the Compute Instance Admin (Beta) permission at
|
1106
|
+
# the project level.
|
1107
|
+
# @!attribute [rw] worker_count
|
1108
|
+
# @return [::Integer]
|
1109
|
+
# Total number of workers to be created across all requested regions.
|
1110
|
+
# @!attribute [rw] worker_config
|
1111
|
+
# @return [::Google::Cloud::Build::V1::WorkerConfig]
|
1112
|
+
# Configuration to be used for a creating workers in the `WorkerPool`.
|
1113
|
+
# @!attribute [rw] regions
|
1114
|
+
# @return [::Array<::Google::Cloud::Build::V1::WorkerPool::Region>]
|
1115
|
+
# List of regions to create the `WorkerPool`. Regions can't be empty.
|
1116
|
+
# If Cloud Build adds a new GCP region in the future, the existing
|
1117
|
+
# `WorkerPool` will not be enabled in the new region automatically;
|
1118
|
+
# you must add the new region to the `regions` field to enable the
|
1119
|
+
# `WorkerPool` in that region.
|
1120
|
+
# @!attribute [rw] create_time
|
1121
|
+
# @return [::Google::Protobuf::Timestamp]
|
1122
|
+
# Output only. Time at which the request to create the `WorkerPool` was
|
1123
|
+
# received.
|
1124
|
+
# @!attribute [rw] update_time
|
1125
|
+
# @return [::Google::Protobuf::Timestamp]
|
1126
|
+
# Output only. Time at which the request to update the `WorkerPool` was
|
1127
|
+
# received.
|
1128
|
+
# @!attribute [rw] delete_time
|
1129
|
+
# @return [::Google::Protobuf::Timestamp]
|
1130
|
+
# Output only. Time at which the request to delete the `WorkerPool` was
|
1131
|
+
# received.
|
1132
|
+
# @!attribute [rw] status
|
1133
|
+
# @return [::Google::Cloud::Build::V1::WorkerPool::Status]
|
1134
|
+
# Output only. WorkerPool Status.
|
1135
|
+
class WorkerPool
|
1136
|
+
include ::Google::Protobuf::MessageExts
|
1137
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1138
|
+
|
1139
|
+
# Supported GCP regions to create the `WorkerPool`.
|
1140
|
+
module Region
|
1141
|
+
# no region
|
1142
|
+
REGION_UNSPECIFIED = 0
|
1143
|
+
|
1144
|
+
# us-central1 region
|
1145
|
+
US_CENTRAL1 = 1
|
1146
|
+
|
1147
|
+
# us-west1 region
|
1148
|
+
US_WEST1 = 2
|
1149
|
+
|
1150
|
+
# us-east1 region
|
1151
|
+
US_EAST1 = 3
|
1152
|
+
|
1153
|
+
# us-east4 region
|
1154
|
+
US_EAST4 = 4
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
# `WorkerPool` status
|
1158
|
+
module Status
|
1159
|
+
# Status of the `WorkerPool` is unknown.
|
1160
|
+
STATUS_UNSPECIFIED = 0
|
1161
|
+
|
1162
|
+
# `WorkerPool` is being created.
|
1163
|
+
CREATING = 1
|
1164
|
+
|
1165
|
+
# `WorkerPool` is running.
|
1166
|
+
RUNNING = 2
|
1167
|
+
|
1168
|
+
# `WorkerPool` is being deleted: cancelling builds and draining workers.
|
1169
|
+
DELETING = 3
|
1170
|
+
|
1171
|
+
# `WorkerPool` is deleted.
|
1172
|
+
DELETED = 4
|
1173
|
+
end
|
1174
|
+
end
|
1175
|
+
|
1176
|
+
# WorkerConfig defines the configuration to be used for a creating workers in
|
1177
|
+
# the pool.
|
1178
|
+
# @!attribute [rw] machine_type
|
1179
|
+
# @return [::String]
|
1180
|
+
# Machine Type of the worker, such as n1-standard-1.
|
1181
|
+
# See https://cloud.google.com/compute/docs/machine-types.
|
1182
|
+
# If left blank, Cloud Build will use a standard unspecified machine to
|
1183
|
+
# create the worker pool.
|
1184
|
+
# `machine_type` is overridden if you specify a different machine type in
|
1185
|
+
# `build_options`. In this case, the VM specified in the `build_options`
|
1186
|
+
# will be created on demand at build time. For more information see
|
1187
|
+
# https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes
|
1188
|
+
# @!attribute [rw] disk_size_gb
|
1189
|
+
# @return [::Integer]
|
1190
|
+
# Size of the disk attached to the worker, in GB.
|
1191
|
+
# See https://cloud.google.com/compute/docs/disks/
|
1192
|
+
# If `0` is specified, Cloud Build will use a standard disk size.
|
1193
|
+
# `disk_size` is overridden if you specify a different disk size in
|
1194
|
+
# `build_options`. In this case, a VM with a disk size specified in the
|
1195
|
+
# `build_options` will be created on demand at build time. For more
|
1196
|
+
# information see
|
1197
|
+
# https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions
|
1198
|
+
# @!attribute [rw] network
|
1199
|
+
# @return [::Google::Cloud::Build::V1::Network]
|
1200
|
+
# The network definition used to create the worker.
|
1201
|
+
# If this section is left empty, the workers will be created in
|
1202
|
+
# WorkerPool.project_id on the default network.
|
1203
|
+
# @!attribute [rw] tag
|
1204
|
+
# @return [::String]
|
1205
|
+
# The tag applied to the worker, and the same tag used by the firewall rule.
|
1206
|
+
# It is used to identify the Cloud Build workers among other VMs.
|
1207
|
+
# The default value for tag is `worker`.
|
1208
|
+
class WorkerConfig
|
1209
|
+
include ::Google::Protobuf::MessageExts
|
1210
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
# Network describes the GCP network used to create workers in.
|
1214
|
+
# @!attribute [rw] project_id
|
1215
|
+
# @return [::String]
|
1216
|
+
# Project id containing the defined network and subnetwork. For a peered VPC,
|
1217
|
+
# this will be the same as the project_id in which the workers are created.
|
1218
|
+
# For a shared VPC, this will be the project sharing the network with the
|
1219
|
+
# project_id project in which workers will be created. For custom workers
|
1220
|
+
# with no VPC, this will be the same as project_id.
|
1221
|
+
# @!attribute [rw] network
|
1222
|
+
# @return [::String]
|
1223
|
+
# Network on which the workers are created.
|
1224
|
+
# "default" network is used if empty.
|
1225
|
+
# @!attribute [rw] subnetwork
|
1226
|
+
# @return [::String]
|
1227
|
+
# Subnetwork on which the workers are created.
|
1228
|
+
# "default" subnetwork is used if empty.
|
1229
|
+
class Network
|
1230
|
+
include ::Google::Protobuf::MessageExts
|
1231
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1232
|
+
end
|
1233
|
+
|
1234
|
+
# Request to create a new `WorkerPool`.
|
1235
|
+
# @!attribute [rw] parent
|
1236
|
+
# @return [::String]
|
1237
|
+
# ID of the parent project.
|
1238
|
+
# @!attribute [rw] worker_pool
|
1239
|
+
# @return [::Google::Cloud::Build::V1::WorkerPool]
|
1240
|
+
# `WorkerPool` resource to create.
|
1241
|
+
class CreateWorkerPoolRequest
|
1242
|
+
include ::Google::Protobuf::MessageExts
|
1243
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
# Request to get a `WorkerPool` with the specified name.
|
1247
|
+
# @!attribute [rw] name
|
1248
|
+
# @return [::String]
|
1249
|
+
# The field will contain name of the resource requested, for example:
|
1250
|
+
# "projects/project-1/workerPools/workerpool-name"
|
1251
|
+
class GetWorkerPoolRequest
|
1252
|
+
include ::Google::Protobuf::MessageExts
|
1253
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1254
|
+
end
|
1255
|
+
|
1256
|
+
# Request to delete a `WorkerPool`.
|
1257
|
+
# @!attribute [rw] name
|
1258
|
+
# @return [::String]
|
1259
|
+
# The field will contain name of the resource requested, for example:
|
1260
|
+
# "projects/project-1/workerPools/workerpool-name"
|
1261
|
+
class DeleteWorkerPoolRequest
|
1262
|
+
include ::Google::Protobuf::MessageExts
|
1263
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1264
|
+
end
|
1265
|
+
|
1266
|
+
# Request to update a `WorkerPool`.
|
1267
|
+
# @!attribute [rw] name
|
1268
|
+
# @return [::String]
|
1269
|
+
# The field will contain name of the resource requested, for example:
|
1270
|
+
# "projects/project-1/workerPools/workerpool-name"
|
1271
|
+
# @!attribute [rw] worker_pool
|
1272
|
+
# @return [::Google::Cloud::Build::V1::WorkerPool]
|
1273
|
+
# `WorkerPool` resource to update.
|
1274
|
+
class UpdateWorkerPoolRequest
|
1275
|
+
include ::Google::Protobuf::MessageExts
|
1276
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1277
|
+
end
|
1278
|
+
|
1279
|
+
# Request to list `WorkerPool`s.
|
1280
|
+
# @!attribute [rw] parent
|
1281
|
+
# @return [::String]
|
1282
|
+
# ID of the parent project.
|
1283
|
+
class ListWorkerPoolsRequest
|
1284
|
+
include ::Google::Protobuf::MessageExts
|
1285
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
# Response containing existing `WorkerPools`.
|
1289
|
+
# @!attribute [rw] worker_pools
|
1290
|
+
# @return [::Array<::Google::Cloud::Build::V1::WorkerPool>]
|
1291
|
+
# `WorkerPools` for the project.
|
1292
|
+
class ListWorkerPoolsResponse
|
1293
|
+
include ::Google::Protobuf::MessageExts
|
1294
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1295
|
+
end
|
1296
|
+
end
|
1297
|
+
end
|
1298
|
+
end
|
1299
|
+
end
|