Skip to main content

deployments

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

Overview

Namedeployments
TypeResource
Iddigitalocean.apps.deployments

Fields

NameDatatypeDescription
idstring
causestring
cloned_fromstring
created_atstring
functionsarray
jobsarray
phasestring
phase_last_updated_atstring
progressobject
servicesarray
specobjectThe desired configuration of an application.
static_sitesarray
tier_slugstring
updated_atstring
workersarray

Methods

NameAccessible byRequired ParamsDescription
apps_get_deploymentSELECTapp_id, deployment_idRetrieve information about an app deployment.
apps_list_deploymentsSELECTapp_idList all deployments of an app.
apps_create_deploymentINSERTapp_idCreating an app deployment will pull the latest changes from your repository and schedule a new deployment for your app.
apps_cancel_deploymentEXECapp_id, deployment_idImmediately cancel an in-progress deployment.

SELECT examples

List all deployments of an app.

SELECT
id,
cause,
cloned_from,
created_at,
functions,
jobs,
phase,
phase_last_updated_at,
progress,
services,
spec,
static_sites,
tier_slug,
updated_at,
workers
FROM digitalocean.apps.deployments
WHERE app_id = '{{ app_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new deployments resource.

/*+ create */
INSERT INTO digitalocean.apps.deployments (
data__force_build,
app_id
)
SELECT
'{{ force_build }}',
'{{ app_id }}'
;