Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit 599c938

Browse files
feat: Add DefaultLogsBucketBehavior to BuildOptions (#391)
* feat: Add DefaultLogsBucketBehavior to BuildOptions Committer: @arvinddayal PiperOrigin-RevId: 515431035 Source-Link: googleapis/googleapis@d129b4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/5f17a32e7da58a2060ecee9fd29fe36e6eb39847 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWYxN2EzMmU3ZGE1OGEyMDYwZWNlZTlmZDI5ZmUzNmU2ZWIzOTg0NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 9cf4f42 commit 599c938

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,6 +2674,9 @@ class BuildOptions(proto.Message):
26742674
Using a global volume in a build with only one
26752675
step is not valid as it is indicative of a build
26762676
request with an incorrect configuration.
2677+
default_logs_bucket_behavior (google.cloud.devtools.cloudbuild_v1.types.BuildOptions.DefaultLogsBucketBehavior):
2678+
Option to specify how default logs buckets
2679+
are setup.
26772680
"""
26782681

26792682
class VerifyOption(proto.Enum):
@@ -2779,6 +2782,21 @@ class LoggingMode(proto.Enum):
27792782
CLOUD_LOGGING_ONLY = 5
27802783
NONE = 4
27812784

2785+
class DefaultLogsBucketBehavior(proto.Enum):
2786+
r"""Default GCS log bucket behavior options.
2787+
2788+
Values:
2789+
DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED (0):
2790+
Unspecified.
2791+
REGIONAL_USER_OWNED_BUCKET (1):
2792+
Bucket is located in user-owned project in
2793+
the same region as the build. The builder
2794+
service account must have access to create and
2795+
write to GCS buckets in the build project.
2796+
"""
2797+
DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED = 0
2798+
REGIONAL_USER_OWNED_BUCKET = 1
2799+
27822800
class PoolOption(proto.Message):
27832801
r"""Details about how a build should be executed on a ``WorkerPool``.
27842802
@@ -2861,6 +2879,11 @@ class PoolOption(proto.Message):
28612879
number=14,
28622880
message="Volume",
28632881
)
2882+
default_logs_bucket_behavior: DefaultLogsBucketBehavior = proto.Field(
2883+
proto.ENUM,
2884+
number=21,
2885+
enum=DefaultLogsBucketBehavior,
2886+
)
28642887

28652888

28662889
class ReceiveTriggerWebhookRequest(proto.Message):

tests/unit/gapic/cloudbuild_v1/test_cloud_build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5993,6 +5993,7 @@ def test_create_build_rest(request_type):
59935993
"env": ["env_value1", "env_value2"],
59945994
"secret_env": ["secret_env_value1", "secret_env_value2"],
59955995
"volumes": {},
5996+
"default_logs_bucket_behavior": 1,
59965997
},
59975998
"log_url": "log_url_value",
59985999
"substitutions": {},
@@ -6331,6 +6332,7 @@ def test_create_build_rest_bad_request(
63316332
"env": ["env_value1", "env_value2"],
63326333
"secret_env": ["secret_env_value1", "secret_env_value2"],
63336334
"volumes": {},
6335+
"default_logs_bucket_behavior": 1,
63346336
},
63356337
"log_url": "log_url_value",
63366338
"substitutions": {},
@@ -8078,6 +8080,7 @@ def test_create_build_trigger_rest(request_type):
80788080
"env": ["env_value1", "env_value2"],
80798081
"secret_env": ["secret_env_value1", "secret_env_value2"],
80808082
"volumes": {},
8083+
"default_logs_bucket_behavior": 1,
80818084
},
80828085
"log_url": "log_url_value",
80838086
"substitutions": {},
@@ -8482,6 +8485,7 @@ def test_create_build_trigger_rest_bad_request(
84828485
"env": ["env_value1", "env_value2"],
84838486
"secret_env": ["secret_env_value1", "secret_env_value2"],
84848487
"volumes": {},
8488+
"default_logs_bucket_behavior": 1,
84858489
},
84868490
"log_url": "log_url_value",
84878491
"substitutions": {},
@@ -9682,6 +9686,7 @@ def test_update_build_trigger_rest(request_type):
96829686
"env": ["env_value1", "env_value2"],
96839687
"secret_env": ["secret_env_value1", "secret_env_value2"],
96849688
"volumes": {},
9689+
"default_logs_bucket_behavior": 1,
96859690
},
96869691
"log_url": "log_url_value",
96879692
"substitutions": {},
@@ -10089,6 +10094,7 @@ def test_update_build_trigger_rest_bad_request(
1008910094
"env": ["env_value1", "env_value2"],
1009010095
"secret_env": ["secret_env_value1", "secret_env_value2"],
1009110096
"volumes": {},
10097+
"default_logs_bucket_behavior": 1,
1009210098
},
1009310099
"log_url": "log_url_value",
1009410100
"substitutions": {},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy