class ProjectsBuilds extends Resource (View source)

The "builds" collection of methods.

Typical usage is:

 $cloudbuildService = new Google\Service\CloudBuild(...);
 $builds = $cloudbuildService->projects_builds;

Methods

approve(string $name, ApproveBuildRequest $postBody, array $optParams = [])

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. (builds.approve)

cancel(string $projectId, string $id, CancelBuildRequest $postBody, array $optParams = [])

Cancels a build in progress. (builds.cancel)

create(string $projectId, Build $postBody, array $optParams = [])

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

get(string $projectId, string $id, array $optParams = [])

Returns information about a previously requested build. The Build that is returned includes its status (such as SUCCESS, FAILURE, or WORKING), and timing information. (builds.get)

listProjectsBuilds(string $projectId, array $optParams = [])

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

retry(string $projectId, string $id, RetryBuildRequest $postBody, array $optParams = [])

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.

Details

Operation approve(string $name, ApproveBuildRequest $postBody, array $optParams = [])

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. (builds.approve)

Parameters

string $name

Required. Name of the target build. For example: "projects/{$project_id}/builds/{$build_id}"

ApproveBuildRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Build cancel(string $projectId, string $id, CancelBuildRequest $postBody, array $optParams = [])

Cancels a build in progress. (builds.cancel)

Parameters

string $projectId

Required. ID of the project.

string $id

Required. ID of the build.

CancelBuildRequest $postBody
array $optParams

Optional parameters.

Return Value

Build

Operation create(string $projectId, Build $postBody, array $optParams = [])

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

(builds.create)

Parameters

string $projectId

Required. ID of the project.

Build $postBody
array $optParams

Optional parameters.

Return Value

Operation

Build get(string $projectId, string $id, array $optParams = [])

Returns information about a previously requested build. The Build that is returned includes its status (such as SUCCESS, FAILURE, or WORKING), and timing information. (builds.get)

Parameters

string $projectId

Required. ID of the project.

string $id

Required. ID of the build.

array $optParams

Optional parameters.

Return Value

Build

ListBuildsResponse listProjectsBuilds(string $projectId, array $optParams = [])

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

(builds.listProjectsBuilds)

Parameters

string $projectId

Required. ID of the project.

array $optParams

Optional parameters.

Return Value

ListBuildsResponse

Operation retry(string $projectId, string $id, RetryBuildRequest $postBody, array $optParams = [])

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. (builds.retry)

Parameters

string $projectId

Required. ID of the project.

string $id

Required. Build ID of the original build.

RetryBuildRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation