Preview model
See ADR 0004 for the decision; this page is the operational summary.
Lifecycle
- Pull request opened or updated:
service-preview-deploy.ymlcomputes the preview id, assumes the preview deploy role, runscdk deploy -c env=dev -c preview=true -c previewId=<id>, writes stack outputs, posts a sticky comment with the URL and optionally runs integration tests. - Pull request closed:
service-preview-destroy.ymldestroys<id>-<Service>if it exists. - Label
skip-previewdisables step 1.
Preview id
- Branch
feature/abc-123-add-thing->abc-123 - Branch
fix-typoon PR 42 ->pr-42 - Configurable via
preview.idStrategy:ticket-then-pr(default),pr,branch-slug
What changes in a preview
- Removal policy
DESTROY, buckets auto-delete, DynamoDB PITR off, log retention 7 days - Hostname
{service}-{previewId}.{envDomain} - Tags
platform:preview-id,platform:pr-number,platform:repository