Cloud Build v1 API - Class CloudBuild.CloudBuildBase (2.9.0)

[BindServiceMethod(typeof(CloudBuild), "BindService")]
public abstract class CloudBuild.CloudBuildBase

Reference documentation and code samples for the Cloud Build v1 API class CloudBuild.CloudBuildBase.

Base class for server-side implementations of CloudBuild

Inheritance

object > CloudBuild.CloudBuildBase

Namespace

Google.Cloud.CloudBuild.V1

Assembly

Google.Cloud.CloudBuild.V1.dll

Methods

ApproveBuild(ApproveBuildRequest, ServerCallContext)

public virtual Task<Operation> ApproveBuild(ApproveBuildRequest request, ServerCallContext context)

Approves or rejects a pending build.

If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call.

If rejected, the returned LRO will be immediately done.

Parameters
NameDescription
requestApproveBuildRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

CancelBuild(CancelBuildRequest, ServerCallContext)

public virtual Task<Build> CancelBuild(CancelBuildRequest request, ServerCallContext context)

Cancels a build in progress.

Parameters
NameDescription
requestCancelBuildRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskBuild

The response to send back to the client (wrapped by a task).

CreateBuild(CreateBuildRequest, ServerCallContext)

public virtual Task<Operation> CreateBuild(CreateBuildRequest request, ServerCallContext context)

Starts a build with the specified configuration.

This method returns a long-running Operation, which includes the build ID. Pass the build ID to GetBuild to determine the build status (such as SUCCESS or FAILURE).

Parameters
NameDescription
requestCreateBuildRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

CreateBuildTrigger(CreateBuildTriggerRequest, ServerCallContext)

public virtual Task<BuildTrigger> CreateBuildTrigger(CreateBuildTriggerRequest request, ServerCallContext context)

Creates a new BuildTrigger.

This API is experimental.

Parameters
NameDescription
requestCreateBuildTriggerRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskBuildTrigger

The response to send back to the client (wrapped by a task).

CreateWorkerPool(CreateWorkerPoolRequest, ServerCallContext)

public virtual Task<Operation> CreateWorkerPool(CreateWorkerPoolRequest request, ServerCallContext context)

Creates a WorkerPool.

Parameters
NameDescription
requestCreateWorkerPoolRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

DeleteBuildTrigger(DeleteBuildTriggerRequest, ServerCallContext)

public virtual Task<Empty> DeleteBuildTrigger(DeleteBuildTriggerRequest request, ServerCallContext context)

Deletes a BuildTrigger by its project ID and trigger ID.

This API is experimental.

Parameters
NameDescription
requestDeleteBuildTriggerRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskEmpty

The response to send back to the client (wrapped by a task).

DeleteWorkerPool(DeleteWorkerPoolRequest, ServerCallContext)

public virtual Task<Operation> DeleteWorkerPool(DeleteWorkerPoolRequest request, ServerCallContext context)

Deletes a WorkerPool.

Parameters
NameDescription
requestDeleteWorkerPoolRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

GetBuild(GetBuildRequest, ServerCallContext)

public virtual Task<Build> GetBuild(GetBuildRequest request, ServerCallContext context)

Returns information about a previously requested build.

The Build that is returned includes its status (such as SUCCESS, FAILURE, or WORKING), and timing information.

Parameters
NameDescription
requestGetBuildRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskBuild

The response to send back to the client (wrapped by a task).

GetBuildTrigger(GetBuildTriggerRequest, ServerCallContext)

public virtual Task<BuildTrigger> GetBuildTrigger(GetBuildTriggerRequest request, ServerCallContext context)

Returns information about a BuildTrigger.

This API is experimental.

Parameters
NameDescription
requestGetBuildTriggerRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskBuildTrigger

The response to send back to the client (wrapped by a task).

GetWorkerPool(GetWorkerPoolRequest, ServerCallContext)

public virtual Task<WorkerPool> GetWorkerPool(GetWorkerPoolRequest request, ServerCallContext context)

Returns details of a WorkerPool.

Parameters
NameDescription
requestGetWorkerPoolRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskWorkerPool

The response to send back to the client (wrapped by a task).

ListBuildTriggers(ListBuildTriggersRequest, ServerCallContext)

public virtual Task<ListBuildTriggersResponse> ListBuildTriggers(ListBuildTriggersRequest request, ServerCallContext context)

Lists existing BuildTriggers.

This API is experimental.

Parameters
NameDescription
requestListBuildTriggersRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListBuildTriggersResponse

The response to send back to the client (wrapped by a task).

ListBuilds(ListBuildsRequest, ServerCallContext)

public virtual Task<ListBuildsResponse> ListBuilds(ListBuildsRequest request, ServerCallContext context)

Lists previously requested builds.

Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.

Parameters
NameDescription
requestListBuildsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListBuildsResponse

The response to send back to the client (wrapped by a task).

ListWorkerPools(ListWorkerPoolsRequest, ServerCallContext)

public virtual Task<ListWorkerPoolsResponse> ListWorkerPools(ListWorkerPoolsRequest request, ServerCallContext context)

Lists WorkerPools.

Parameters
NameDescription
requestListWorkerPoolsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListWorkerPoolsResponse

The response to send back to the client (wrapped by a task).

ReceiveTriggerWebhook(ReceiveTriggerWebhookRequest, ServerCallContext)

public virtual Task<ReceiveTriggerWebhookResponse> ReceiveTriggerWebhook(ReceiveTriggerWebhookRequest request, ServerCallContext context)

ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.

Parameters
NameDescription
requestReceiveTriggerWebhookRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskReceiveTriggerWebhookResponse

The response to send back to the client (wrapped by a task).

RetryBuild(RetryBuildRequest, ServerCallContext)

public virtual Task<Operation> RetryBuild(RetryBuildRequest request, ServerCallContext context)

Creates a new build based on the specified build.

This method creates a new build using the original build request, which may or may not result in an identical build.

For triggered builds:

  • Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.

For non-triggered builds that specify RepoSource:

  • If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
  • If the original build specified a commit sha or revision ID, the retried build will use the identical source.

For builds that specify StorageSource:

  • If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
  • If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.
Parameters
NameDescription
requestRetryBuildRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

RunBuildTrigger(RunBuildTriggerRequest, ServerCallContext)

public virtual Task<Operation> RunBuildTrigger(RunBuildTriggerRequest request, ServerCallContext context)

Runs a BuildTrigger at a particular source revision.

To run a regional or global trigger, use the POST request that includes the location endpoint in the path (ex. v1/projects/{projectId}/locations/{region}/triggers/{triggerId}:run). The POST request that does not include the location endpoint in the path can only be used when running global triggers.

Parameters
NameDescription
requestRunBuildTriggerRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

UpdateBuildTrigger(UpdateBuildTriggerRequest, ServerCallContext)

public virtual Task<BuildTrigger> UpdateBuildTrigger(UpdateBuildTriggerRequest request, ServerCallContext context)

Updates a BuildTrigger by its project ID and trigger ID.

This API is experimental.

Parameters
NameDescription
requestUpdateBuildTriggerRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskBuildTrigger

The response to send back to the client (wrapped by a task).

UpdateWorkerPool(UpdateWorkerPoolRequest, ServerCallContext)

public virtual Task<Operation> UpdateWorkerPool(UpdateWorkerPoolRequest request, ServerCallContext context)

Updates a WorkerPool.

Parameters
NameDescription
requestUpdateWorkerPoolRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).