Skip to content

Commit e9af370

Browse files
Initial sandbox proxy deploy
1 parent fbf42cc commit e9af370

Some content is hidden

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

59 files changed

+7200
-2550
lines changed

.github/actions/build-proxies/action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ runs:
5454
envsubst < ./.github/proxygen-settings.yaml > ${HOME}/.proxygen/settings.yaml
5555
envsubst < ./.github/proxygen-settings.yaml | cat
5656
57+
- name: Build internal dev oas
58+
working-directory: .
59+
shell: bash
60+
run: |
61+
make construct-spec APIM_ENV=dev
62+
5763
- name: Set target
5864
shell: bash
5965
run: |
@@ -65,6 +71,12 @@ runs:
6571
run: |
6672
proxygen instance deploy internal-dev $INSTANCE build/notify-supplier.json --no-confirm
6773
74+
- name: Build sandbox oas
75+
working-directory: .
76+
shell: bash
77+
run: |
78+
make construct-spec APIM_ENV=sandbox
79+
6880
- name: Deploy to Internal Dev Sandbox
6981
shell: bash
7082
run: |

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ terraform 1.10.1
88
terraform-docs 0.19.0
99
trivy 0.61.0
1010
vale 3.6.0
11+
yq 4.27.5
1112

1213
# ==============================================================================
1314
# The section below is reserved for Docker image versions.

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ clean:: # Clean-up project resources (main) @Operations
2626
(cd sdk && make clean)
2727
(cd server && make clean)
2828
(cd src/server && make clean)
29+
30+
guard-%:
31+
@ if [ "${${*}}" = "" ]; then \
32+
echo "Variable $* not set"; \
33+
echo "Usage: make <target> APIM_ENV=<env>"
34+
exit 1; \
35+
fi
2936
serve:
3037
npm run serve
3138

@@ -36,6 +43,13 @@ lint-oas:
3643
publish-oas:
3744
npm run publish-oas
3845

46+
construct-spec: guard-APIM_ENV
47+
cd specification/api/components/x-nhsd-apim
48+
cp access-$(APIM_ENV).yml access.yml
49+
cp target-$(APIM_ENV).yml target.yml
50+
cd -
51+
$(MAKE) publish-oas
52+
3953
serve-oas:
4054
npm run serve-oas
4155

redocly.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resolve:
2+
http:
3+
headers: [] # OK to leave empty
4+
external: false # ← ensures remote URLs are not dereferenced

sandbox/.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Use this file as a starting point for your project's .eslintrc.
2+
// Copy this file, and add rule overrides as needed.
13
{
24
"extends": "airbnb-base",
35
"rules": {

sandbox/.openapi-generator-ignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@
2121
#docs/*.md
2222
# Then explicitly reverse the ignore rule for a single file:
2323
#!docs/README.md
24+
utils/ResponseProvider.js
25+
services/LetterService.js
26+
config.js

sandbox/.openapi-generator/FILES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ README.md
33
api/openapi.yaml
44
config.js
55
controllers/Controller.js
6+
controllers/DataController.js
67
controllers/DefaultController.js
8+
controllers/LetterController.js
9+
controllers/MiController.js
710
controllers/index.js
811
expressServer.js
912
index.js
1013
logger.js
1114
package.json
15+
services/DataService.js
1216
services/DefaultService.js
17+
services/MiService.js
1318
services/Service.js
1419
services/index.js
1520
utils/openapiRouter.js

sandbox/.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.13.0-SNAPSHOT
1+
7.14.0

sandbox/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:18.3.0-alpine3.14
2+
3+
ENV npm_config_cache=/home/node/app/.npm
4+
5+
COPY . /sandbox
6+
7+
WORKDIR /sandbox
8+
9+
10+
RUN npm install
11+
12+
EXPOSE 9000
13+
14+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)