Skip to main content

releases

Creates, updates, deletes, gets or lists a releases resource.

Overview

Namereleases
TypeResource
Idgoogle.clouddeploy.releases

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Name of the Release. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}. The release component must match [a-z]([a-z0-9-]{0,61}[a-z0-9])?
abandonedbooleanOutput only. Indicates whether this is an abandoned release.
annotationsobjectOptional. User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
buildArtifactsarrayOptional. List of artifacts to pass through to Skaffold command.
conditionobjectOutput only. Information around the state of the Release. (id: ReleaseCondition)
createTimestring (google-datetime)Output only. Time at which the Release was created.
customTargetTypeSnapshotsarrayOutput only. Snapshot of the custom target types referenced by the targets taken at release creation time.
deliveryPipelineSnapshotobjectA DeliveryPipeline resource in the Cloud Deploy API. A DeliveryPipeline defines a pipeline through which a Skaffold configuration can progress. (id: DeliveryPipeline)
deployParametersobjectOptional. The deploy parameters to use for all targets in this release.
descriptionstringOptional. Description of the Release. Max length is 255 characters.
etagstringThis checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
labelsobjectLabels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
renderEndTimestring (google-datetime)Output only. Time at which the render completed.
renderStartTimestring (google-datetime)Output only. Time at which the render began.
renderStatestringOutput only. Current state of the render operation.
skaffoldConfigPathstringOptional. Filepath of the Skaffold config inside of the config URI.
skaffoldConfigUristringOptional. Cloud Storage URI of tar.gz archive containing Skaffold configuration.
skaffoldVersionstringOptional. The Skaffold version to use when operating on this release, such as "1.20.0". Not all versions are valid; Cloud Deploy supports a specific set of versions. If unset, the most recent supported Skaffold version will be used.
targetArtifactsobjectOutput only. Map from target ID to the target artifacts created during the render operation.
targetRendersobjectOutput only. Map from target ID to details of the render operation for that target.
targetSnapshotsarrayOutput only. Snapshot of the targets taken at release creation time.
uidstringOutput only. Unique identifier of the Release.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, deliveryPipelinesId, releasesIdGets details of a single Release.
listselectprojectsId, locationsId, deliveryPipelinesIdpageSize, pageToken, filter, orderByLists Releases in a given project and location.
createinsertprojectsId, locationsId, deliveryPipelinesIdreleaseId, requestId, validateOnly, overrideDeployPolicyCreates a new Release in a given project and location.
abandonexecprojectsId, locationsId, deliveryPipelinesId, releasesIdAbandons a Release in the Delivery Pipeline.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deliveryPipelinesIdstring
locationsIdstring
projectsIdstring
releasesIdstring
filterstring
orderBystring
overrideDeployPolicystring
pageSizeinteger (int32)
pageTokenstring
releaseIdstring
requestIdstring
validateOnlyboolean

SELECT examples

Gets details of a single Release.

SELECT
name,
abandoned,
annotations,
buildArtifacts,
condition,
createTime,
customTargetTypeSnapshots,
deliveryPipelineSnapshot,
deployParameters,
description,
etag,
labels,
renderEndTime,
renderStartTime,
renderState,
skaffoldConfigPath,
skaffoldConfigUri,
skaffoldVersion,
targetArtifacts,
targetRenders,
targetSnapshots,
uid
FROM google.clouddeploy.releases
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND deliveryPipelinesId = '{{ deliveryPipelinesId }}' -- required
AND releasesId = '{{ releasesId }}' -- required;

INSERT examples

Creates a new Release in a given project and location.

INSERT INTO google.clouddeploy.releases (
data__name,
data__description,
data__annotations,
data__labels,
data__skaffoldConfigUri,
data__skaffoldConfigPath,
data__buildArtifacts,
data__etag,
data__skaffoldVersion,
data__deployParameters,
projectsId,
locationsId,
deliveryPipelinesId,
releaseId,
requestId,
validateOnly,
overrideDeployPolicy
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ annotations }}',
'{{ labels }}',
'{{ skaffoldConfigUri }}',
'{{ skaffoldConfigPath }}',
'{{ buildArtifacts }}',
'{{ etag }}',
'{{ skaffoldVersion }}',
'{{ deployParameters }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ deliveryPipelinesId }}',
'{{ releaseId }}',
'{{ requestId }}',
'{{ validateOnly }}',
'{{ overrideDeployPolicy }}'
RETURNING
name,
done,
error,
metadata,
response
;

Lifecycle Methods

Abandons a Release in the Delivery Pipeline.

EXEC google.clouddeploy.releases.abandon 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@deliveryPipelinesId='{{ deliveryPipelinesId }}' --required,
@releasesId='{{ releasesId }}' --required;