15.4 CI/CD Pipeline and Rollback¶
Sprint: Sprint 15 - Deployment
Feature ID: 15.4
Subtasks: 15.4.1, 15.4.2, 15.4.3
Objective¶
Deliver "CI/CD Pipeline and Rollback" within Sprint 15 - Deployment.
Dependencies¶
Aggregated from the subtasks below (prerequisite task IDs and enablers):
- 15.1.2
- 15.2.2
- 15.4.1
- 15.4.2
Subtasks¶
15.4.1 Deploy stage¶
- ID: 15.4.1
- Title: Add deploy-to-cluster CI/CD stage
- Description: Pipeline stage applying manifests/Helm to the target cluster after build-test-scan-push, gated by environment approval (ADR-014: build -> test -> docker push -> kubectl/helm apply).
- Business Purpose: Automated, gated delivery to the cluster (ADR-014).
- Inputs: ADR-014, 15.1.2.
- Outputs: Deploy stage in the pipeline.
- Acceptance Criteria:
- A successful pipeline deploys the updated services to the target environment.
- Dependencies: 15.1.2, 15.2.2
- Complexity: M
15.4.2 Rollback procedure¶
- ID: 15.4.2
- Title: Implement and verify rollback
- Description: A rollback path (Helm rollback / previous-revision redeploy) and a documented runbook; verify by deploying a deliberately broken revision and rolling back (ADR-014).
- Business Purpose: Fast recovery from a bad deploy (NFR-04, ADR-014).
- Inputs: ADR-014.
- Outputs: Rollback runbook + verification.
- Acceptance Criteria:
- A broken deploy is detected (failing readiness) and rolled back to the last good revision with service restored.
- Dependencies: 15.4.1
- Complexity: M
15.4.3 Smoke tests post-deploy¶
- ID: 15.4.3
- Title: Run post-deploy smoke tests
- Description: A smoke-test stage hitting health endpoints and one happy-path flow (login + a read) through the gateway after deploy, failing the pipeline (and triggering rollback) on failure.
- Business Purpose: Catch broken deploys before they take traffic (NFR-04).
- Inputs: 15.4.1.
- Outputs: Smoke-test stage.
- Acceptance Criteria:
- The smoke stage passes on a healthy deploy and fails on a broken one, triggering rollback.
- Dependencies: 15.4.1, 15.4.2
- Complexity: S
Acceptance Criteria¶
Each subtask above carries its own objective, testable acceptance criteria. This feature is complete when every subtask's acceptance criteria are met.
Deliverables¶
- Deploy stage in the pipeline.
- Rollback runbook + verification.
- Smoke-test stage.
Definition of Done¶
- All subtasks (15.4.1, 15.4.2, 15.4.3) completed and their acceptance criteria verified.
- All listed dependencies satisfied.
- Build and tests green per the global conventions in ../README.md (Section 3).