Skip to content

Commit feb954c

Browse files
authored
Merge branch 'master' into VED-349-OAS-Update
2 parents 9e15f1e + 8adc7f4 commit feb954c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+893
-357
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Deploy Blue Green - INT
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches: [master]
7+
8+
jobs:
9+
deploy-green:
10+
uses: ./.github/workflows/deploy-template.yml
11+
with:
12+
environment: green
13+
14+
deploy-blue:
15+
needs: deploy-green
16+
uses: ./.github/workflows/deploy-template.yml
17+
with:
18+
environment: blue
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: Deploy to INT and run E2e test
2+
on:
3+
workflow_call:
4+
inputs:
5+
environment:
6+
required: true
7+
type: string
8+
9+
jobs:
10+
terraform-plan:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
14+
contents: read
15+
steps:
16+
- name: Debug OIDC
17+
uses: aws-actions/configure-aws-credentials@v4
18+
with:
19+
aws-region: eu-west-2
20+
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/auto-ops
21+
role-session-name: github-actions
22+
23+
- name: Whoami
24+
run: aws sts get-caller-identity
25+
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 1
30+
31+
- uses: hashicorp/setup-terraform@v3
32+
with:
33+
terraform_version: "1.12.2"
34+
35+
- name: Terraform Init
36+
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
37+
run: |
38+
export ENVIRONMENT=${{ inputs.environment }}
39+
make init
40+
41+
- name: Terraform Plan
42+
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
43+
run: |
44+
make plan environment=${{ inputs.environment }} aws_account_name=int
45+
46+
terraform-apply:
47+
needs: terraform-plan
48+
runs-on: ubuntu-latest
49+
permissions:
50+
id-token: write
51+
contents: read
52+
environment:
53+
name: int
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v4
57+
58+
- uses: aws-actions/configure-aws-credentials@v4
59+
with:
60+
aws-region: eu-west-2
61+
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/auto-ops
62+
role-session-name: github-actions
63+
64+
- uses: hashicorp/setup-terraform@v3
65+
with:
66+
terraform_version: "1.12.2"
67+
68+
- name: Terraform Init
69+
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
70+
run: |
71+
export ENVIRONMENT=${{ inputs.environment }}
72+
make init
73+
74+
- name: Terraform Apply
75+
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
76+
run: |
77+
make apply environment=${{ inputs.environment }} aws_account_name=int
78+
79+
e2e-tests:
80+
needs: terraform-apply
81+
if: ${{ vars.RUN_E2E == 'true' || inputs.environment == vars.ACTIVE_ENVIRONMENT }}
82+
runs-on: ubuntu-latest
83+
permissions:
84+
id-token: write
85+
contents: read
86+
steps:
87+
- name: Checkout
88+
uses: actions/checkout@v4
89+
90+
- uses: aws-actions/configure-aws-credentials@v4
91+
with:
92+
aws-region: eu-west-2
93+
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/auto-ops
94+
role-session-name: github-actions
95+
96+
- name: Set up Python
97+
uses: actions/setup-python@v5
98+
with:
99+
python-version: "3.11"
100+
101+
- name: Install Poetry
102+
run: |
103+
curl -sSL https://install.python-poetry.org | python3 -
104+
echo "$HOME/.local/bin" >> $GITHUB_PATH
105+
106+
- name: Set Poetry to use Python 3.11
107+
working-directory: ${{ vars.E2E_DIR_PATH }}
108+
run: |
109+
poetry env use $(which python3.11)
110+
111+
- name: Install dependencies with Poetry
112+
working-directory: ${{ vars.E2E_DIR_PATH }}
113+
run: |
114+
poetry install --no-root
115+
116+
- name: Run e2e tests
117+
working-directory: ${{ vars.E2E_DIR_PATH }}
118+
run: |
119+
apigee_token=$(aws ssm get-parameter \
120+
--name "/imms/apigee/non-prod/token" \
121+
--with-decryption \
122+
--query "Parameter.Value" \
123+
--output text)
124+
125+
status_api_key=$(aws ssm get-parameter \
126+
--name "/imms/apigee/non-prod/status-api-key" \
127+
--with-decryption \
128+
--query "Parameter.Value" \
129+
--output text)
130+
131+
export APIGEE_ACCESS_TOKEN=$apigee_token
132+
133+
export APIGEE_ENVIRONMENT=int
134+
export STATUS_API_KEY=$status_api_key
135+
export PROXY_NAME=immunisation-fhir-api-internal-dev
136+
export SERVICE_BASE_PATH=immunisation-fhir-api/FHIR/R4
137+
export SSO_LOGIN_URL=https://login.apigee.com
138+
139+
make run-immunization

