Skip to content

Commit 3dcd06a

Browse files
committed
ELI-338: fix targets and access
1 parent d5369d6 commit 3dcd06a

9 files changed

Lines changed: 76 additions & 52 deletions

File tree

.github/workflows/dev_sandbox_publish_deploy.yaml

Lines changed: 52 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -24,55 +24,57 @@ jobs:
2424
echo "Deploying to: DEV & Sandbox"
2525
echo "VERSION=${{ steps.variables.outputs.version }}"
2626
27-
# dev:
28-
# needs: metadata
29-
# runs-on: ubuntu-latest
30-
# steps:
31-
# - name: Checkout repository
32-
# uses: actions/checkout@v6
33-
#
34-
# - name: Set up Python 3.11
35-
# uses: actions/setup-python@v6
36-
# with:
37-
# python-version: '3.11'
38-
#
39-
# - name: Set up Node.js
40-
# uses: actions/setup-node@v6
41-
# with:
42-
# node-version: '20'
43-
#
44-
# - name: Install Poetry
45-
# run: curl -sSL https://install.python-poetry.org | python3 -
46-
#
47-
# - name: Install Python and Node dependencies
48-
# run: |
49-
# make install
50-
#
51-
# - name: Install proxygen-cli
52-
# run: |
53-
# pip install proxygen-cli
54-
#
55-
# - name: Set up Proxygen credentials
56-
# env:
57-
# PROXYGEN_PRIVATE_KEY: ${{ secrets.PROXYGEN_PRIVATE_KEY }}
58-
# run: |
59-
# mkdir -p ~/.proxygen
60-
# echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem
61-
# make setup-proxygen-credentials
62-
# - name: Generate specification
63-
# run: |
64-
# make construct-spec APIM_ENV=internal-dev
65-
#
66-
# - name: Publish internal-dev spec to Proxygen
67-
# run: |
68-
# proxygen spec publish build/specification/internal-dev/eligibility-signposting-api.yaml --no-confirm
69-
#
70-
# - name: Deploy internal-dev spec to Proxygen
71-
# run: |
72-
# proxygen instance deploy internal-dev eligibility-signposting-api build/specification/internal-dev/eligibility-signposting-api.yaml --no-confirm
27+
internal-dev:
28+
name: "Publish spec & deploy to dev"
29+
needs: metadata
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v6
34+
35+
- name: Set up Python 3.11
36+
uses: actions/setup-python@v6
37+
with:
38+
python-version: '3.11'
39+
40+
- name: Set up Node.js
41+
uses: actions/setup-node@v6
42+
with:
43+
node-version: '20'
44+
45+
- name: Install Poetry
46+
run: curl -sSL https://install.python-poetry.org | python3 -
47+
48+
- name: Install Python and Node dependencies
49+
run: |
50+
make install
51+
52+
- name: Install proxygen-cli
53+
run: |
54+
pip install proxygen-cli
55+
56+
- name: Set up Proxygen credentials
57+
env:
58+
PROXYGEN_PRIVATE_KEY: ${{ secrets.PROXYGEN_PRIVATE_KEY }}
59+
run: |
60+
mkdir -p ~/.proxygen
61+
echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem
62+
make setup-proxygen-credentials
63+
- name: Generate specification
64+
run: |
65+
make construct-spec APIM_ENV=internal-dev
66+
67+
- name: Publish internal-dev spec to Proxygen
68+
run: |
69+
proxygen spec publish build/specification/internal-dev/eligibility-signposting-api.yaml --no-confirm
70+
71+
- name: Deploy internal-dev spec to Proxygen
72+
run: |
73+
proxygen instance deploy internal-dev eligibility-signposting-api build/specification/internal-dev/eligibility-signposting-api.yaml --no-confirm
7374
7475
sandbox:
75-
needs: metadata
76+
name: "Publish spec & deploy to sandbox"
77+
needs: internal-dev
7678
runs-on: ubuntu-latest
7779
steps:
7880
- name: Checkout repository
@@ -119,6 +121,7 @@ jobs:
119121
proxygen instance deploy sandbox eligibility-signposting-api build/specification/sandbox/eligibility-signposting-api.yaml --no-confirm
120122
121123
publish_postman:
124+
name: "Publish to Postman"
122125
needs: sandbox
123126
runs-on: ubuntu-latest
124127
steps:
@@ -155,6 +158,7 @@ jobs:
155158
-d @wrapped_collection.json
156159
157160
tag_deployment:
161+
name: "Tag Dev & Sandbox deployment"
158162
needs: [metadata, publish_postman]
159163
runs-on: ubuntu-latest
160164
steps:
@@ -168,6 +172,7 @@ jobs:
168172
git push origin ${{ needs.metadata.outputs.version }}
169173
170174
notify_slack:
175+
name: "Notify Slack"
171176
needs: tag_deployment
172177
runs-on: ubuntu-latest
173178
steps:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ set-ratelimit: guard-APIM_ENV
114114
< specification/x-nhsd-apim/ratelimit-template.yaml > specification/x-nhsd-apim/ratelimit.yaml
115115

116116
update-spec-template: guard-APIM_ENV
117-
ifeq ($(APIM_ENV), $(filter $(APIM_ENV), sandbox internal-dev test int ref preprod prod ))
117+
ifeq ($(APIM_ENV), $(filter $(APIM_ENV), sandbox internal-dev test int ref preprod prod dev))
118118
@ $(MAKE) set-target APIM_ENV=$$APIM_ENV
119119
@ $(MAKE) set-access APIM_ENV=$$APIM_ENV
120120
@ $(MAKE) set-security APIM_ENV=$$APIM_ENV
121121
@ $(MAKE) set-ratelimit APIM_ENV=$$APIM_ENV
122122
else
123-
@ echo ERROR: $$APIM_ENV is not a valid environment. Please use one of [sandbox, internal-dev, int, ref, preprod, prod]
123+
@ echo ERROR: $$APIM_ENV is not a valid environment. Please use one of [sandbox, internal-dev, test, int, ref, preprod, prod, dev]
124124
@ exit 1;
125125
endif
126126

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
nhs-login-p9:
2+
$ref: https://proxygen.prod.api.platform.nhs.uk/components/securitySchemes/nhs-login-p9
3+
app-level3:
4+
$ref: https://proxygen.prod.api.platform.nhs.uk/components/securitySchemes/app-level3
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- title: Eligibility Signposting API (Dev Environment)
2+
grants:
3+
nhs-login-p9: []
4+
- title: Eligibility Signposting API (Dev Environment) app Level 3 Access
5+
grants:
6+
app-level3: []
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
proxy:
2+
limit: 5
3+
timeunit: second
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
type: external
2+
url: "TBC"
3+
healthcheck: /patient-check/_status
4+
security:
5+
type: mtls
6+
secret: eligibility-signposting-api

specification/x-nhsd-apim/target-preprod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
type: external
2-
url: "preprod.eligibility-signposting-api.nhs.uk"
2+
url: "https://preprod.eligibility-signposting-api.nhs.uk"
33
healthcheck: /patient-check/_status
44
security:
55
type: mtls

specification/x-nhsd-apim/target-prod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
type: external
2-
url: "prod.eligibility-signposting-api.national.nhs.uk"
2+
url: "https://prod.eligibility-signposting-api.national.nhs.uk"
33
healthcheck: /patient-check/_status
44
security:
55
type: mtls

specification/x-nhsd-apim/target-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
type: external
2-
url: "test.eligibility-signposting-api.nhs.uk"
2+
url: "https://test.eligibility-signposting-api.nhs.uk"
33
healthcheck: /patient-check/_status
44
security:
55
type: mtls

0 commit comments

Comments
 (0)