Skip to content

Commit 8388760

Browse files
Merge pull request #267 from nhsconnect/PRM-508
[PRM-508] Migrate and Consolidate Suspension Service
2 parents 4d13c75 + 9840f8d commit 8388760

File tree

104 files changed

+6476
-1
lines changed

Some content is hidden

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

104 files changed

+6476
-1
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Full Deployment
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: "Which environment would you like to deploy to?"
8+
type: choice
9+
options:
10+
- dev
11+
- pre-prod
12+
- prod
13+
required: true
14+
is_deployment:
15+
description: "Do you want to apply changes?"
16+
type: boolean
17+
default: false
18+
required: true
19+
20+
permissions:
21+
pull-requests: write
22+
id-token: write
23+
contents: read
24+
25+
jobs:
26+
ehr-repo:
27+
name: EHR Repo CI
28+
secrets: inherit
29+
uses: './.github/workflows/base-node-service-jobs.yml'
30+
with:
31+
service: ehr-repo
32+
environment: ${{ inputs.environment }}
33+
is_deployment: ${{ inputs.is_deployment }}
34+
35+
36+
ehr-out-service:
37+
name: EHR Out Service CI
38+
secrets: inherit
39+
uses: './.github/workflows/base-node-service-jobs.yml'
40+
with:
41+
service: ehr-out-service
42+
environment: ${{ inputs.environment }}
43+
is_deployment: ${{ inputs.is_deployment }}
44+
45+
mesh-inbox-s3-forwarder:
46+
name: MESH Inbox S3 Forwarder Ci
47+
uses: './.github/workflows/base-python-service-jobs.yml'
48+
with:
49+
service: mesh-inbox-s3-forwarder
50+
environment: ${{ inputs.environment }}
51+
is_deployment: ${{ inputs.is_deployment }}
52+
deploy_infra: false
53+
secrets: inherit
54+
55+
mesh-forwarder:
56+
name: MESH Forwarder CI
57+
needs: [ mesh-inbox-s3-forwarder ]
58+
uses: './.github/workflows/base-python-service-jobs.yml'
59+
with:
60+
service: mesh-forwarder
61+
environment: ${{ inputs.environment }}
62+
is_deployment: ${{ inputs.is_deployment }}
63+
secrets: inherit
64+
65+
gp2gp-messenger:
66+
name: GP2GP Messenger CI
67+
uses: './.github/workflows/base-node-service-jobs.yml'
68+
with:
69+
service: gp2gp-messenger
70+
environment: ${{ inputs.environment }}
71+
is_deployment: ${{ inputs.is_deployment }}
72+
secrets: inherit
73+
74+
75+
nems-event-processor:
76+
name: NEMs Event Processor CI
77+
uses: './.github/workflows/base-java-service-jobs.yml'
78+
with:
79+
service: nems-event-processor
80+
environment: ${{ inputs.environment }}
81+
is_deployment: ${{ inputs.is_deployment }}
82+
requires_localstack: true
83+
secrets: inherit
84+
85+
ehr-transfer-service:
86+
name: EHR Transfer Service CI
87+
uses: './.github/workflows/base-java-service-jobs.yml'
88+
with:
89+
service: ehr-transfer-service
90+
environment: ${{ inputs.environment }}
91+
is_deployment: ${{ inputs.is_deployment }}
92+
requires_localstack: true
93+
secrets: inherit
94+
95+
pds-adaptor:
96+
name: PDS Adaptor CI
97+
uses: './.github/workflows/base-java-service-jobs.yml'
98+
with:
99+
service: pds-adaptor
100+
environment: ${{ inputs.environment }}
101+
is_deployment: ${{ inputs.is_deployment }}
102+
java_version: '11'
103+
secrets: inherit
104+
105+
re-registration-service:
106+
name: Re-registration Service CI
107+
uses: './.github/workflows/base-java-service-jobs.yml'
108+
with:
109+
service: ehr-transfer-service
110+
environment: ${{ inputs.environment }}
111+
is_deployment: ${{ inputs.is_deployment }}
112+
requires_localstack: true
113+
secrets: inherit
114+
115+
suspension-service:
116+
name: Suspension Service CI
117+
uses: './.github/workflows/base-java-service-jobs.yml'
118+
with:
119+
service: suspension-service
120+
environment: ${{ inputs.environment }}
121+
is_deployment: ${{ inputs.is_deployment }}
122+
requires_localstack: true
123+
secrets: inherit
124+
125+
e2e-testing:
126+
name: End to End
127+
if: ${{ vars.E2E_TESTS_ENABLED == 'true' && success() }}
128+
needs: [ehr-repo, ehr-out-service, mesh-forwarder]
129+
uses: ./.github/workflows/e2e.yml
130+
secrets: inherit

