pub struct CloudBuildClient<T> { /* private fields */ }
Expand description

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.

Implementations§

source§

impl<T> CloudBuildClient<T>
where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

source

pub fn new(inner: T) -> Self

source

pub fn with_origin(inner: T, origin: Uri) -> Self

source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> CloudBuildClient<InterceptedService<T, F>>
where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,

source

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

source

pub async fn create_build( &mut self, request: impl IntoRequest<CreateBuildRequest>, ) -> Result<Response<Operation>, Status>

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).

source

pub async fn get_build( &mut self, request: impl IntoRequest<GetBuildRequest>, ) -> Result<Response<Build>, Status>

Returns information about a previously requested build.

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

source

pub async fn list_builds( &mut self, request: impl IntoRequest<ListBuildsRequest>, ) -> Result<Response<ListBuildsResponse>, Status>

Lists previously requested builds.

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

source

pub async fn cancel_build( &mut self, request: impl IntoRequest<CancelBuildRequest>, ) -> Result<Response<Build>, Status>

Cancels a build in progress.

source

pub async fn retry_build( &mut self, request: impl IntoRequest<RetryBuildRequest>, ) -> Result<Response<Operation>, Status>

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.
source

pub async fn approve_build( &mut self, request: impl IntoRequest<ApproveBuildRequest>, ) -> Result<Response<Operation>, Status>

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.

source

pub async fn create_build_trigger( &mut self, request: impl IntoRequest<CreateBuildTriggerRequest>, ) -> Result<Response<BuildTrigger>, Status>

Creates a new BuildTrigger.

This API is experimental.

source

pub async fn get_build_trigger( &mut self, request: impl IntoRequest<GetBuildTriggerRequest>, ) -> Result<Response<BuildTrigger>, Status>

Returns information about a BuildTrigger.

This API is experimental.

source

pub async fn list_build_triggers( &mut self, request: impl IntoRequest<ListBuildTriggersRequest>, ) -> Result<Response<ListBuildTriggersResponse>, Status>

Lists existing BuildTriggers.

This API is experimental.

source

pub async fn delete_build_trigger( &mut self, request: impl IntoRequest<DeleteBuildTriggerRequest>, ) -> Result<Response<()>, Status>

Deletes a BuildTrigger by its project ID and trigger ID.

This API is experimental.

source

pub async fn update_build_trigger( &mut self, request: impl IntoRequest<UpdateBuildTriggerRequest>, ) -> Result<Response<BuildTrigger>, Status>

Updates a BuildTrigger by its project ID and trigger ID.

This API is experimental.

source

pub async fn run_build_trigger( &mut self, request: impl IntoRequest<RunBuildTriggerRequest>, ) -> Result<Response<Operation>, Status>

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.

source

pub async fn receive_trigger_webhook( &mut self, request: impl IntoRequest<ReceiveTriggerWebhookRequest>, ) -> Result<Response<ReceiveTriggerWebhookResponse>, Status>

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

source

pub async fn create_worker_pool( &mut self, request: impl IntoRequest<CreateWorkerPoolRequest>, ) -> Result<Response<Operation>, Status>

Creates a WorkerPool.

source

pub async fn get_worker_pool( &mut self, request: impl IntoRequest<GetWorkerPoolRequest>, ) -> Result<Response<WorkerPool>, Status>

Returns details of a WorkerPool.

source

pub async fn delete_worker_pool( &mut self, request: impl IntoRequest<DeleteWorkerPoolRequest>, ) -> Result<Response<Operation>, Status>

Deletes a WorkerPool.

source

pub async fn update_worker_pool( &mut self, request: impl IntoRequest<UpdateWorkerPoolRequest>, ) -> Result<Response<Operation>, Status>

Updates a WorkerPool.

source

pub async fn list_worker_pools( &mut self, request: impl IntoRequest<ListWorkerPoolsRequest>, ) -> Result<Response<ListWorkerPoolsResponse>, Status>

Lists WorkerPools.

Trait Implementations§

source§

impl<T: Clone> Clone for CloudBuildClient<T>

source§

fn clone(&self) -> CloudBuildClient<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for CloudBuildClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for CloudBuildClient<T>

§

impl<T> RefUnwindSafe for CloudBuildClient<T>
where T: RefUnwindSafe,

§

impl<T> Send for CloudBuildClient<T>
where T: Send,

§

impl<T> Sync for CloudBuildClient<T>
where T: Sync,

§

impl<T> Unpin for CloudBuildClient<T>
where T: Unpin,

§

impl<T> UnwindSafe for CloudBuildClient<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more