rollbacks
Creates, updates, deletes, gets or lists a rollbacks
resource.
Overview
Name | rollbacks |
Type | Resource |
Id | digitalocean.apps.rollbacks |
Fields
The following fields are returned by SELECT
queries:
SELECT
not supported for this resource, use SHOW METHODS
to view available operations for the resource.
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
apps_create_rollback | insert | app_id | Rollback an app to a previous deployment. A new deployment will be created to perform the rollback. The app will be pinned to the rollback deployment preventing any new deployments from being created, either manually or through Auto Deploy on Push webhooks. To resume deployments, the rollback must be either committed or reverted. It is recommended to use the Validate App Rollback endpoint to double check if the rollback is valid and if there are any warnings. | |
apps_validate_rollback | exec | app_id | Check whether an app can be rolled back to a specific deployment. This endpoint can also be used to check if there are any warnings or validation conditions that will cause the rollback to proceed under unideal circumstances. For example, if a component must be rebuilt as part of the rollback causing it to take longer than usual. | |
apps_commit_rollback | exec | app_id | Commit an app rollback. This action permanently applies the rollback and unpins the app to resume new deployments. | |
apps_revert_rollback | exec | app_id | Revert an app rollback. This action reverts the active rollback by creating a new deployment from the latest app spec prior to the rollback and unpins the app to resume new deployments. |
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.
Name | Datatype | Description |
---|---|---|
app_id | string | The app ID (example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf) |
INSERT
examples
- apps_create_rollback
- Manifest
Rollback an app to a previous deployment. A new deployment will be created to perform the rollback.
The app will be pinned to the rollback deployment preventing any new deployments from being created,
either manually or through Auto Deploy on Push webhooks. To resume deployments, the rollback must be
either committed or reverted.
It is recommended to use the Validate App Rollback endpoint to double check if the rollback is
valid and if there are any warnings.
INSERT INTO digitalocean.apps.rollbacks (
data__deployment_id,
data__skip_pin,
app_id
)
SELECT
'{{ deployment_id }}',
{{ skip_pin }},
'{{ app_id }}'
RETURNING
deployment
;
# Description fields are for documentation purposes
- name: rollbacks
props:
- name: app_id
value: string
description: Required parameter for the rollbacks resource.
- name: deployment_id
value: string
description: >
The ID of the deployment to rollback to.
- name: skip_pin
value: boolean
description: >
Whether to skip pinning the rollback deployment. If false, the rollback deployment will be pinned and any new deployments including Auto Deploy on Push hooks will be disabled until the rollback is either manually committed or reverted via the CommitAppRollback or RevertAppRollback endpoints respectively. If true, the rollback will be immediately committed and the app will remain unpinned.
Lifecycle Methods
- apps_validate_rollback
- apps_commit_rollback
- apps_revert_rollback
Check whether an app can be rolled back to a specific deployment. This endpoint can also be used
to check if there are any warnings or validation conditions that will cause the rollback to proceed
under unideal circumstances. For example, if a component must be rebuilt as part of the rollback
causing it to take longer than usual.
EXEC digitalocean.apps.rollbacks.apps_validate_rollback
@app_id='{{ app_id }}' --required
@@json=
'{
"deployment_id": "{{ deployment_id }}",
"skip_pin": {{ skip_pin }}
}';
Commit an app rollback. This action permanently applies the rollback and unpins the app to resume new deployments.
EXEC digitalocean.apps.rollbacks.apps_commit_rollback
@app_id='{{ app_id }}' --required;
Revert an app rollback. This action reverts the active rollback by creating a new deployment from the
latest app spec prior to the rollback and unpins the app to resume new deployments.
EXEC digitalocean.apps.rollbacks.apps_revert_rollback
@app_id='{{ app_id }}' --required;