You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add reusable teardown workflow for DEV environment
* Add detailed teardown workflows for DEV environment
* Add "Getting Started with Workflows" section to DevOps Guide
| Deploy to DEV | Deploy to DEV environment | manual |
32
+
| Teardown DEV | Destroy infrastructure in DEV | manual |
32
33
| Code Quality | Generate code quality reports | push to main branch, scheduled, manual |
33
34
34
35
---
35
36
36
-
## Workflow Configuration
37
+
## Deployment Workflows
38
+
39
+
The project includes environment-specific deployment workflows that use GitHub Actions to deploy the application and infrastructure to AWS. Deployments require proper AWS credentials and environment variables to be configured.
40
+
41
+
### Deploy to DEV
42
+
43
+
**Workflow:**`deploy-dev.yml`
44
+
45
+
Manually triggered workflow that deploys the application and infrastructure to the DEV environment.
46
+
47
+
**Process:**
48
+
49
+
1. Checks out the repository
50
+
2. Sets up Node.js environment
51
+
3. Configures AWS credentials via OIDC role assumption
52
+
4. Installs and builds application code
53
+
5. Runs all application tests
54
+
6. Installs and builds infrastructure code
55
+
7. Bootstraps CDK (if needed)
56
+
8. Synthesizes CDK stacks
57
+
9. Deploys all CDK stacks
58
+
10. Cleans up sensitive files
59
+
60
+
**Trigger:** Manual (`workflow_dispatch`)
61
+
62
+
---
63
+
64
+
## Teardown Workflows
65
+
66
+
The project includes teardown (destroy) workflows for removing provisioned infrastructure from specific environments. These workflows use a reusable workflow pattern to maintain consistency across environments.
67
+
68
+
### Teardown (Reusable)
69
+
70
+
**Workflow:**`teardown-reusable.yml`
71
+
72
+
A reusable workflow that provides the foundational teardown logic. This workflow is called by environment-specific teardown workflows and accepts the following inputs:
73
+
74
+
-`aws_role_arn` (required): AWS IAM role ARN for credential assumption
75
+
-`aws_region` (optional): AWS region (defaults to `us-east-1`)
3. Configures AWS credentials via OIDC role assumption
83
+
4. Installs infrastructure dependencies
84
+
5. Creates `.env` file with CDK configuration
85
+
6. Destroys all CDK stacks using `npm run destroy:all -- --force --progress events`
86
+
7. Cleans up sensitive files (`.env`, `cdk.out`)
87
+
88
+
### Teardown DEV
89
+
90
+
**Workflow:**`teardown-dev.yml`
91
+
92
+
Environment-specific workflow that triggers the reusable teardown workflow for the DEV environment.
93
+
94
+
**Process:**
95
+
96
+
- Calls the reusable `teardown-reusable.yml` workflow
97
+
- Passes DEV-specific configuration:
98
+
-`AWS_ROLE_ARN_DEV` as the AWS role ARN
99
+
-`AWS_REGION` as the AWS region
100
+
-`CDK_ENV_DEV` as the CDK environment variables
101
+
102
+
**Concurrency:** Only one DEV teardown can run at a time; subsequent requests will cancel the in-progress workflow.
103
+
104
+
**Trigger:** Manual (`workflow_dispatch`)
105
+
106
+
**⚠️ Warning:** Teardown workflows permanently destroy provisioned AWS infrastructure. Use with caution and ensure you have backups of any critical data.
107
+
108
+
---
109
+
110
+
## Getting Started with Workflows
37
111
38
112
Workflows are defined in `.github/workflows/` as YAML files. Each workflow is triggered by specific events (push, pull_request, release, etc.).
0 commit comments