Artifacts flow through three environments before reaching production: dev → staging → production.
dev ──► staging ──► production
Each promotion:
- Verifies the artifact is healthy in the source environment.
- Retags the container image in ECR.
- Updates the Kubernetes deployment in the target environment.
- Writes an audit log entry to S3.
Production promotions additionally require manual approval via a GitHub Environment.
- Go to Actions → Environment Promotion Pipeline.
- Click Run workflow.
- Fill in
artifact_version,from_env, andto_env. - For production promotions, a team lead must approve the pending job.
gh workflow run promotion-pipeline.yml \
-f artifact_version=1.4.2 \
-f from_env=dev \
-f to_env=staging| Gate | dev → staging | staging → production |
|---|---|---|
| Artifact exists in source | ✅ automated | ✅ automated |
| Manual approval | ❌ not required | ✅ required |
| Rollback on failure | ✅ automated | ✅ automated |
Rollback is triggered automatically on promotion failure. To manually rollback:
bash infrastructure/scripts/promote-artifact.sh --rollback --env stagingOr via GitHub Actions:
gh workflow run promotion-pipeline.yml \
-f artifact_version=previous \
-f from_env=staging \
-f to_env=stagingAll promotions are logged to s3://gistpin-audit-logs/promotions/YYYY/MM/DD/.
Each entry is a JSON object:
{
"time": "2026-06-23T08:00:00Z",
"version": "1.4.2",
"from": "staging",
"to": "production",
"actor": "northersubair",
"status": "success"
}