safepropel 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.propel/templates/automated-e2e-template.md +114 -0
- package/.propel/templates/automated-testing-template.md +119 -0
- package/.propel/templates/cicd-specification-template.md +249 -0
- package/.propel/templates/code-review-template.md +441 -0
- package/.propel/templates/codebase-analysis-template.md +361 -0
- package/.propel/templates/component-inventory-template.md +177 -0
- package/.propel/templates/design-analysis-template.md +43 -0
- package/.propel/templates/design-model-template.md +80 -0
- package/.propel/templates/design-reference-template.md +192 -0
- package/.propel/templates/design-specification-template.md +108 -0
- package/.propel/templates/devops-security-review-template.md +246 -0
- package/.propel/templates/epics-template.md +37 -0
- package/.propel/templates/figma-specification-template.md +339 -0
- package/.propel/templates/findings-registry-template.md +23 -0
- package/.propel/templates/iac-module-template.md +221 -0
- package/.propel/templates/infra-specification-template.md +221 -0
- package/.propel/templates/issue-triage-template.md +82 -0
- package/.propel/templates/project-plan-template.md +141 -0
- package/.propel/templates/requirements-template.md +63 -0
- package/.propel/templates/sprint-plan-template.md +83 -0
- package/.propel/templates/task-analysis-template.md +39 -0
- package/.propel/templates/task-template.md +153 -0
- package/.propel/templates/test-plan-template.md +371 -0
- package/.propel/templates/unit-test-template.md +177 -0
- package/.propel/templates/user-story-template.md +48 -0
- package/.propel/templates/wireframe-reference-template.md +187 -0
- package/.windsurf/rules/agile-methodology-guidelines.md +29 -0
- package/.windsurf/rules/ai-assistant-usage-policy.md +41 -0
- package/.windsurf/rules/angular-development-standards.md +283 -0
- package/.windsurf/rules/aspnet-webapi-standards.md +74 -0
- package/.windsurf/rules/backend-development-standards.md +60 -0
- package/.windsurf/rules/cicd-pipeline-standards.md +49 -0
- package/.windsurf/rules/cloud-architecture-standards.md +54 -0
- package/.windsurf/rules/code-anti-patterns.md +73 -0
- package/.windsurf/rules/code-documentation-standards.md +52 -0
- package/.windsurf/rules/csharp-coding-standards.md +80 -0
- package/.windsurf/rules/database-standards.md +103 -0
- package/.windsurf/rules/development-foundations.md +51 -0
- package/.windsurf/rules/dotnet-architecture-standards.md +74 -0
- package/.windsurf/rules/dry-principle-guidelines.md +63 -0
- package/.windsurf/rules/figma-design-standards.md +189 -0
- package/.windsurf/rules/frontend-development-standards.md +66 -0
- package/.windsurf/rules/gitops-standards.md +60 -0
- package/.windsurf/rules/iterative-development-guide.md +22 -0
- package/.windsurf/rules/language-agnostic-standards.md +80 -0
- package/.windsurf/rules/markdown-styleguide.md +47 -0
- package/.windsurf/rules/mcp-integration-standards.md +36 -0
- package/.windsurf/rules/mobile-development-standards.md +103 -0
- package/.windsurf/rules/performance-best-practices.md +182 -0
- package/.windsurf/rules/playwright-standards.md +114 -0
- package/.windsurf/rules/playwright-testing-guide.md +100 -0
- package/.windsurf/rules/playwright-typescript-guide.md +47 -0
- package/.windsurf/rules/react-development-standards.md +130 -0
- package/.windsurf/rules/safepropel-framework-autoload.md +358 -0
- package/.windsurf/rules/security-standards-owasp.md +45 -0
- package/.windsurf/rules/software-architecture-patterns.md +75 -0
- package/.windsurf/rules/stored-procedure-standards.md +72 -0
- package/.windsurf/rules/template-implementation-guide.md +10 -0
- package/.windsurf/rules/terraform-iac-standards.md +53 -0
- package/.windsurf/rules/typescript-styleguide.md +100 -0
- package/.windsurf/rules/ui-ux-design-standards.md +130 -0
- package/.windsurf/rules/uml-text-code-standards.md +356 -0
- package/.windsurf/rules/unit-testing-standards.md +106 -0
- package/.windsurf/rules/web-accessibility-standards.md +68 -0
- package/README.md +22 -10
- package/engine/workflow-executor.js +118 -37
- package/package.json +4 -2
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# E2E Test Workflow: [JOURNEY_NAME]
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
| Field | Value |
|
|
5
|
+
|-------|-------|
|
|
6
|
+
| Journey | [JOURNEY_NAME] |
|
|
7
|
+
| Source | [PATH_TO_SPEC] |
|
|
8
|
+
| UC Chain | [UC-001 → UC-002 → UC-003] |
|
|
9
|
+
| Base URL | [APPLICATION_URL] |
|
|
10
|
+
|
|
11
|
+
## Journey Overview
|
|
12
|
+
|
|
13
|
+
### TC-E2E-[JOURNEY_ID]-001: [JOURNEY_NAME]
|
|
14
|
+
**Type:** e2e | **Priority:** P0
|
|
15
|
+
|
|
16
|
+
**Journey Flow:**
|
|
17
|
+
| Step | Use Case | Action | Expected State |
|
|
18
|
+
|------|----------|--------|----------------|
|
|
19
|
+
| 1 | UC-001 | [ACTION] | [STATE] |
|
|
20
|
+
| 2 | UC-002 | [ACTION] | [STATE] |
|
|
21
|
+
| 3 | UC-003 | [ACTION] | [STATE] |
|
|
22
|
+
|
|
23
|
+
**Session Requirements:**
|
|
24
|
+
- Authentication: [REQUIRED/NOT_REQUIRED]
|
|
25
|
+
- State Persistence: [COOKIES/LOCAL_STORAGE/SESSION]
|
|
26
|
+
- Cleanup: [STRATEGY]
|
|
27
|
+
|
|
28
|
+
**Steps:**
|
|
29
|
+
```yaml
|
|
30
|
+
e2e_steps:
|
|
31
|
+
- phase: "UC-001: [NAME]"
|
|
32
|
+
steps:
|
|
33
|
+
- step_id: "E2E-001"
|
|
34
|
+
action: navigate
|
|
35
|
+
target: "[URL]"
|
|
36
|
+
expect: "page loads successfully"
|
|
37
|
+
|
|
38
|
+
- step_id: "E2E-002"
|
|
39
|
+
action: fill
|
|
40
|
+
target: "getByLabel('[FIELD_LABEL]')"
|
|
41
|
+
value: "[TEST_VALUE]"
|
|
42
|
+
expect: "field accepts input"
|
|
43
|
+
|
|
44
|
+
- step_id: "E2E-003"
|
|
45
|
+
action: click
|
|
46
|
+
target: "getByRole('button', {name: '[BUTTON_NAME]'})"
|
|
47
|
+
expect: "[EXPECTED_RESULT]"
|
|
48
|
+
checkpoint: true
|
|
49
|
+
|
|
50
|
+
- phase: "UC-002: [NAME]"
|
|
51
|
+
steps:
|
|
52
|
+
- step_id: "E2E-004"
|
|
53
|
+
action: verify
|
|
54
|
+
target: "getByText('[SUCCESS_MESSAGE]')"
|
|
55
|
+
expect: "visible"
|
|
56
|
+
|
|
57
|
+
- step_id: "E2E-005"
|
|
58
|
+
action: click
|
|
59
|
+
target: "getByRole('link', {name: '[LINK_NAME]'})"
|
|
60
|
+
expect: "navigation to [NEXT_PAGE]"
|
|
61
|
+
checkpoint: true
|
|
62
|
+
|
|
63
|
+
- phase: "UC-003: [NAME]"
|
|
64
|
+
steps:
|
|
65
|
+
- step_id: "E2E-006"
|
|
66
|
+
action: [ACTION_TYPE]
|
|
67
|
+
target: "[LOCATOR]"
|
|
68
|
+
expect: "[EXPECTED_RESULT]"
|
|
69
|
+
checkpoint: true
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Journey Test Data:**
|
|
73
|
+
```yaml
|
|
74
|
+
journey_data:
|
|
75
|
+
user:
|
|
76
|
+
email: "[EMAIL]"
|
|
77
|
+
password: "[PASSWORD]"
|
|
78
|
+
[entity_name]:
|
|
79
|
+
[field_1]: "[VALUE_1]"
|
|
80
|
+
[field_2]: "[VALUE_2]"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Page Objects
|
|
86
|
+
```yaml
|
|
87
|
+
pages:
|
|
88
|
+
- name: "[PageName]Page"
|
|
89
|
+
file: "pages/[page-name].page.ts"
|
|
90
|
+
elements:
|
|
91
|
+
- [elementName]: "getByRole('[role]', {name: '[name]'})"
|
|
92
|
+
- [elementName]: "getByLabel('[LABEL]')"
|
|
93
|
+
- [elementName]: "getByTestId('[TEST_ID]')"
|
|
94
|
+
actions:
|
|
95
|
+
- [methodName](params): "[PURPOSE]"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Success Criteria
|
|
99
|
+
- [ ] All journey phases complete without errors
|
|
100
|
+
- [ ] Session state maintained across phases
|
|
101
|
+
- [ ] Checkpoints validate intermediate states
|
|
102
|
+
- [ ] Journey runs independently
|
|
103
|
+
- [ ] All assertions use web-first patterns
|
|
104
|
+
|
|
105
|
+
## Locator Reference
|
|
106
|
+
| Priority | Method | Example |
|
|
107
|
+
|----------|--------|---------|
|
|
108
|
+
| 1st | getByRole | `getByRole('button', {name: 'Submit'})` |
|
|
109
|
+
| 2nd | getByTestId | `getByTestId('user-menu')` |
|
|
110
|
+
| 3rd | getByLabel | `getByLabel('Email')` |
|
|
111
|
+
| AVOID | CSS | `.btn-primary`, `#dynamic-123` |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
*Template: automated-e2e-template.md | Output: .propel/context/test/e2e_[journey].md*
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Test Workflow: [FEATURE_NAME]
|
|
2
|
+
|
|
3
|
+
## Metadata
|
|
4
|
+
| Field | Value |
|
|
5
|
+
|-------|-------|
|
|
6
|
+
| Feature | [FEATURE_NAME] |
|
|
7
|
+
| Source | [PATH_TO_SPEC] |
|
|
8
|
+
| Use Case | [UC-XXX] |
|
|
9
|
+
| Base URL | [APPLICATION_URL] |
|
|
10
|
+
|
|
11
|
+
## Test Cases
|
|
12
|
+
|
|
13
|
+
### TC-[UC_ID]-HP-001: [HAPPY_PATH_NAME]
|
|
14
|
+
**Type:** happy_path | **Priority:** P0
|
|
15
|
+
|
|
16
|
+
**Preconditions:**
|
|
17
|
+
- [PRECONDITION_1]
|
|
18
|
+
- [PRECONDITION_2]
|
|
19
|
+
|
|
20
|
+
**Steps:**
|
|
21
|
+
```yaml
|
|
22
|
+
steps:
|
|
23
|
+
- step_id: "001"
|
|
24
|
+
action: navigate
|
|
25
|
+
target: "[URL]"
|
|
26
|
+
expect: "page loads successfully"
|
|
27
|
+
|
|
28
|
+
- step_id: "002"
|
|
29
|
+
action: fill
|
|
30
|
+
target: "getByLabel('[FIELD_LABEL]')"
|
|
31
|
+
value: "[TEST_VALUE]"
|
|
32
|
+
expect: "field accepts input"
|
|
33
|
+
|
|
34
|
+
- step_id: "003"
|
|
35
|
+
action: click
|
|
36
|
+
target: "getByRole('button', {name: '[BUTTON_NAME]'})"
|
|
37
|
+
expect: "[EXPECTED_RESULT]"
|
|
38
|
+
|
|
39
|
+
- step_id: "004"
|
|
40
|
+
action: verify
|
|
41
|
+
target: "getByText('[SUCCESS_MESSAGE]')"
|
|
42
|
+
expect: "visible"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Test Data:**
|
|
46
|
+
```yaml
|
|
47
|
+
test_data:
|
|
48
|
+
[FIELD_NAME]: "[VALUE]"
|
|
49
|
+
[FIELD_NAME_2]: "[VALUE_2]"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
### TC-[UC_ID]-EC-001: [EDGE_CASE_NAME]
|
|
55
|
+
**Type:** edge_case | **Priority:** P1
|
|
56
|
+
|
|
57
|
+
**Scenario:** [BOUNDARY_CONDITION_DESCRIPTION]
|
|
58
|
+
|
|
59
|
+
**Steps:**
|
|
60
|
+
```yaml
|
|
61
|
+
steps:
|
|
62
|
+
- step_id: "EC001"
|
|
63
|
+
action: [ACTION_TYPE]
|
|
64
|
+
target: "[LOCATOR]"
|
|
65
|
+
value: "[BOUNDARY_VALUE]"
|
|
66
|
+
expect: "[EXPECTED_BEHAVIOR]"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### TC-[UC_ID]-ER-001: [ERROR_CASE_NAME]
|
|
72
|
+
**Type:** error | **Priority:** P1
|
|
73
|
+
|
|
74
|
+
**Trigger:** [WHAT_CAUSES_ERROR]
|
|
75
|
+
|
|
76
|
+
**Steps:**
|
|
77
|
+
```yaml
|
|
78
|
+
steps:
|
|
79
|
+
- step_id: "ER001"
|
|
80
|
+
action: [ACTION_TYPE]
|
|
81
|
+
target: "[LOCATOR]"
|
|
82
|
+
value: "[INVALID_VALUE]"
|
|
83
|
+
expect: "[ERROR_MESSAGE_OR_BEHAVIOR]"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Page Objects
|
|
89
|
+
```yaml
|
|
90
|
+
pages:
|
|
91
|
+
- name: "[PageName]Page"
|
|
92
|
+
file: "pages/[page-name].page.ts"
|
|
93
|
+
elements:
|
|
94
|
+
- submitButton: "getByRole('button', {name: '[NAME]'})"
|
|
95
|
+
- emailInput: "getByLabel('[LABEL]')"
|
|
96
|
+
- errorAlert: "getByRole('alert')"
|
|
97
|
+
- [elementName]: "getByTestId('[TEST_ID]')"
|
|
98
|
+
actions:
|
|
99
|
+
- login(email, password): "Fill credentials and submit"
|
|
100
|
+
- [methodName]: "[PURPOSE]"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Success Criteria
|
|
104
|
+
- [ ] All happy path steps execute without errors
|
|
105
|
+
- [ ] Edge case validations pass
|
|
106
|
+
- [ ] Error scenarios handled correctly
|
|
107
|
+
- [ ] Test runs independently (no shared state)
|
|
108
|
+
- [ ] All assertions use web-first patterns
|
|
109
|
+
|
|
110
|
+
## Locator Reference
|
|
111
|
+
| Priority | Method | Example |
|
|
112
|
+
|----------|--------|---------|
|
|
113
|
+
| 1st | getByRole | `getByRole('button', {name: 'Submit'})` |
|
|
114
|
+
| 2nd | getByTestId | `getByTestId('user-menu')` |
|
|
115
|
+
| 3rd | getByLabel | `getByLabel('Email')` |
|
|
116
|
+
| AVOID | CSS | `.btn-primary`, `#dynamic-123` |
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
*Template: automated-testing-template.md | Output: .propel/context/test/tw_[feature]_[YYYYMMDD].md*
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# CI/CD Pipeline Specification
|
|
2
|
+
|
|
3
|
+
## Project Overview
|
|
4
|
+
[Brief description of the application and deployment requirements]
|
|
5
|
+
|
|
6
|
+
## Target Configuration
|
|
7
|
+
| Attribute | Value |
|
|
8
|
+
|-----------|-------|
|
|
9
|
+
| CI/CD Platform | [GitHub Actions / Azure DevOps / GitLab CI] |
|
|
10
|
+
| Deployment Target | [Kubernetes / Container Apps / VMs / Serverless] |
|
|
11
|
+
| Environments | [dev, qa, staging, prod] |
|
|
12
|
+
| Branching Strategy | [GitFlow / Trunk-based / GitHub Flow] |
|
|
13
|
+
|
|
14
|
+
## Technology Stack Summary
|
|
15
|
+
| Layer | Technology | Build Tool | Test Framework |
|
|
16
|
+
|-------|------------|------------|----------------|
|
|
17
|
+
| Frontend | [React/Angular/Vue] | [npm/yarn] | [Jest/Vitest] |
|
|
18
|
+
| Backend | [.NET/Node/Python] | [dotnet/npm/pip] | [xUnit/Jest/pytest] |
|
|
19
|
+
| Infrastructure | [Terraform] | [terraform] | [terratest] |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Pipeline Stages
|
|
24
|
+
|
|
25
|
+
### Stage 1: Build Verification (CICD-XXX)
|
|
26
|
+
- CICD-001: Pipeline MUST compile/build all application artifacts
|
|
27
|
+
- CICD-002: Pipeline MUST verify all dependencies resolve successfully
|
|
28
|
+
- CICD-003: Pipeline MUST generate build metadata (version, commit SHA, timestamp)
|
|
29
|
+
- CICD-004: Pipeline MUST fail on compilation errors
|
|
30
|
+
|
|
31
|
+
### Stage 2: Code Quality (CICD-XXX)
|
|
32
|
+
- CICD-010: Pipeline MUST run linters ([ESLint/StyleCop/Pylint])
|
|
33
|
+
- CICD-011: Pipeline MUST enforce code coverage threshold (>= [80]%)
|
|
34
|
+
- CICD-012: Pipeline MUST fail on code quality degradation
|
|
35
|
+
- CICD-013: Pipeline MUST generate code quality reports
|
|
36
|
+
|
|
37
|
+
### Stage 3: Security Scanning (CICD-XXX)
|
|
38
|
+
- CICD-020: Pipeline MUST run SAST using [CodeQL/SonarQube/Semgrep]
|
|
39
|
+
- CICD-021: Pipeline MUST run SCA using [Snyk/OWASP Dependency-Check]
|
|
40
|
+
- CICD-022: Pipeline MUST scan container images using [Trivy/Grype]
|
|
41
|
+
- CICD-023: Pipeline MUST run secrets detection using [GitLeaks/TruffleHog]
|
|
42
|
+
- CICD-024: Pipeline MUST fail on CRITICAL/HIGH vulnerabilities
|
|
43
|
+
- CICD-025: [UNCLEAR] Pipeline MUST [ambiguous security requirement]
|
|
44
|
+
|
|
45
|
+
**Note:** Mark unclear requirements with [UNCLEAR] tag.
|
|
46
|
+
|
|
47
|
+
### Stage 4: Testing (CICD-XXX)
|
|
48
|
+
- CICD-030: Pipeline MUST run unit tests with [X]% coverage threshold
|
|
49
|
+
- CICD-031: Pipeline MUST run integration tests for [scope]
|
|
50
|
+
- CICD-032: Pipeline MUST run E2E tests for [critical user journeys]
|
|
51
|
+
- CICD-033: Pipeline MUST run performance tests for production deployments
|
|
52
|
+
- CICD-034: Pipeline MUST generate test reports in [format]
|
|
53
|
+
|
|
54
|
+
### Stage 5: Infrastructure Validation (CICD-XXX)
|
|
55
|
+
- CICD-040: Pipeline MUST run `terraform plan` before apply
|
|
56
|
+
- CICD-041: Pipeline MUST run policy checks using [OPA/Sentinel/Checkov]
|
|
57
|
+
- CICD-042: Pipeline MUST validate IaC security using [tfsec/checkov]
|
|
58
|
+
- CICD-043: Pipeline MUST estimate infrastructure cost using [Infracost]
|
|
59
|
+
|
|
60
|
+
### Stage 6: Deployment (CICD-XXX)
|
|
61
|
+
- CICD-050: Pipeline MUST deploy to [environment] using [strategy]
|
|
62
|
+
- CICD-051: Pipeline MUST validate deployment prerequisites
|
|
63
|
+
- CICD-052: Pipeline MUST run smoke tests post-deployment
|
|
64
|
+
- CICD-053: Pipeline MUST support automated rollback on failure
|
|
65
|
+
|
|
66
|
+
### Stage 7: Approval Gates (CICD-XXX)
|
|
67
|
+
- CICD-060: Pipeline MUST require [1] approval for staging deployment
|
|
68
|
+
- CICD-061: Pipeline MUST require [2] approvals for production deployment
|
|
69
|
+
- CICD-062: Pipeline MUST enforce [24h/72h] approval timeout
|
|
70
|
+
- CICD-063: Pipeline MUST notify approvers via [channel]
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Environment Pipeline Matrix
|
|
75
|
+
|
|
76
|
+
| Stage | dev | qa | staging | prod |
|
|
77
|
+
|-------|-----|----|---------| ---- |
|
|
78
|
+
| Build | Auto | Auto | Auto | Auto |
|
|
79
|
+
| Lint | Auto | Auto | Auto | Auto |
|
|
80
|
+
| Unit Tests | Auto | Auto | Auto | Auto |
|
|
81
|
+
| SAST | Auto | Auto | Auto | Auto |
|
|
82
|
+
| SCA | Auto | Auto | Auto | Auto |
|
|
83
|
+
| Container Scan | Auto | Auto | Auto | Auto |
|
|
84
|
+
| Secrets Scan | Auto | Auto | Auto | Auto |
|
|
85
|
+
| Integration Tests | Skip | Auto | Auto | Auto |
|
|
86
|
+
| E2E Tests | Skip | Auto | Auto | Auto |
|
|
87
|
+
| Performance Tests | Skip | Skip | Skip | Auto |
|
|
88
|
+
| IaC Validation | Auto | Auto | Auto | Auto |
|
|
89
|
+
| Manual Approval | No | No | Yes (1) | Yes (2) |
|
|
90
|
+
| Deploy | Auto | Auto | After Approval | After Approval |
|
|
91
|
+
| Smoke Tests | Auto | Auto | Auto | Auto |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Security Gates Configuration
|
|
96
|
+
|
|
97
|
+
| Gate | Tool | Threshold | Blocking | Environments |
|
|
98
|
+
|------|------|-----------|----------|--------------|
|
|
99
|
+
| SAST | [CodeQL] | 0 Critical, 0 High | Yes | All |
|
|
100
|
+
| SCA | [Snyk] | 0 Critical, 0 High | Yes | All |
|
|
101
|
+
| Container | [Trivy] | 0 Critical | Yes | All |
|
|
102
|
+
| Secrets | [GitLeaks] | 0 findings | Yes | All |
|
|
103
|
+
| IaC | [tfsec] | 0 Critical | Yes | All |
|
|
104
|
+
| Coverage | [tool] | >= 80% | Yes | All |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Deployment Strategy
|
|
109
|
+
|
|
110
|
+
### Strategy Per Environment
|
|
111
|
+
| Environment | Strategy | Rollback | Health Check |
|
|
112
|
+
|-------------|----------|----------|--------------|
|
|
113
|
+
| dev | Rolling | Manual | Basic |
|
|
114
|
+
| qa | Rolling | Manual | Basic |
|
|
115
|
+
| staging | Blue/Green | Automated | Full |
|
|
116
|
+
| prod | Canary (10% → 50% → 100%) | Automated | Full + Metrics |
|
|
117
|
+
|
|
118
|
+
### Canary Configuration (Production)
|
|
119
|
+
```yaml
|
|
120
|
+
canary:
|
|
121
|
+
steps:
|
|
122
|
+
- weight: 10
|
|
123
|
+
pause: 5m
|
|
124
|
+
analysis: error_rate < 1%
|
|
125
|
+
- weight: 50
|
|
126
|
+
pause: 15m
|
|
127
|
+
analysis: error_rate < 1% AND p99_latency < 500ms
|
|
128
|
+
- weight: 100
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Rollback Procedures
|
|
134
|
+
|
|
135
|
+
### Automated Rollback Triggers
|
|
136
|
+
- Smoke test failure
|
|
137
|
+
- Error rate > [5]%
|
|
138
|
+
- Health check failures > [3] consecutive
|
|
139
|
+
- P99 latency > [X]ms
|
|
140
|
+
|
|
141
|
+
### Rollback Steps
|
|
142
|
+
1. Detect failure via [monitoring/health checks]
|
|
143
|
+
2. Trigger rollback to previous version
|
|
144
|
+
3. Verify rollback success
|
|
145
|
+
4. Notify stakeholders via [channel]
|
|
146
|
+
5. Create incident ticket in [system]
|
|
147
|
+
|
|
148
|
+
### Artifact Retention
|
|
149
|
+
| Environment | Retention Period |
|
|
150
|
+
|-------------|-----------------|
|
|
151
|
+
| dev | 7 days |
|
|
152
|
+
| qa | 30 days |
|
|
153
|
+
| staging | 90 days |
|
|
154
|
+
| prod | 365 days |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Notification Strategy
|
|
159
|
+
|
|
160
|
+
### Notification Events
|
|
161
|
+
| Event | Recipients | Channel | Priority |
|
|
162
|
+
|-------|------------|---------|----------|
|
|
163
|
+
| Build Failure | Commit author, Team | [Slack/Teams] | High |
|
|
164
|
+
| Security Gate Failure | Security team, Commit author | [Slack/Teams/Email] | Critical |
|
|
165
|
+
| Deployment Started | Operations | [Slack/Teams] | Info |
|
|
166
|
+
| Deployment Completed | Operations, Stakeholders | [Slack/Teams] | Info |
|
|
167
|
+
| Rollback Executed | On-call, Management | [PagerDuty/Slack] | Critical |
|
|
168
|
+
| Approval Required | Designated approvers | [Slack/Teams/Email] | High |
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Pipeline Triggers
|
|
173
|
+
|
|
174
|
+
### Branch Triggers
|
|
175
|
+
| Branch Pattern | Pipeline Type | Environments |
|
|
176
|
+
|----------------|--------------|--------------|
|
|
177
|
+
| `feature/*` | CI only | dev |
|
|
178
|
+
| `develop` | CI + CD | qa |
|
|
179
|
+
| `release/*` | CI + CD | staging |
|
|
180
|
+
| `main` | CI + CD | prod |
|
|
181
|
+
| `hotfix/*` | CI + CD (expedited) | staging → prod |
|
|
182
|
+
|
|
183
|
+
### Manual Triggers
|
|
184
|
+
- Re-run failed pipeline
|
|
185
|
+
- Deploy specific version
|
|
186
|
+
- Rollback to previous version
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Secrets Configuration
|
|
191
|
+
|
|
192
|
+
### Required Secrets
|
|
193
|
+
| Secret Name | Purpose | Source | Rotation |
|
|
194
|
+
|-------------|---------|--------|----------|
|
|
195
|
+
| REGISTRY_TOKEN | Container registry auth | [Key Vault/Secret Manager] | 90 days |
|
|
196
|
+
| DEPLOY_CREDENTIALS | Cloud deployment | [OIDC/Managed Identity] | N/A |
|
|
197
|
+
| SONAR_TOKEN | Code quality scanning | [Key Vault/Secret Manager] | 365 days |
|
|
198
|
+
| SNYK_TOKEN | Vulnerability scanning | [Key Vault/Secret Manager] | 365 days |
|
|
199
|
+
|
|
200
|
+
### Secret Access
|
|
201
|
+
- Secrets accessed via [GitHub Secrets/Azure Key Vault/GCP Secret Manager]
|
|
202
|
+
- Environment-specific secrets isolated
|
|
203
|
+
- Secrets masked in all logs
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Requirement Traceability
|
|
208
|
+
|
|
209
|
+
| CICD ID | Description | Source Requirement |
|
|
210
|
+
|---------|-------------|-------------------|
|
|
211
|
+
| CICD-001 | Build verification | TR-XXX |
|
|
212
|
+
| CICD-020 | SAST scanning | NFR-XXX (Security) |
|
|
213
|
+
| CICD-030 | Unit testing | NFR-XXX (Quality) |
|
|
214
|
+
| CICD-050 | Deployment | NFR-XXX (Availability) |
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Human Review Checklist
|
|
219
|
+
|
|
220
|
+
### Security
|
|
221
|
+
- [ ] All security gates configured correctly
|
|
222
|
+
- [ ] No secrets in pipeline code
|
|
223
|
+
- [ ] Approval requirements match policy
|
|
224
|
+
- [ ] OIDC configured for cloud auth (no long-lived credentials)
|
|
225
|
+
|
|
226
|
+
### Testing
|
|
227
|
+
- [ ] Code coverage threshold appropriate
|
|
228
|
+
- [ ] E2E tests cover critical user journeys
|
|
229
|
+
- [ ] Performance tests have baselines defined
|
|
230
|
+
|
|
231
|
+
### Deployment
|
|
232
|
+
- [ ] Rollback procedure documented and tested
|
|
233
|
+
- [ ] Deployment strategy appropriate for workload
|
|
234
|
+
- [ ] Health checks configured correctly
|
|
235
|
+
|
|
236
|
+
### Notifications
|
|
237
|
+
- [ ] All notification channels configured
|
|
238
|
+
- [ ] Escalation paths defined
|
|
239
|
+
- [ ] On-call integration configured
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Approval
|
|
244
|
+
|
|
245
|
+
| Role | Name | Date | Signature |
|
|
246
|
+
|------|------|------|-----------|
|
|
247
|
+
| DevOps Engineer | | | |
|
|
248
|
+
| Security Engineer | | | |
|
|
249
|
+
| Development Lead | | | |
|