Skip to content

Commit 366a7a8

Browse files
committed
refactor
1 parent 1593c17 commit 366a7a8

File tree

175 files changed

+29
-18027
lines changed

Some content is hidden

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

175 files changed

+29
-18027
lines changed

Makefile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,20 @@ lint-githubaction-scripts:
3434
# test targets
3535

3636
test: download-dependencies
37-
cd latest && mvn test
37+
mvn clean test -Pcurrent
38+
mvn clean test -Plegacy
39+
40+
# build targets for SAM
41+
# the target must be build-<RESOURCE_NAME>
42+
build-FHIRValidatorUKCore: download-dependencies
43+
mvn clean package -Pcurrent
44+
mkdir -p $(ARTIFACTS_DIR)/lib
45+
cp ./target/FHIRValidator-current.jar $(ARTIFACTS_DIR)/lib/
46+
47+
build-FHIRValidatorNHSDigital: download-dependencies
48+
mvn clean package -Plegacy
49+
mkdir -p $(ARTIFACTS_DIR)/lib
50+
cp ./target/FHIRValidator-legacy.jar $(ARTIFACTS_DIR)/lib/
3851

3952
check-licenses: check-licenses-python check-licenses-java
4053

@@ -79,7 +92,7 @@ sam-validate:
7992
sam validate --template-file SAMtemplates/lambda_resources.yaml --region eu-west-2
8093

8194
sam-build: sam-validate download-dependencies
82-
sam build --debug --template-file SAMtemplates/main_template.yaml --region eu-west-2
95+
sam build --template-file SAMtemplates/main_template.yaml --region eu-west-2
8396

8497
sam-sync: guard-AWS_DEFAULT_PROFILE guard-stack_name download-dependencies
8598
sam sync \

SAMtemplates/main_template.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Resources:
6464
Type: AWS::Serverless::Function
6565
Properties:
6666
FunctionName: !Sub "${AWS::StackName}-FHIRValidatorUKCore"
67-
CodeUri: ../latest/
67+
CodeUri: ../
6868
Handler: software.nhs.fhirvalidator.handler.HandlerStream::handleRequest
6969
Role: !GetAtt FHIRValidatorUKCoreResources.Outputs.LambdaRoleArn
7070
SnapStart:
@@ -83,6 +83,7 @@ Resources:
8383
POWERTOOLS_LOG_LEVEL: !Ref LogLevel
8484
PROFILE_MANIFEST_FILE: uk_core.manifest.json
8585
Metadata:
86+
BuildMethod: makefile
8687
guard:
8788
SuppressedRules:
8889
- LAMBDA_DLQ_CHECK
@@ -120,7 +121,7 @@ Resources:
120121
Type: AWS::Serverless::Function
121122
Properties:
122123
FunctionName: !Sub "${AWS::StackName}-FHIRValidatorNHSDigital"
123-
CodeUri: ../legacy/
124+
CodeUri: ../
124125
Handler: software.nhs.fhirvalidator.handler.HandlerStream::handleRequest
125126
Role: !GetAtt FHIRValidatorNHSDigitalResources.Outputs.LambdaRoleArn
126127
SnapStart:
@@ -146,6 +147,7 @@ Resources:
146147
POWERTOOLS_LOG_LEVEL: !Ref LogLevel
147148
PROFILE_MANIFEST_FILE: nhs_digital.manifest.json
148149
Metadata:
150+
BuildMethod: makefile
149151
guard:
150152
SuppressedRules:
151153
- LAMBDA_DLQ_CHECK

latest/licenses/allowedMissingLicense.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

latest/licenses/licenses.xml

Lines changed: 0 additions & 153 deletions
This file was deleted.

0 commit comments

Comments
 (0)