Skip to content

Commit b417986

Browse files
authored
Merge branch 'main' into feature/CCM-17337-Publish-Supplier-Configuration-Event
2 parents f49e085 + 7d7fdd2 commit b417986

194 files changed

Lines changed: 23131 additions & 15852 deletions

File tree

Some content is hidden

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

.env.template

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1-
ENVIRONMENT=$ENV_NAME
2-
API_KEY=
3-
HEADERAUTH=
4-
PR_NUMBER=prxx # remove if needs to run against main
5-
NHSD_APIM_TOKEN=
1+
# Your github Personal Access Token (PAT)
2+
GITHUB_TOKEN=
3+
4+
# Apigee proxy name to be used for test execution
5+
# nhs-notify-supplier--internal-dev--nhs-notify-supplier-PR-XX
66
PROXY_NAME=
7-
# * nhs-notify-supplier--internal-dev--nhs-notify-supplier
8-
# * nhs-notify-supplier--internal-dev--nhs-notify-supplier-PR-XX
9-
# * nhs-notify-supplier--ref--nhs-notify-supplier -- ref env
7+
8+
# APIM env to run e2e tests against, other options are: ref, int, prod
9+
API_ENVIRONMENT=internal-dev
10+
11+
# Used for component and e2e tests
12+
# Account group controls default account id mapping for tests.
13+
# If omitted, tests default to dev:
14+
# TARGET_ACCOUNT_GROUP=nhs-notify-supplier-api-dev
15+
# Mapping used by tests:
16+
# nhs-notify-supplier-api-dev -> 820178564574
17+
# nhs-notify-supplier-api-nonprod -> 885964308133
18+
# nhs-notify-supplier-api-prod -> blocked (tests are intentionally disabled for prod)
19+
TARGET_ACCOUNT_GROUP=nhs-notify-supplier-api-dev
20+
21+
# Resource namespace used to resolve AWS resource names for tests (main, pr123)
22+
# remove if needs to run against main
23+
TARGET_ENVIRONMENT=prxx
1024

1125
# API Keys
1226
# ========
@@ -22,9 +36,9 @@ export STATUS_ENDPOINT_API_KEY=xxx
2236

2337
# Private Keys
2438
# ============
25-
# private key used to generate authentication for tests ran against the internal-dev and internal-qa
26-
export NON_PROD_PRIVATE_KEY=xxx # path to the private key file
27-
# private key used to generate authentication for tests ran against the int environment
39+
# private key path used to generate authentication for tests ran against the internal-dev and internal-qa
40+
export NON_PROD_PRIVATE_KEY=xxx
41+
# private key path used to generate authentication for tests ran against the int environment
2842
export INTEGRATION_PRIVATE_KEY=xxx
29-
# private key used to generate authentication for tests ran against the prod environment
43+
# private key path used to generate authentication for tests ran against the prod environment
3044
export PRODUCTION_PRIVATE_KEY=xxx

.github/actions/acceptance-tests-component/action.yml renamed to .github/actions/acceptance-tests-components/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ inputs:
1414
description: Name of the component under test
1515
required: true
1616

17+
targetAccountGroup:
18+
description: Name of the account group under test (e.g. nhs-notify-supplier-api-dev)
19+
required: true
20+
1721
runs:
1822
using: "composite"
1923

@@ -39,5 +43,6 @@ runs:
3943
shell: bash
4044
env:
4145
TARGET_ENVIRONMENT: ${{ inputs.targetEnvironment }}
46+
TARGET_ACCOUNT_GROUP: ${{ inputs.targetAccountGroup }}
4247
run: |
4348
make test-${{ inputs.testType }}

.github/actions/acceptance-tests-e2e/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ inputs:
55
targetEnvironment:
66
description: Name of the environment under test
77
required: true
8+
targetAccountGroup:
9+
description: Name of the account group under test
10+
required: true
811

912
runs:
1013
using: "composite"
@@ -65,6 +68,7 @@ runs:
6568
env:
6669
TARGET_ENVIRONMENT: ${{ inputs.targetEnvironment }}
6770
PR_NUMBER: ${{ steps.set_pr_number.outputs.pr_number }}
71+
TARGET_ACCOUNT_GROUP: ${{ inputs.targetAccountGroup }}
6872
run: |
6973
echo "$DEV_E2E_KEYS_PRIVATE" > "${GITHUB_WORKSPACE}/internal-dev-test-1.pem"
7074
chmod 600 "${GITHUB_WORKSPACE}/internal-dev-test-1.pem"

.github/actions/acceptance-tests/action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ inputs:
1111
required: true
1212

1313
targetAccountGroup:
14-
description: Name of the account group under test
15-
default: nhs-notify-template-management-dev
14+
description: Name of the account group under test (e.g. nhs-notify-supplier-api-dev)
1615
required: true
1716

