Pipelines
A pipeline is a chain of related apps — typically staging and production — where deploys flow forward via promotions. Promotion copies the slug or image from one stage to the next without rebuilding, so what you tested in staging is exactly what runs in prod.
The mental model
| Concept | What it is |
|---|---|
| Pipeline | An ordered list of stages. Belongs to one app codebase across multiple "stage" apps. |
| Stage | One apps in the chain — e.g. staging, production. Each stage is a real OwnStack app on its own stack(s). |
| Promotion | Copy a deployment from stage N to stage N+1. The same image gets re-tagged and re-released, no rebuild. |
Create a pipeline
$ ownstack app pipeline create <production-app>
$ ownstack app pipeline add-staging <production-app> <staging-app>
Or, in the dashboard: open the production app, Pipeline tab, Add staging app. The two apps must already exist; pipelines link existing apps rather than creating new ones.
Promote
$ ownstack app pipeline promote <staging-app>
This re-deploys the production app with the staging app's currently-deployed image (no new build). Migrations defined as the production app's release task still run; the postdeploy script runs once.
If your production app deploys to N stacks, a promotion enqueues N deployment jobs. They run in parallel. If you need lock-step rollout, use a pipeline stage with explicit per-stack approval.
Per-stage config
Each stage app has its own config vars, its own database, its own domain. Don't share config across stages — that's the whole point of staging.
If you have config that should be the same in every stage (a feature flag service URL, a shared logging endpoint), set it on each stage manually, or use ownstack config:push --file=… to apply the same set to multiple apps.
Review apps (when you want them back)
Heroku-style review apps — one ephemeral app per pull request — are on the roadmap but not yet first-class. The current workaround:
- A GitHub Action listens for PR events.
- On
opened, it runsownstack app clone <production-app> <pr-NNN> --stack=review-stack --deploy. - On
closed, it runsownstack app destroy <pr-NNN> --force.