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

Commit 76564e8

Browse files
feat: Implementation of Build Failure Info: - Added message FailureInfo field (#132)
PiperOrigin-RevId: 385847244 Source-Link: googleapis/googleapis@f84d1e2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ff9cf56d0746b8507fede7dafc5e77cb25203e90
1 parent 2ea98bd commit 76564e8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

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

+31
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,9 @@ class Build(proto.Message):
585585
warnings (Sequence[google.cloud.devtools.cloudbuild_v1.types.Build.Warning]):
586586
Output only. Non-fatal problems encountered
587587
during the execution of the build.
588+
failure_info (google.cloud.devtools.cloudbuild_v1.types.Build.FailureInfo):
589+
Output only. Contains information about the
590+
build when status=FAILURE.
588591
"""
589592

590593
class Status(proto.Enum):
@@ -620,6 +623,33 @@ class Priority(proto.Enum):
620623
text = proto.Field(proto.STRING, number=1,)
621624
priority = proto.Field(proto.ENUM, number=2, enum="Build.Warning.Priority",)
622625

626+
class FailureInfo(proto.Message):
627+
r"""A fatal problem encountered during the execution of the
628+
build.
629+
630+
Attributes:
631+
type_ (google.cloud.devtools.cloudbuild_v1.types.Build.FailureInfo.FailureType):
632+
The name of the failure.
633+
detail (str):
634+
Explains the failure issue in more detail
635+
using hard-coded text.
636+
"""
637+
638+
class FailureType(proto.Enum):
639+
r"""The name of a fatal problem encountered during the execution
640+
of the build.
641+
"""
642+
FAILURE_TYPE_UNSPECIFIED = 0
643+
PUSH_FAILED = 1
644+
PUSH_IMAGE_NOT_FOUND = 2
645+
PUSH_NOT_AUTHORIZED = 3
646+
LOGGING_FAILURE = 4
647+
USER_BUILD_STEP = 5
648+
FETCH_SOURCE_FAILED = 6
649+
650+
type_ = proto.Field(proto.ENUM, number=1, enum="Build.FailureInfo.FailureType",)
651+
detail = proto.Field(proto.STRING, number=2,)
652+
623653
name = proto.Field(proto.STRING, number=45,)
624654
id = proto.Field(proto.STRING, number=1,)
625655
project_id = proto.Field(proto.STRING, number=16,)
@@ -649,6 +679,7 @@ class Priority(proto.Enum):
649679
service_account = proto.Field(proto.STRING, number=42,)
650680
available_secrets = proto.Field(proto.MESSAGE, number=47, message="Secrets",)
651681
warnings = proto.RepeatedField(proto.MESSAGE, number=49, message=Warning,)
682+
failure_info = proto.Field(proto.MESSAGE, number=51, message=FailureInfo,)
652683

653684

654685
class Artifacts(proto.Message):

0 commit comments

Comments
 (0)