Skip to content

Commit f8a675d

Browse files
Initial sandbox proxy deploy
1 parent 90a376f commit f8a675d

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

+7195
-2549
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,23 @@ runs:
5252
envsubst < ./.github/proxygen-settings.yaml > ${HOME}/.proxygen/settings.yaml
5353
envsubst < ./.github/proxygen-settings.yaml | cat
5454
55+
- name: Build internal dev oas
56+
working-directory: .
57+
shell: bash
58+
run: |
59+
make construct-spec APIM_ENV=dev
5560
5661
- name: Deploy to Internal Dev
5762
shell: bash
5863
run: |
5964
proxygen instance deploy internal-dev $INSTANCE build/notify-supplier.json --no-confirm
6065
66+
- name: Build sandbox oas
67+
working-directory: .
68+
shell: bash
69+
run: |
70+
make construct-spec APIM_ENV=sandbox
71+
6172
- name: Deploy to Internal Dev Sandbox
6273
shell: bash
6374
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
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

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)