Class CloudBuild.CloudBuildBase (1.1.0)

[BindServiceMethod(typeof(CloudBuild), "BindService")]
public abstract class 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

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
Task<Build>

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
Task<Google.LongRunning.Operation>

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
Task<BuildTrigger>

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

CreateWorkerPool(CreateWorkerPoolRequest, ServerCallContext)

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

Creates a WorkerPool to run the builds, and returns the new worker pool.

This API is experimental.

Parameters
NameDescription
requestCreateWorkerPoolRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<WorkerPool>

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
Task<Empty>

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

DeleteWorkerPool(DeleteWorkerPoolRequest, ServerCallContext)

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

Deletes a WorkerPool by its project ID and WorkerPool name.

This API is experimental.

Parameters
NameDescription
requestDeleteWorkerPoolRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<Empty>

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
Task<Build>

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
Task<BuildTrigger>

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 information about a WorkerPool.

This API is experimental.

Parameters
NameDescription
requestGetWorkerPoolRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<WorkerPool>

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
Task<ListBuildsResponse>

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
Task<ListBuildTriggersResponse>

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

ListWorkerPools(ListWorkerPoolsRequest, ServerCallContext)

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

List project's WorkerPools.

This API is experimental.

Parameters
NameDescription
requestListWorkerPoolsRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<ListWorkerPoolsResponse>

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
Task<ReceiveTriggerWebhookResponse>

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 Google 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
Task<Google.LongRunning.Operation>

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.

Parameters
NameDescription
requestRunBuildTriggerRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<Google.LongRunning.Operation>

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
Task<BuildTrigger>

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

UpdateWorkerPool(UpdateWorkerPoolRequest, ServerCallContext)

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

Update a WorkerPool.

This API is experimental.

Parameters
NameDescription
requestUpdateWorkerPoolRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<WorkerPool>

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