Skip to content

Commit 7ec7881

Browse files
chore: synchronize new proto/yaml changes (#246)
* Synchronize new proto/yaml changes. PiperOrigin-RevId: 381955863 Source-Link: googleapis/googleapis@24443e8 Source-Link: googleapis/googleapis-gen@3281235 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Jeffrey Rennie <[email protected]>
1 parent 715fa19 commit 7ec7881

File tree

6 files changed

+1685
-138
lines changed

6 files changed

+1685
-138
lines changed

packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto

+149-6
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ service CloudBuild {
183183
option (google.api.http) = {
184184
post: "/v1/projects/{project_id}/triggers"
185185
body: "trigger"
186+
additional_bindings {
187+
post: "/v1/{parent=projects/*/locations/*}/triggers"
188+
body: "trigger"
189+
}
186190
};
187191
option (google.api.method_signature) = "project_id,trigger";
188192
}
@@ -193,6 +197,9 @@ service CloudBuild {
193197
rpc GetBuildTrigger(GetBuildTriggerRequest) returns (BuildTrigger) {
194198
option (google.api.http) = {
195199
get: "/v1/projects/{project_id}/triggers/{trigger_id}"
200+
additional_bindings {
201+
get: "/v1/{name=projects/*/locations/*/triggers/*}"
202+
}
196203
};
197204
option (google.api.method_signature) = "project_id,trigger_id";
198205
}
@@ -204,6 +211,9 @@ service CloudBuild {
204211
returns (ListBuildTriggersResponse) {
205212
option (google.api.http) = {
206213
get: "/v1/projects/{project_id}/triggers"
214+
additional_bindings {
215+
get: "/v1/{parent=projects/*/locations/*}/triggers"
216+
}
207217
};
208218
option (google.api.method_signature) = "project_id";
209219
}
@@ -215,6 +225,9 @@ service CloudBuild {
215225
returns (google.protobuf.Empty) {
216226
option (google.api.http) = {
217227
delete: "/v1/projects/{project_id}/triggers/{trigger_id}"
228+
additional_bindings {
229+
delete: "/v1/{name=projects/*/locations/*/triggers/*}"
230+
}
218231
};
219232
option (google.api.method_signature) = "project_id,trigger_id";
220233
}
@@ -226,6 +239,10 @@ service CloudBuild {
226239
option (google.api.http) = {
227240
patch: "/v1/projects/{project_id}/triggers/{trigger_id}"
228241
body: "trigger"
242+
additional_bindings {
243+
patch: "/v1/{trigger.resource_name=projects/*/locations/*/triggers/*}"
244+
body: "trigger"
245+
}
229246
};
230247
option (google.api.method_signature) = "project_id,trigger_id,trigger";
231248
}
@@ -236,6 +253,10 @@ service CloudBuild {
236253
option (google.api.http) = {
237254
post: "/v1/projects/{project_id}/triggers/{trigger_id}:run"
238255
body: "source"
256+
additional_bindings {
257+
post: "/v1/{name=projects/*/locations/*/triggers/*}:run"
258+
body: "*"
259+
}
239260
};
240261
option (google.api.method_signature) = "project_id,trigger_id,source";
241262
option (google.longrunning.operation_info) = {
@@ -251,6 +272,10 @@ service CloudBuild {
251272
option (google.api.http) = {
252273
post: "/v1/projects/{project_id}/triggers/{trigger}:webhook"
253274
body: "body"
275+
additional_bindings {
276+
post: "/v1/{name=projects/*/locations/*/triggers/*}:webhook"
277+
body: "body"
278+
}
254279
};
255280
}
256281

@@ -299,6 +324,12 @@ message RetryBuildRequest {
299324

300325
// Specifies a build trigger to run and the source to use.
301326
message RunBuildTriggerRequest {
327+
// The name of the `Trigger` to run.
328+
// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
329+
string name = 4 [(google.api.resource_reference) = {
330+
type: "cloudbuild.googleapis.com/BuildTrigger"
331+
}];
332+
302333
// Required. ID of the project.
303334
string project_id = 1 [(google.api.field_behavior) = REQUIRED];
304335

@@ -371,7 +402,8 @@ message RepoSource {
371402
}
372403

373404
// Location of the source manifest in Google Cloud Storage.
374-
// This feature is in Preview.
405+
// This feature is in Preview; see description
406+
// [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher).
375407
message StorageSourceManifest {
376408
// Google Cloud Storage bucket containing the source manifest (see [Bucket
377409
// Name
@@ -400,7 +432,8 @@ message Source {
400432
RepoSource repo_source = 3;
401433

402434
// If provided, get the source from this manifest in Google Cloud Storage.
403-
// This feature is in Preview.
435+
// This feature is in Preview; see description
436+
// [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher).
404437
StorageSourceManifest storage_source_manifest = 8;
405438
}
406439
}
@@ -593,6 +626,30 @@ message Build {
593626
pattern: "projects/{project}/locations/{location}/builds/{build}"
594627
};
595628

629+
// A non-fatal problem encountered during the execution of the build.
630+
message Warning {
631+
// The relative importance of this warning.
632+
enum Priority {
633+
// Should not be used.
634+
PRIORITY_UNSPECIFIED = 0;
635+
636+
// e.g. deprecation warnings and alternative feature highlights.
637+
INFO = 1;
638+
639+
// e.g. automated detection of possible issues with the build.
640+
WARNING = 2;
641+
642+
// e.g. alerts that a feature used in the build is pending removal
643+
ALERT = 3;
644+
}
645+
646+
// Explanation of the warning generated.
647+
string text = 1;
648+
649+
// The priority for this warning.
650+
Priority priority = 2;
651+
}
652+
596653
// Possible status of a build or build step.
597654
enum Status {
598655
// Status of the build is unknown.
@@ -744,13 +801,16 @@ message Build {
744801
// Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
745802
// ACCOUNT can be email address or uniqueId of the service account.
746803
//
747-
// This field is in beta.
748804
string service_account = 42 [(google.api.resource_reference) = {
749805
type: "iam.googleapis.com/ServiceAccount"
750806
}];
751807

752808
// Secrets and secret environment variables.
753809
Secrets available_secrets = 47;
810+
811+
// Output only. Non-fatal problems encountered during the execution of the
812+
// build.
813+
repeated Warning warnings = 49 [(google.api.field_behavior) = OUTPUT_ONLY];
754814
}
755815

756816
// Artifacts produced by a build that should be uploaded upon
@@ -1021,9 +1081,17 @@ message CancelBuildRequest {
10211081
message BuildTrigger {
10221082
option (google.api.resource) = {
10231083
type: "cloudbuild.googleapis.com/BuildTrigger"
1084+
plural: "triggers"
1085+
singular: "trigger"
10241086
pattern: "projects/{project}/triggers/{trigger}"
1087+
pattern: "projects/{project}/locations/{location}/triggers/{trigger}"
10251088
};
10261089

1090+
// The `Trigger` name with format:
1091+
// `projects/{project}/locations/{location}/triggers/{trigger}`, where
1092+
// {trigger} is a unique identifier generated by the service.
1093+
string resource_name = 34;
1094+
10271095
// Output only. Unique identifier of the trigger.
10281096
string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
10291097

@@ -1056,12 +1124,27 @@ message BuildTrigger {
10561124
// Mutually exclusive with `trigger_template`.
10571125
GitHubEventsConfig github = 13;
10581126

1059-
// Optional. PubsubConfig describes the configuration of a trigger that
1127+
// PubsubConfig describes the configuration of a trigger that
10601128
// creates a build whenever a Pub/Sub message is published.
1061-
PubsubConfig pubsub_config = 29 [(google.api.field_behavior) = OPTIONAL];
1129+
PubsubConfig pubsub_config = 29;
1130+
1131+
// WebhookConfig describes the configuration of a trigger that
1132+
// creates a build whenever a webhook is sent to a trigger's webhook URL.
1133+
WebhookConfig webhook_config = 31;
10621134

10631135
// Template describing the Build request to make when the trigger is matched.
10641136
oneof build_template {
1137+
// Autodetect build configuration. The following precedence is used (case
1138+
// insensitive):
1139+
//
1140+
// 1. cloudbuild.yaml
1141+
// 2. cloudbuild.yml
1142+
// 3. cloudbuild.json
1143+
// 4. Dockerfile
1144+
//
1145+
// Currently only available for GitHub App Triggers.
1146+
bool autodetect = 18;
1147+
10651148
// Contents of the build template.
10661149
Build build = 4;
10671150

@@ -1181,6 +1264,38 @@ message PubsubConfig {
11811264
State state = 4;
11821265
}
11831266

1267+
// WebhookConfig describes the configuration of a trigger that
1268+
// creates a build whenever a webhook is sent to a trigger's webhook URL.
1269+
message WebhookConfig {
1270+
// Enumerates potential issues with the Secret Manager secret provided by the
1271+
// user.
1272+
enum State {
1273+
// The webhook auth configuration not been checked.
1274+
STATE_UNSPECIFIED = 0;
1275+
1276+
// The auth configuration is properly setup.
1277+
OK = 1;
1278+
1279+
// The secret provided in auth_method has been deleted.
1280+
SECRET_DELETED = 2;
1281+
}
1282+
1283+
// Auth method specifies how the webhook authenticates with GCP.
1284+
oneof auth_method {
1285+
// Required. Resource name for the secret required as a URL parameter.
1286+
string secret = 3 [
1287+
(google.api.field_behavior) = REQUIRED,
1288+
(google.api.resource_reference) = {
1289+
type: "secretmanager.googleapis.com/SecretVersion"
1290+
}
1291+
];
1292+
}
1293+
1294+
// Potential issues with the underlying Pub/Sub subscription configuration.
1295+
// Only populated on get requests.
1296+
State state = 4;
1297+
}
1298+
11841299
// PullRequestFilter contains filter properties for matching GitHub Pull
11851300
// Requests.
11861301
message PullRequestFilter {
@@ -1241,6 +1356,12 @@ message PushFilter {
12411356

12421357
// Request to create a new `BuildTrigger`.
12431358
message CreateBuildTriggerRequest {
1359+
// The parent resource where this trigger will be created.
1360+
// Format: `projects/{project}/locations/{location}`
1361+
string parent = 3 [(google.api.resource_reference) = {
1362+
child_type: "cloudbuild.googleapis.com/BuildTrigger"
1363+
}];
1364+
12441365
// Required. ID of the project for which to configure automatic builds.
12451366
string project_id = 1 [(google.api.field_behavior) = REQUIRED];
12461367

@@ -1250,6 +1371,12 @@ message CreateBuildTriggerRequest {
12501371

12511372
// Returns the `BuildTrigger` with the specified ID.
12521373
message GetBuildTriggerRequest {
1374+
// The name of the `Trigger` to retrieve.
1375+
// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
1376+
string name = 3 [(google.api.resource_reference) = {
1377+
type: "cloudbuild.googleapis.com/BuildTrigger"
1378+
}];
1379+
12531380
// Required. ID of the project that owns the trigger.
12541381
string project_id = 1 [(google.api.field_behavior) = REQUIRED];
12551382

@@ -1259,6 +1386,12 @@ message GetBuildTriggerRequest {
12591386

12601387
// Request to list existing `BuildTriggers`.
12611388
message ListBuildTriggersRequest {
1389+
// The parent of the collection of `Triggers`.
1390+
// Format: `projects/{project}/locations/{location}`
1391+
string parent = 4 [(google.api.resource_reference) = {
1392+
child_type: "cloudbuild.googleapis.com/BuildTrigger"
1393+
}];
1394+
12621395
// Required. ID of the project for which to list BuildTriggers.
12631396
string project_id = 1 [(google.api.field_behavior) = REQUIRED];
12641397

@@ -1280,6 +1413,12 @@ message ListBuildTriggersResponse {
12801413

12811414
// Request to delete a `BuildTrigger`.
12821415
message DeleteBuildTriggerRequest {
1416+
// The name of the `Trigger` to delete.
1417+
// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
1418+
string name = 3 [(google.api.resource_reference) = {
1419+
type: "cloudbuild.googleapis.com/BuildTrigger"
1420+
}];
1421+
12831422
// Required. ID of the project that owns the trigger.
12841423
string project_id = 1 [(google.api.field_behavior) = REQUIRED];
12851424

@@ -1415,7 +1554,7 @@ message BuildOptions {
14151554
// Option to specify a `WorkerPool` for the build.
14161555
// Format: projects/{project}/locations/{location}/workerPools/{workerPool}
14171556
//
1418-
// This field is experimental.
1557+
// This field is in beta and is available only to restricted users.
14191558
string worker_pool = 7;
14201559

14211560
// Option to specify the logging mode, which determines if and where build
@@ -1451,6 +1590,10 @@ message BuildOptions {
14511590
// ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by
14521591
// the ReceiveTriggerWebhook method.
14531592
message ReceiveTriggerWebhookRequest {
1593+
// The name of the `ReceiveTriggerWebhook` to retrieve.
1594+
// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
1595+
string name = 5;
1596+
14541597
// HTTP request body.
14551598
google.api.HttpBody body = 1;
14561599

0 commit comments

Comments
 (0)