Validate - Run terraform plan, lint configs, execute unit/integration tests; confirm no destructive changes before proceeding
- Determine the target environment; prepare the deployment summary, rollback command, and validation plan
Installs
3
Plan rollout
Approve and deploy - If the target is production or customer-facing, present the deployment summary and rollback plan and ask for explicit user approval; only run deployment commands after confirmation, and stop with a blocked verdict if approval is withheld. Roll out with verification; run smoke tests post-deployment
Monitor - Set up observability, alerts; confirm rollback procedure is ready before going live
Reference Guide
Load detailed guidance based on context:
Topic
Reference
Load When
GitHub Actions
references/github-actions.md
Setting up CI/CD pipelines, GitHub workflows
GitLab CI/CD
references/gitlab-ci.md
Setting up GitLab pipelines, .gitlab-ci.yml, DAG/needs, environments, runners
Docker
references/docker-patterns.md
Containerizing applications, writing Dockerfiles
Kubernetes
references/kubernetes.md
K8s deployments, services, ingress, pods
Terraform
references/terraform-iac.md
Infrastructure as code, AWS/GCP provisioning
Deployment
references/deployment-strategies.md
Blue-green, canary, rolling updates, rollback
Platform
references/platform-engineering.md
Self-service infra, developer portals, golden paths, Backstage
FROM python:3.12-slim AS builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
FROM python:3.12-slim
WORKDIR /app
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY . .
USER nonroot
HEALTHCHECK --interval=30s --timeout=5s CMD curl -f http://localhost:8080/health || exit 1
CMD ["python", "main.py"]
Rollback Procedure Example
# Kubernetes: roll back to previous deployment revision
kubectl rollout undo deployment/myapp -n production
kubectl rollout status deployment/myapp -n production
# Verify rollback succeeded
kubectl get pods -n production -l app=myapp
curl -f https://myapp.example.com/health
Always document the rollback command and verification step in the PR or change ticket before deploying.