config/common/disease_mapping.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616
}
1717
]
1818
},
19+
{
20+
"vacc_type": "COVID19",
21+
"diseases": [
22+
{
23+
"code": "840539006",
24+
"term": "Disease caused by severe acute respiratory syndrome coronavirus 2"
25+
}
26+
]
27+
},
1928
{
2029
"vacc_type": "FLU",
2130
"diseases": [

config/dev/permissions_config.json

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"FLU.CRUDS",
77
"MMR.CRUDS",
88
"RSV.CRUDS"
9-
]
9+
],
10+
"ods_codes": ["DPSFULL"]
1011
},
1112
{
1213
"supplier": "DPSREDUCED",
@@ -15,7 +16,8 @@
1516
"FLU.CRUD",
1617
"MMR.CRUD",
1718
"RSV.CRUD"
18-
]
19+
],
20+
"ods_codes": ["DPSREDUCED"]
1921
},
2022
{
2123
"supplier": "MAVIS",
@@ -25,26 +27,30 @@
2527
"MENACWY.CRUDS",
2628
"MMR.CRUDS",
2729
"FLU.CRUDS"
28-
]
30+
],
31+
"ods_codes": ["V0V8L"]
2932
},
3033
{
3134
"supplier": "SONAR",
3235
"permissions": [
3336
"FLU.CD"
34-
]
37+
],
38+
"ods_codes": ["8HK48"]
3539
},
3640
{
3741
"supplier": "EVA",
3842
"permissions": [
3943
"COVID19.CUD"
40-
]
44+
],
45+
"ods_codes": ["8HA94"]
4146
},
4247
{
4348
"supplier": "RAVS",
4449
"permissions": [
4550
"RSV.CRUDS",
4651
"MMR.CRUDS"
47-
]
52+
],
53+
"ods_codes": ["X8E5B"]
4854
},
4955
{
5056
"supplier": "AGEM-RAVS-Integration",
@@ -61,7 +67,8 @@
6167
"HPV.CRUDS",
6268
"3IN1.CRUDS",
6369
"MENACWY.CRUDS"
64-
]
70+
],
71+
"ods_codes": ["YGM41", "YGJ"]
6572
},
6673
{
6774
"supplier": "TPP",
@@ -71,7 +78,8 @@
7178
"HPV.CRUDS",
7279
"3IN1.CRUDS",
7380
"MENACWY.CRUDS"
74-
]
81+
],
82+
"ods_codes": ["YGA"]
7583
},
7684
{
7785
"supplier": "MEDICUS",
@@ -81,7 +89,8 @@
8189
"HPV.CRUDS",
8290
"3IN1.CRUDS",
8391
"MENACWY.CRUDS"
84-
]
92+
],
93+
"ods_codes": ["YGMYW"]
8594
},
8695
{
8796
"supplier": "Test_App",

config/preprod/permissions_config.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"FLU.CRUDS",
77
"MMR.CRUDS",
88
"RSV.CRUDS"
9-
]
9+
],
10+
"ods_codes": ["DPSFULL"]
1011
},
1112
{
1213
"supplier": "DPSREDUCED",
@@ -15,7 +16,8 @@
1516
"FLU.CRUDS",
1617
"MMR.CRUDS",
1718
"RSV.CRUDS"
18-
]
19+
],
20+
"ods_codes": ["DPSREDUCED"]
1921
},
2022
{
2123
"supplier": "MAVIS",
@@ -25,14 +27,16 @@
2527
"MENACWY.CRUDS",
2628
"MMR.CRUDS",
2729
"FLU.CRUDS"
28-
]
30+
],
31+
"ods_codes": ["V0V8L"]
2932
},
3033
{
3134
"supplier": "RAVS",
3235
"permissions": [
3336
"RSV.CRUDS",
3437
"MMR.CRUDS"
35-
]
38+
],
39+
"ods_codes": ["X8E5B"]
3640
},
3741
{
3842
"supplier": "AGEM-RAVS-Integration",
@@ -49,7 +53,8 @@
4953
"HPV.CRUDS",
5054
"3IN1.CRUDS",
5155
"MENACWY.CRUDS"
52-
]
56+
],
57+
"ods_codes": ["YGM41", "YGJ"]
5358
},
5459
{
5560
"supplier": "TPP",
@@ -59,7 +64,8 @@
5964
"HPV.CRUDS",
6065
"3IN1.CRUDS",
6166
"MENACWY.CRUDS"
62-
]
67+
],
68+
"ods_codes": ["YGA"]
6369
},
6470
{
6571
"supplier": "MEDICUS",
@@ -69,7 +75,8 @@
6975
"HPV.CRUDS",
7076
"3IN1.CRUDS",
7177
"MENACWY.CRUDS"
72-
]
78+
],
79+
"ods_codes": ["YGMYW"]
7380
},
7481
{
7582
"supplier": "Test_App",

config/prod/permissions_config.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
"supplier": "DPSFULL",
44
"permissions": [
55
"RSV.CRUDS"
6-
]
6+
],
7+
"ods_codes": ["DPSFULL"]
78
},
89
{
910
"supplier": "DPSREDUCED",
1011
"permissions": [
1112
"RSV.CRUDS"
12-
]
13+
],
14+
"ods_codes": ["DPSREDUCED"]
1315
},
1416
{
1517
"supplier": "RAVS",
1618
"permissions": [
1719
"RSV.RS"
18-
]
20+
],
21+
"ods_codes": ["X8E5B"]
1922
}
2023
]

0 commit comments

Comments
 (0)