1817
targetComponent:
@@ -24,16 +23,18 @@ runs:
2423

2524
steps:
2625

27-
- name: Run component tests
26+
- name: Run components tests (sandbox and component tests)
2827
if: ${{ inputs.testType != 'e2e' }}
29-
uses: ./.github/actions/acceptance-tests-component
28+
uses: ./.github/actions/acceptance-tests-components
3029
with:
3130
testType: ${{ inputs.testType }}
3231
targetEnvironment: ${{ inputs.targetEnvironment }}
3332
targetComponent: ${{ inputs.targetComponent }}
33+
targetAccountGroup: ${{ inputs.targetAccountGroup }}
3434

3535
- name: Run e2e tests
36-
if: ${{ inputs.testType == 'e2e' && inputs.targetEnvironment == 'main' }}
36+
if: ${{ inputs.testType == 'e2e' }}
3737
uses: ./.github/actions/acceptance-tests-e2e
3838
with:
3939
targetEnvironment: ${{ inputs.targetEnvironment }}
40+
targetAccountGroup: ${{ inputs.targetAccountGroup }}

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,6 @@ runs:
7272
echo "TARGET_DOMAIN=suppliers.dev.nhsnotify.national.nhs.uk" >> $GITHUB_ENV
7373
fi
7474
75-
if [ -z $PR_NUMBER ]
76-
then
77-
echo "INSTANCE=$PROXYGEN_API_NAME" >> $GITHUB_ENV
78-
echo "TARGET=https://main.$TARGET_DOMAIN" >> $GITHUB_ENV
79-
echo "SANDBOX_TAG=latest" >> $GITHUB_ENV
80-
echo "MTLS_NAME=notify-supplier-mtls" >> $GITHUB_ENV
81-
else
82-
echo "TARGET=https://pr$PR_NUMBER.$TARGET_DOMAIN" >> $GITHUB_ENV
83-
echo "INSTANCE=$PROXYGEN_API_NAME-PR-$PR_NUMBER" >> $GITHUB_ENV
84-
echo "SANDBOX_TAG=pr$PR_NUMBER" >> $GITHUB_ENV
85-
echo "MTLS_NAME=notify-supplier-mtls-pr$PR_NUMBER" >> $GITHUB_ENV
86-
fi
87-
8875
- name: Set APIM_ENV
8976
shell: bash
9077
run: |

.github/actions/test-types.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[
22
"component",
3-
"e2e",
4-
"sandbox"
3+
"e2e"
54
]

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
deploy_proxy: ${{ steps.deploy_proxy.outputs.deploy_proxy }}
3434
steps:
3535
- name: "Checkout code"
36-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3737
- name: "Set CI/CD variables"
3838
id: variables
3939
run: |

.github/workflows/cicd-4-pr-title-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: "Check PR title format"
18-
uses: NHSDigital/nhs-notify-shared-modules/.github/actions/check-pr-title-format@4e781d1d72739015821a380871aa5a66d070177c # 3.1.0
18+
uses: NHSDigital/nhs-notify-shared-modules/.github/actions/check-pr-title-format@5be2f2e952a6f439fb673e04aac5f5b7afcc2c2f # 4.0.1
1919
with:
2020
title: ${{ github.event.pull_request.title }}

.github/workflows/deploy-dynamic-env-proxy.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929

3030
- name: Resolve nodejs version
3131
id: toolversions
32-
run: echo "nodejs_version=$(grep '^nodejs\s' .tool-versions | cut -f2 -d' ')" >>
32+
run:
33+
echo "nodejs_version=$(grep '^nodejs\s' .tool-versions | cut -f2 -d' ')" >>
3334
"$GITHUB_OUTPUT"
3435

3536
- name: "Check if pull request exists for this branch and set

.github/workflows/pr_closed.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ jobs:
5656
packages: read
5757
steps:
5858
- name: Checkout code
59-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
59+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6060
- name: Setup NodeJS
61-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
61+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
6262
with:
6363
node-version-file: ".tool-versions"
6464
registry-url: "https://npm.pkg.github.com"
@@ -92,7 +92,7 @@ jobs:
9292
packages: read
9393
steps:
9494
- name: "Checkout code"
95-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
95+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9696
- name: "Repo setup"
9797
uses: ./.github/actions/node-install
9898
with:
@@ -115,9 +115,9 @@ jobs:
115115

116116
steps:
117117
- name: Checkout code
118-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
118+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
119119
- name: Setup NodeJS
120-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
120+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
121121
with:
122122
node-version-file: ".tool-versions"
123123
registry-url: "https://npm.pkg.github.com"

0 commit comments

Comments
 (0)