-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
56 lines (48 loc) · 1.28 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env python3
import os
from aws_cdk import App
# Import cdk pipeline stack
from stacks.pipeline_stack import PipelineStack
# Account environment and region
account_id = os.environ.get('CDK_DEFAULT_ACCOUNT')
aws_region = os.environ.get('CDK_DEFAULT_REGION')
# Determine account stage (Identify if it is running on prod, stg, or dev)
if account_id == "472057503814": # Prod account
app_stage = "prod"
elif account_id == "455634345446": # Staging account
app_stage = "stg"
else:
app_stage = "dev"
props = {
"pipeline_artifact_bucket_name": {
"dev": "sscheck-backend-artifact-dev",
"stg": "sscheck-backend-artifact-stg",
"prod": "sscheck-backend-artifact-prod"
},
"branch_source": {
"dev": "dev",
"stg": "stg",
"prod": "main"
},
"alias_domain_name": {
"dev": ["api.sscheck.dev.umccr.org"],
"stg": ["api.sscheck.stg.umccr.org"],
"prod": ["api.sscheck.umccr.org", "api.sscheck.prod.umccr.org"]
}
}
app = App(
context={
"app_stage": app_stage,
"props": props
}
)
PipelineStack(
app,
"SSCheckBackEndCdkPipeline",
stack_name="sscheck-backend-pipeline",
tags={
"stage": app_stage,
"stack": "sscheck-backend-pipeline"
}
)
app.synth()