Reference documentation and code samples for the Google Cloud Build V1 Client class PublishLifecycleEventRequest.
Publishes 'lifecycle events' that update the high-level state of a build:
-
BuildEnqueued: When a build is scheduled.
-
InvocationAttemptStarted: When work for a build starts; there can be multiple invocations for a build (e.g. retries).
- InvocationAttemptCompleted: When work for a build finishes.
- BuildFinished: When a build is finished.
Generated from protobuf message google.devtools.build.v1.PublishLifecycleEventRequest
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ service_level
int
The interactivity of this build.
↳ build_event
Google\Cloud\Build\V1\OrderedBuildEvent
Required. The lifecycle build event. If this is a build tool event, the RPC will fail with INVALID_REQUEST.
↳ stream_timeout
Google\Protobuf\Duration
If the next event for this build or invocation (depending on the event type) hasn't been published after this duration from when {build_event} is written to BES, consider this stream expired. If this field is not set, BES backend will use its own default value.
↳ notification_keywords
array
Additional information about a build request. These are define by the event publishers, and the Build Event Service does not validate or interpret them. They are used while notifying internal systems of new builds and invocations if the OrderedBuildEvent.event type is BuildEnqueued/InvocationAttemptStarted.
↳ project_id
string
Required. The project this build is associated with. This should match the project used for the initial call to PublishLifecycleEvent (containing a BuildEnqueued message).
↳ check_preceding_lifecycle_events_present
bool
Whether to require a previously received matching parent lifecycle event for the current request's event before continuing processing. - InvocationAttemptStarted and BuildFinished events require a BuildEnqueued parent event. - InvocationAttemptFinished events require an InvocationAttemptStarted parent event.
getServiceLevel
The interactivity of this build.
int
setServiceLevel
The interactivity of this build.
var
int
$this
getBuildEvent
Required. The lifecycle build event. If this is a build tool event, the RPC will fail with INVALID_REQUEST.
hasBuildEvent
clearBuildEvent
setBuildEvent
Required. The lifecycle build event. If this is a build tool event, the RPC will fail with INVALID_REQUEST.
$this
getStreamTimeout
If the next event for this build or invocation (depending on the event type) hasn't been published after this duration from when {build_event} is written to BES, consider this stream expired. If this field is not set, BES backend will use its own default value.
hasStreamTimeout
clearStreamTimeout
setStreamTimeout
If the next event for this build or invocation (depending on the event type) hasn't been published after this duration from when {build_event} is written to BES, consider this stream expired. If this field is not set, BES backend will use its own default value.
$this
getNotificationKeywords
Additional information about a build request. These are define by the event publishers, and the Build Event Service does not validate or interpret them. They are used while notifying internal systems of new builds and invocations if the OrderedBuildEvent.event type is BuildEnqueued/InvocationAttemptStarted.
setNotificationKeywords
Additional information about a build request. These are define by the event publishers, and the Build Event Service does not validate or interpret them. They are used while notifying internal systems of new builds and invocations if the OrderedBuildEvent.event type is BuildEnqueued/InvocationAttemptStarted.
var
string[]
$this
getProjectId
Required. The project this build is associated with.
This should match the project used for the initial call to PublishLifecycleEvent (containing a BuildEnqueued message).
string
setProjectId
Required. The project this build is associated with.
This should match the project used for the initial call to PublishLifecycleEvent (containing a BuildEnqueued message).
var
string
$this
getCheckPrecedingLifecycleEventsPresent
Whether to require a previously received matching parent lifecycle event for the current request's event before continuing processing.
- InvocationAttemptStarted and BuildFinished events require a BuildEnqueued parent event.
- InvocationAttemptFinished events require an InvocationAttemptStarted parent event.
bool
setCheckPrecedingLifecycleEventsPresent
Whether to require a previously received matching parent lifecycle event for the current request's event before continuing processing.
- InvocationAttemptStarted and BuildFinished events require a BuildEnqueued parent event.
- InvocationAttemptFinished events require an InvocationAttemptStarted parent event.
var
bool
$this