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.
Parameters | |
---|---|
Name | Description |
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.
Returns | |
---|---|
Type | Description |
int |
setServiceLevel
The interactivity of this build.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getBuildEvent
Required. The lifecycle build event. If this is a build tool event, the RPC will fail with INVALID_REQUEST.
Returns | |
---|---|
Type | Description |
Google\Cloud\Build\V1\OrderedBuildEvent|null |
hasBuildEvent
clearBuildEvent
setBuildEvent
Required. The lifecycle build event. If this is a build tool event, the RPC will fail with INVALID_REQUEST.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Build\V1\OrderedBuildEvent
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Duration|null |
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.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Duration
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
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.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$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).
Returns | |
---|---|
Type | Description |
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).
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
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.
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |