public sealed class CloudBuildClientImpl : CloudBuildClient
CloudBuild client wrapper implementation, for convenient use.
Namespace
Google.Cloud.CloudBuild.V1Assembly
Google.Cloud.CloudBuild.V1.dll
Remarks
Creates and manages builds on Google Cloud Platform.
The main concept used by this API is a Build
, which describes the location
of the source to build, how to build the source, and where to store the
built artifacts, if any.
A user can list previously-requested builds or get builds by their ID to determine the status of the build.
Constructors
CloudBuildClientImpl(CloudBuild.CloudBuildClient, CloudBuildSettings)
public CloudBuildClientImpl(CloudBuild.CloudBuildClient grpcClient, CloudBuildSettings settings)
Constructs a client wrapper for the CloudBuild service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient | CloudBuild.CloudBuildClient The underlying gRPC client. |
settings | CloudBuildSettings The base CloudBuildSettings used within this client. |
Properties
CreateBuildOperationsClient
public override OperationsClient CreateBuildOperationsClient { get; }
The long-running operations client for CreateBuild
.
Property Value | |
---|---|
Type | Description |
Google.LongRunning.OperationsClient |
GrpcClient
public override CloudBuild.CloudBuildClient GrpcClient { get; }
The underlying gRPC CloudBuild client
Property Value | |
---|---|
Type | Description |
CloudBuild.CloudBuildClient |
RetryBuildOperationsClient
public override OperationsClient RetryBuildOperationsClient { get; }
The long-running operations client for RetryBuild
.
Property Value | |
---|---|
Type | Description |
Google.LongRunning.OperationsClient |
RunBuildTriggerOperationsClient
public override OperationsClient RunBuildTriggerOperationsClient { get; }
The long-running operations client for RunBuildTrigger
.
Property Value | |
---|---|
Type | Description |
Google.LongRunning.OperationsClient |
Methods
CancelBuild(CancelBuildRequest, CallSettings)
public override Build CancelBuild(CancelBuildRequest request, CallSettings callSettings = null)
Cancels a build in progress.
Parameters | |
---|---|
Name | Description |
request | CancelBuildRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Build | The RPC response. |
CancelBuildAsync(CancelBuildRequest, CallSettings)
public override Task<Build> CancelBuildAsync(CancelBuildRequest request, CallSettings callSettings = null)
Cancels a build in progress.
Parameters | |
---|---|
Name | Description |
request | CancelBuildRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Build> | A Task containing the RPC response. |
CreateBuild(CreateBuildRequest, CallSettings)
public override Operation<Build, BuildOperationMetadata> CreateBuild(CreateBuildRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | CreateBuildRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Google.LongRunning.Operation<Build, BuildOperationMetadata> | The RPC response. |
CreateBuildAsync(CreateBuildRequest, CallSettings)
public override Task<Operation<Build, BuildOperationMetadata>> CreateBuildAsync(CreateBuildRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | CreateBuildRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Build, BuildOperationMetadata>> | A Task containing the RPC response. |
CreateBuildTrigger(CreateBuildTriggerRequest, CallSettings)
public override BuildTrigger CreateBuildTrigger(CreateBuildTriggerRequest request, CallSettings callSettings = null)
Creates a new BuildTrigger
.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | CreateBuildTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BuildTrigger | The RPC response. |
CreateBuildTriggerAsync(CreateBuildTriggerRequest, CallSettings)
public override Task<BuildTrigger> CreateBuildTriggerAsync(CreateBuildTriggerRequest request, CallSettings callSettings = null)
Creates a new BuildTrigger
.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | CreateBuildTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<BuildTrigger> | A Task containing the RPC response. |
CreateWorkerPool(CreateWorkerPoolRequest, CallSettings)
public override WorkerPool CreateWorkerPool(CreateWorkerPoolRequest request, CallSettings callSettings = null)
Creates a WorkerPool
to run the builds, and returns the new worker pool.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | CreateWorkerPoolRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WorkerPool | The RPC response. |
CreateWorkerPoolAsync(CreateWorkerPoolRequest, CallSettings)
public override Task<WorkerPool> CreateWorkerPoolAsync(CreateWorkerPoolRequest request, CallSettings callSettings = null)
Creates a WorkerPool
to run the builds, and returns the new worker pool.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | CreateWorkerPoolRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<WorkerPool> | A Task containing the RPC response. |
DeleteBuildTrigger(DeleteBuildTriggerRequest, CallSettings)
public override void DeleteBuildTrigger(DeleteBuildTriggerRequest request, CallSettings callSettings = null)
Deletes a BuildTrigger
by its project ID and trigger ID.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | DeleteBuildTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
DeleteBuildTriggerAsync(DeleteBuildTriggerRequest, CallSettings)
public override Task DeleteBuildTriggerAsync(DeleteBuildTriggerRequest request, CallSettings callSettings = null)
Deletes a BuildTrigger
by its project ID and trigger ID.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | DeleteBuildTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
DeleteWorkerPool(DeleteWorkerPoolRequest, CallSettings)
public override void DeleteWorkerPool(DeleteWorkerPoolRequest request, CallSettings callSettings = null)
Deletes a WorkerPool
by its project ID and WorkerPool name.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | DeleteWorkerPoolRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
DeleteWorkerPoolAsync(DeleteWorkerPoolRequest, CallSettings)
public override Task DeleteWorkerPoolAsync(DeleteWorkerPoolRequest request, CallSettings callSettings = null)
Deletes a WorkerPool
by its project ID and WorkerPool name.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | DeleteWorkerPoolRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
GetBuild(GetBuildRequest, CallSettings)
public override Build GetBuild(GetBuildRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | GetBuildRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Build | The RPC response. |
GetBuildAsync(GetBuildRequest, CallSettings)
public override Task<Build> GetBuildAsync(GetBuildRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | GetBuildRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Build> | A Task containing the RPC response. |
GetBuildTrigger(GetBuildTriggerRequest, CallSettings)
public override BuildTrigger GetBuildTrigger(GetBuildTriggerRequest request, CallSettings callSettings = null)
Returns information about a BuildTrigger
.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | GetBuildTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BuildTrigger | The RPC response. |
GetBuildTriggerAsync(GetBuildTriggerRequest, CallSettings)
public override Task<BuildTrigger> GetBuildTriggerAsync(GetBuildTriggerRequest request, CallSettings callSettings = null)
Returns information about a BuildTrigger
.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | GetBuildTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<BuildTrigger> | A Task containing the RPC response. |
GetWorkerPool(GetWorkerPoolRequest, CallSettings)
public override WorkerPool GetWorkerPool(GetWorkerPoolRequest request, CallSettings callSettings = null)
Returns information about a WorkerPool
.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | GetWorkerPoolRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WorkerPool | The RPC response. |
GetWorkerPoolAsync(GetWorkerPoolRequest, CallSettings)
public override Task<WorkerPool> GetWorkerPoolAsync(GetWorkerPoolRequest request, CallSettings callSettings = null)
Returns information about a WorkerPool
.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | GetWorkerPoolRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<WorkerPool> | A Task containing the RPC response. |
ListBuilds(ListBuildsRequest, CallSettings)
public override PagedEnumerable<ListBuildsResponse, Build> ListBuilds(ListBuildsRequest request, CallSettings callSettings = null)
Lists previously requested builds.
Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
Parameters | |
---|---|
Name | Description |
request | ListBuildsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListBuildsResponse, Build> | A pageable sequence of Build resources. |
ListBuildsAsync(ListBuildsRequest, CallSettings)
public override PagedAsyncEnumerable<ListBuildsResponse, Build> ListBuildsAsync(ListBuildsRequest request, CallSettings callSettings = null)
Lists previously requested builds.
Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
Parameters | |
---|---|
Name | Description |
request | ListBuildsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListBuildsResponse, Build> | A pageable asynchronous sequence of Build resources. |
ListBuildTriggers(ListBuildTriggersRequest, CallSettings)
public override PagedEnumerable<ListBuildTriggersResponse, BuildTrigger> ListBuildTriggers(ListBuildTriggersRequest request, CallSettings callSettings = null)
Lists existing BuildTrigger
s.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | ListBuildTriggersRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListBuildTriggersResponse, BuildTrigger> | A pageable sequence of BuildTrigger resources. |
ListBuildTriggersAsync(ListBuildTriggersRequest, CallSettings)
public override PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger> ListBuildTriggersAsync(ListBuildTriggersRequest request, CallSettings callSettings = null)
Lists existing BuildTrigger
s.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | ListBuildTriggersRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListBuildTriggersResponse, BuildTrigger> | A pageable asynchronous sequence of BuildTrigger resources. |
ListWorkerPools(ListWorkerPoolsRequest, CallSettings)
public override ListWorkerPoolsResponse ListWorkerPools(ListWorkerPoolsRequest request, CallSettings callSettings = null)
List project's WorkerPools
.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | ListWorkerPoolsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListWorkerPoolsResponse | The RPC response. |
ListWorkerPoolsAsync(ListWorkerPoolsRequest, CallSettings)
public override Task<ListWorkerPoolsResponse> ListWorkerPoolsAsync(ListWorkerPoolsRequest request, CallSettings callSettings = null)
List project's WorkerPools
.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | ListWorkerPoolsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ListWorkerPoolsResponse> | A Task containing the RPC response. |
RetryBuild(RetryBuildRequest, CallSettings)
public override Operation<Build, BuildOperationMetadata> RetryBuild(RetryBuildRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | RetryBuildRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Google.LongRunning.Operation<Build, BuildOperationMetadata> | The RPC response. |
RetryBuildAsync(RetryBuildRequest, CallSettings)
public override Task<Operation<Build, BuildOperationMetadata>> RetryBuildAsync(RetryBuildRequest request, CallSettings callSettings = null)
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 | |
---|---|
Name | Description |
request | RetryBuildRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Build, BuildOperationMetadata>> | A Task containing the RPC response. |
RunBuildTrigger(RunBuildTriggerRequest, CallSettings)
public override Operation<Build, BuildOperationMetadata> RunBuildTrigger(RunBuildTriggerRequest request, CallSettings callSettings = null)
Runs a BuildTrigger
at a particular source revision.
Parameters | |
---|---|
Name | Description |
request | RunBuildTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Google.LongRunning.Operation<Build, BuildOperationMetadata> | The RPC response. |
RunBuildTriggerAsync(RunBuildTriggerRequest, CallSettings)
public override Task<Operation<Build, BuildOperationMetadata>> RunBuildTriggerAsync(RunBuildTriggerRequest request, CallSettings callSettings = null)
Runs a BuildTrigger
at a particular source revision.
Parameters | |
---|---|
Name | Description |
request | RunBuildTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Build, BuildOperationMetadata>> | A Task containing the RPC response. |
UpdateBuildTrigger(UpdateBuildTriggerRequest, CallSettings)
public override BuildTrigger UpdateBuildTrigger(UpdateBuildTriggerRequest request, CallSettings callSettings = null)
Updates a BuildTrigger
by its project ID and trigger ID.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | UpdateBuildTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BuildTrigger | The RPC response. |
UpdateBuildTriggerAsync(UpdateBuildTriggerRequest, CallSettings)
public override Task<BuildTrigger> UpdateBuildTriggerAsync(UpdateBuildTriggerRequest request, CallSettings callSettings = null)
Updates a BuildTrigger
by its project ID and trigger ID.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | UpdateBuildTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<BuildTrigger> | A Task containing the RPC response. |
UpdateWorkerPool(UpdateWorkerPoolRequest, CallSettings)
public override WorkerPool UpdateWorkerPool(UpdateWorkerPoolRequest request, CallSettings callSettings = null)
Update a WorkerPool
.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | UpdateWorkerPoolRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
WorkerPool | The RPC response. |
UpdateWorkerPoolAsync(UpdateWorkerPoolRequest, CallSettings)
public override Task<WorkerPool> UpdateWorkerPoolAsync(UpdateWorkerPoolRequest request, CallSettings callSettings = null)
Update a WorkerPool
.
This API is experimental.
Parameters | |
---|---|
Name | Description |
request | UpdateWorkerPoolRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<WorkerPool> | A Task containing the RPC response. |