.github/workflows/service-ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on:
1515
- 'services/re-registration-service/**'
1616
- 'services/gp2gp-messenger/**'
1717
- 'services/mesh-inbox-s3-forwarder/**'
18+
- 'services/suspension-service/**'
19+
- '.github/workflows/service-ci.yml'
1820

1921
pull_request:
2022
types:
@@ -34,6 +36,7 @@ on:
3436
- 'services/re-registration-service/**'
3537
- 'services/gp2gp-messenger/**'
3638
- 'services/mesh-inbox-s3-forwarder/**'
39+
- 'services/suspension-service/**'
3740
- '.github/workflows/service-ci.yml'
3841

3942
permissions:
@@ -166,6 +169,18 @@ jobs:
166169
requires_localstack: true
167170
secrets: inherit
168171

172+
suspension-service:
173+
name: Suspension Service CI
174+
needs: [ get_changed_files]
175+
if: contains(needs.get_changed_files.outputs.changed, 'services/suspension-service') || contains(needs.get_changed_files.outputs.changed, '.github/')
176+
uses: './.github/workflows/base-java-service-jobs.yml'
177+
with:
178+
service: suspension-service
179+
environment: dev
180+
is_deployment: ${{ github.ref == 'refs/heads/main' }}
181+
requires_localstack: true
182+
secrets: inherit
183+
169184
e2e-testing:
170185
name: End to End
171186
if: ${{ vars.E2E_TESTS_ENABLED == 'true' && success() }}

services/re-registration-service/tasks

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ function configure_envs {
7272
export DYNAMODB_LOCAL_ENDPOINT="http://localhost:4566"
7373
export AWS_ACCESS_KEY_ID="LSIA5678901234567890"
7474
export AWS_SECRET_ACCESS_KEY="LSIA5678901234567890"
75-
export NHS_ENVIRONMENT="local"}
75+
export NHS_ENVIRONMENT="local"
76+
}
7677

7778
function configure_sonar_environment_variable {
7879
export SONAR_TOKEN=$(_get_aws_ssm_secret "/repo/dev/output/re-registration-service/sonar_token")
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
HELP.md
2+
.gradle
3+
build/
4+
!gradle/wrapper/gradle-wrapper.jar
5+
!**/src/main/**/build/
6+
!**/src/test/**/build/
7+
.DS_STORE
8+
9+
### STS ###
10+
.apt_generated
11+
.classpath
12+
.factorypath
13+
.project
14+
.settings
15+
.springBeans
16+
.sts4-cache
17+
bin/
18+
!**/src/main/**/bin/
19+
!**/src/test/**/bin/
20+
21+
### IntelliJ IDEA ###
22+
.idea
23+
*.iws
24+
*.iml
25+
*.ipr
26+
out/
27+
!**/src/main/**/out/
28+
!**/src/test/**/out/
29+
30+
### NetBeans ###
31+
/nbproject/private/
32+
/nbbuild/
33+
/dist/
34+
/nbdist/
35+
/.nb-gradle/
36+
37+
### VS Code ###
38+
.vscode/
39+
40+
# Local .terraform directories
41+
**/.terraform/*
42+
/terraform/*.tfplan
43+
/terraform/tf-out.json
44+
/terraform/.terraform.lock.hcl
45+
46+
/utils/*
47+
48+
# misc
49+
docker-compose.yaml.dojo
50+
51+
# packaged lambda
52+
lambda/*.zip
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fileignoreconfig:
2+
- filename: Dojofile
3+
checksum: 2c1682b4e1385eb608c9059d14daad9fc004f3f66fe78f5854ae68a6aff3cba3
4+
- filename: Dojofile-itest
5+
checksum: 6ce06244e6ee1312f3c3665df221524064b0e0eb46216423b53cdb338ad7c899
6+
version: ""
7+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM eclipse-temurin:21.0.1_12-jre-alpine
2+
3+
RUN apk add --no-cache bash
4+
5+
RUN addgroup -S spring && adduser -S spring -G spring
6+
USER spring:spring
7+
8+
COPY build/libs/*.jar app.jar
9+
COPY run-application.sh ./
10+
11+
ENTRYPOINT ["./run-application.sh"]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# suspension-service
2+
3+
Handles processing of patients and their assignment to a managing organisation (MOF).
4+
5+
Maintained by the Patient Record Migrations (PRM) Repository team
6+
7+
## Instances
8+
9+
There are currently 2 instances of this Java application currently running:
10+
11+
- suspensions service;
12+
- end of transfer service.
13+
14+
These are the main differences between them:
15+
16+
- inbound and outbound queues are different;
17+
- suspension service spins up out of working our, end of transfer service is expected to be running all time.
18+
- when invoking pds adapter, end of transfer service sets MOF to the previous GP.
19+
20+
The difference above are reflected in:
21+
22+
- the infrastructure code: each instance has its specific terraform state;
23+
- a very few differences in the application logic, handled with toggles.

0 commit comments

Comments
 (0)