@@ -882,8 +882,9 @@ message Results {
882882 // corresponding to build step indices.
883883 //
884884 // [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders)
885- // can produce this output by writing to `$BUILDER_OUTPUT/output`.
886- // Only the first 4KB of data is stored.
885+ // can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the
886+ // first 50KB of data is stored. Note that the `$BUILDER_OUTPUT` variable is
887+ // read-only and can't be substituted.
887888 repeated bytes build_step_outputs = 6 ;
888889
889890 // Time to push all non-container artifacts to Cloud Storage.
@@ -940,6 +941,8 @@ message Build {
940941 type : "cloudbuild.googleapis.com/Build"
941942 pattern : "projects/{project}/builds/{build}"
942943 pattern : "projects/{project}/locations/{location}/builds/{build}"
944+ plural : "builds"
945+ singular : "build"
943946 };
944947
945948 // Possible status of a build or build step.
@@ -1172,6 +1175,9 @@ message Build {
11721175 // build.
11731176 repeated Warning warnings = 49 [(google.api.field_behavior ) = OUTPUT_ONLY ];
11741177
1178+ // Optional. Configuration for git operations.
1179+ GitConfig git_config = 48 [(google.api.field_behavior ) = OPTIONAL ];
1180+
11751181 // Output only. Contains information about the build when status=FAILURE.
11761182 FailureInfo failure_info = 51 [(google.api.field_behavior ) = OUTPUT_ONLY ];
11771183
@@ -1230,6 +1236,24 @@ message Dependency {
12301236 }
12311237}
12321238
1239+ // GitConfig is a configuration for git operations.
1240+ message GitConfig {
1241+ // HttpConfig is a configuration for HTTP related git operations.
1242+ message HttpConfig {
1243+ // SecretVersion resource of the HTTP proxy URL. The Service Account used in
1244+ // the build (either the default Service Account or
1245+ // user-specified Service Account) should have
1246+ // `secretmanager.versions.access` permissions on this secret. The proxy URL
1247+ // should be in format `[protocol://][user[:password]@]proxyhost[:port]`.
1248+ string proxy_secret_version_name = 1 [(google.api.resource_reference ) = {
1249+ type : "secretmanager.googleapis.com/SecretVersion"
1250+ }];
1251+ }
1252+
1253+ // Configuration for HTTP related git operations.
1254+ HttpConfig http = 1 ;
1255+ }
1256+
12331257// Artifacts produced by a build that should be uploaded upon
12341258// successful completion of all build steps.
12351259message Artifacts {
@@ -1944,8 +1968,9 @@ message BuildTrigger {
19441968
19451969 // The service account used for all user-controlled operations including
19461970 // UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
1947- // If no service account is set, then the standard Cloud Build service account
1948- // ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
1971+ // If no service account is set and the legacy Cloud Build service account
1972+ // (`[PROJECT_NUM]@cloudbuild.gserviceaccount.com`) is the default for the
1973+ // project then it will be used instead.
19491974 // Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
19501975 string service_account = 33 [(google.api.resource_reference ) = {
19511976 type : "iam.googleapis.com/ServiceAccount"
@@ -2097,21 +2122,36 @@ message WebhookConfig {
20972122 // Only populated on get requests.
20982123 State state = 4 ;
20992124}
2100-
21012125// PullRequestFilter contains filter properties for matching GitHub Pull
21022126// Requests.
21032127message PullRequestFilter {
2104- // Controls behavior of Pull Request comments.
2128+ // Controls whether or not a `/gcbrun` comment is required from a user with
2129+ // repository write permission or above in order to
2130+ // trigger Build runs for pull requests. Pull Request update events differ
2131+ // between repo types.
2132+ // Check repo specific guides
2133+ // ([GitHub](https://cloud.google.com/build/docs/automating-builds/github/build-repos-from-github-enterprise#creating_a_github_enterprise_trigger),
2134+ // [Bitbucket](https://cloud.google.com/build/docs/automating-builds/bitbucket/build-repos-from-bitbucket-server#creating_a_bitbucket_server_trigger),
2135+ // [GitLab](https://cloud.google.com/build/docs/automating-builds/gitlab/build-repos-from-gitlab#creating_a_gitlab_trigger)
2136+ // for details.
21052137 enum CommentControl {
2106- // Do not require comments on Pull Requests before builds are triggered.
2138+ // Do not require `/gcbrun` comments from a user with repository write
2139+ // permission or above on pull requests before builds are triggered.
2140+ // Comments that contain `/gcbrun` will still fire builds so this should
2141+ // be thought of as comments not required.
21072142 COMMENTS_DISABLED = 0 ;
21082143
2109- // Enforce that repository owners or collaborators must comment on Pull
2110- // Requests before builds are triggered.
2144+ // Builds will only fire in response to pull requests if:
2145+ // 1. The pull request author has repository write permission or above and
2146+ // `/gcbrun` is in the PR description.
2147+ // 2. A user with repository writer permissions or above comments `/gcbrun`
2148+ // on a pull request authored by any user.
21112149 COMMENTS_ENABLED = 1 ;
21122150
2113- // Enforce that repository owners or collaborators must comment on external
2114- // contributors' Pull Requests before builds are triggered.
2151+ // Builds will only fire in response to pull requests if:
2152+ // 1. The pull request author is a repository writer or above.
2153+ // 2. If the author does not have write permissions, a user with write
2154+ // permissions or above must comment `/gcbrun` in order to fire a build.
21152155 COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2 ;
21162156 }
21172157
@@ -2125,8 +2165,14 @@ message PullRequestFilter {
21252165 string branch = 2 ;
21262166 }
21272167
2128- // Configure builds to run whether a repository owner or collaborator need to
2129- // comment `/gcbrun`.
2168+ // If CommentControl is enabled, depending on the setting, builds may not
2169+ // fire until a repository writer comments `/gcbrun` on a pull
2170+ // request or `/gcbrun` is in the pull request description.
2171+ // Only PR comments that contain `/gcbrun` will trigger builds.
2172+ //
2173+ // If CommentControl is set to disabled, comments with `/gcbrun` from a user
2174+ // with repository write permission or above will
2175+ // still trigger builds to run.
21302176 CommentControl comment_control = 5 ;
21312177
21322178 // If true, branches that do NOT match the git_ref will trigger a build.
@@ -2378,7 +2424,7 @@ message BuildOptions {
23782424 // "disk free"; some of the space will be used by the operating system and
23792425 // build utilities. Also note that this is the minimum disk size that will be
23802426 // allocated for the build -- the build may run with a larger disk than
2381- // requested. At present, the maximum disk size is 2000GB ; builds that request
2427+ // requested. At present, the maximum disk size is 4000GB ; builds that request
23822428 // more than the maximum are rejected with an error.
23832429 int64 disk_size_gb = 6 ;
23842430
@@ -2477,6 +2523,8 @@ message ReceiveTriggerWebhookRequest {
24772523// ReceiveTriggerWebhook method.
24782524message ReceiveTriggerWebhookResponse {}
24792525
2526+ // GitHubEnterpriseConfig represents a configuration for a GitHub Enterprise
2527+ // server.
24802528message GitHubEnterpriseConfig {
24812529 option (google.api.resource ) = {
24822530 type : "cloudbuild.googleapis.com/GithubEnterpriseConfig"
0 commit comments