@@ -183,6 +183,10 @@ service CloudBuild {
183
183
option (google.api.http ) = {
184
184
post : "/v1/projects/{project_id}/triggers"
185
185
body : "trigger"
186
+ additional_bindings {
187
+ post : "/v1/{parent=projects/*/locations/*}/triggers"
188
+ body : "trigger"
189
+ }
186
190
};
187
191
option (google.api.method_signature ) = "project_id,trigger" ;
188
192
}
@@ -193,6 +197,9 @@ service CloudBuild {
193
197
rpc GetBuildTrigger (GetBuildTriggerRequest ) returns (BuildTrigger ) {
194
198
option (google.api.http ) = {
195
199
get : "/v1/projects/{project_id}/triggers/{trigger_id}"
200
+ additional_bindings {
201
+ get : "/v1/{name=projects/*/locations/*/triggers/*}"
202
+ }
196
203
};
197
204
option (google.api.method_signature ) = "project_id,trigger_id" ;
198
205
}
@@ -204,6 +211,9 @@ service CloudBuild {
204
211
returns (ListBuildTriggersResponse ) {
205
212
option (google.api.http ) = {
206
213
get : "/v1/projects/{project_id}/triggers"
214
+ additional_bindings {
215
+ get : "/v1/{parent=projects/*/locations/*}/triggers"
216
+ }
207
217
};
208
218
option (google.api.method_signature ) = "project_id" ;
209
219
}
@@ -215,6 +225,9 @@ service CloudBuild {
215
225
returns (google .protobuf .Empty ) {
216
226
option (google.api.http ) = {
217
227
delete : "/v1/projects/{project_id}/triggers/{trigger_id}"
228
+ additional_bindings {
229
+ delete : "/v1/{name=projects/*/locations/*/triggers/*}"
230
+ }
218
231
};
219
232
option (google.api.method_signature ) = "project_id,trigger_id" ;
220
233
}
@@ -226,6 +239,10 @@ service CloudBuild {
226
239
option (google.api.http ) = {
227
240
patch : "/v1/projects/{project_id}/triggers/{trigger_id}"
228
241
body : "trigger"
242
+ additional_bindings {
243
+ patch : "/v1/{trigger.resource_name=projects/*/locations/*/triggers/*}"
244
+ body : "trigger"
245
+ }
229
246
};
230
247
option (google.api.method_signature ) = "project_id,trigger_id,trigger" ;
231
248
}
@@ -236,6 +253,10 @@ service CloudBuild {
236
253
option (google.api.http ) = {
237
254
post : "/v1/projects/{project_id}/triggers/{trigger_id}:run"
238
255
body : "source"
256
+ additional_bindings {
257
+ post : "/v1/{name=projects/*/locations/*/triggers/*}:run"
258
+ body : "*"
259
+ }
239
260
};
240
261
option (google.api.method_signature ) = "project_id,trigger_id,source" ;
241
262
option (google.longrunning.operation_info ) = {
@@ -251,6 +272,10 @@ service CloudBuild {
251
272
option (google.api.http ) = {
252
273
post : "/v1/projects/{project_id}/triggers/{trigger}:webhook"
253
274
body : "body"
275
+ additional_bindings {
276
+ post : "/v1/{name=projects/*/locations/*/triggers/*}:webhook"
277
+ body : "body"
278
+ }
254
279
};
255
280
}
256
281
@@ -299,6 +324,12 @@ message RetryBuildRequest {
299
324
300
325
// Specifies a build trigger to run and the source to use.
301
326
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
+
302
333
// Required. ID of the project.
303
334
string project_id = 1 [(google.api.field_behavior ) = REQUIRED ];
304
335
@@ -371,7 +402,8 @@ message RepoSource {
371
402
}
372
403
373
404
// 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).
375
407
message StorageSourceManifest {
376
408
// Google Cloud Storage bucket containing the source manifest (see [Bucket
377
409
// Name
@@ -400,7 +432,8 @@ message Source {
400
432
RepoSource repo_source = 3 ;
401
433
402
434
// 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).
404
437
StorageSourceManifest storage_source_manifest = 8 ;
405
438
}
406
439
}
@@ -593,6 +626,30 @@ message Build {
593
626
pattern : "projects/{project}/locations/{location}/builds/{build}"
594
627
};
595
628
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
+
596
653
// Possible status of a build or build step.
597
654
enum Status {
598
655
// Status of the build is unknown.
@@ -744,13 +801,16 @@ message Build {
744
801
// Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
745
802
// ACCOUNT can be email address or uniqueId of the service account.
746
803
//
747
- // This field is in beta.
748
804
string service_account = 42 [(google.api.resource_reference ) = {
749
805
type : "iam.googleapis.com/ServiceAccount"
750
806
}];
751
807
752
808
// Secrets and secret environment variables.
753
809
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 ];
754
814
}
755
815
756
816
// Artifacts produced by a build that should be uploaded upon
@@ -1021,9 +1081,17 @@ message CancelBuildRequest {
1021
1081
message BuildTrigger {
1022
1082
option (google.api.resource ) = {
1023
1083
type : "cloudbuild.googleapis.com/BuildTrigger"
1084
+ plural : "triggers"
1085
+ singular : "trigger"
1024
1086
pattern : "projects/{project}/triggers/{trigger}"
1087
+ pattern : "projects/{project}/locations/{location}/triggers/{trigger}"
1025
1088
};
1026
1089
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
+
1027
1095
// Output only. Unique identifier of the trigger.
1028
1096
string id = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
1029
1097
@@ -1056,12 +1124,27 @@ message BuildTrigger {
1056
1124
// Mutually exclusive with `trigger_template`.
1057
1125
GitHubEventsConfig github = 13 ;
1058
1126
1059
- // Optional. PubsubConfig describes the configuration of a trigger that
1127
+ // PubsubConfig describes the configuration of a trigger that
1060
1128
// 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 ;
1062
1134
1063
1135
// Template describing the Build request to make when the trigger is matched.
1064
1136
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
+
1065
1148
// Contents of the build template.
1066
1149
Build build = 4 ;
1067
1150
@@ -1181,6 +1264,38 @@ message PubsubConfig {
1181
1264
State state = 4 ;
1182
1265
}
1183
1266
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
+
1184
1299
// PullRequestFilter contains filter properties for matching GitHub Pull
1185
1300
// Requests.
1186
1301
message PullRequestFilter {
@@ -1241,6 +1356,12 @@ message PushFilter {
1241
1356
1242
1357
// Request to create a new `BuildTrigger`.
1243
1358
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
+
1244
1365
// Required. ID of the project for which to configure automatic builds.
1245
1366
string project_id = 1 [(google.api.field_behavior ) = REQUIRED ];
1246
1367
@@ -1250,6 +1371,12 @@ message CreateBuildTriggerRequest {
1250
1371
1251
1372
// Returns the `BuildTrigger` with the specified ID.
1252
1373
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
+
1253
1380
// Required. ID of the project that owns the trigger.
1254
1381
string project_id = 1 [(google.api.field_behavior ) = REQUIRED ];
1255
1382
@@ -1259,6 +1386,12 @@ message GetBuildTriggerRequest {
1259
1386
1260
1387
// Request to list existing `BuildTriggers`.
1261
1388
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
+
1262
1395
// Required. ID of the project for which to list BuildTriggers.
1263
1396
string project_id = 1 [(google.api.field_behavior ) = REQUIRED ];
1264
1397
@@ -1280,6 +1413,12 @@ message ListBuildTriggersResponse {
1280
1413
1281
1414
// Request to delete a `BuildTrigger`.
1282
1415
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
+
1283
1422
// Required. ID of the project that owns the trigger.
1284
1423
string project_id = 1 [(google.api.field_behavior ) = REQUIRED ];
1285
1424
@@ -1415,7 +1554,7 @@ message BuildOptions {
1415
1554
// Option to specify a `WorkerPool` for the build.
1416
1555
// Format: projects/{project}/locations/{location}/workerPools/{workerPool}
1417
1556
//
1418
- // This field is experimental .
1557
+ // This field is in beta and is available only to restricted users .
1419
1558
string worker_pool = 7 ;
1420
1559
1421
1560
// Option to specify the logging mode, which determines if and where build
@@ -1451,6 +1590,10 @@ message BuildOptions {
1451
1590
// ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by
1452
1591
// the ReceiveTriggerWebhook method.
1453
1592
message ReceiveTriggerWebhookRequest {
1593
+ // The name of the `ReceiveTriggerWebhook` to retrieve.
1594
+ // Format: `projects/{project}/locations/{location}/triggers/{trigger}`
1595
+ string name = 5 ;
1596
+
1454
1597
// HTTP request body.
1455
1598
google.api.HttpBody body = 1 ;
1456
1599
0 commit comments