Skip to content

Commit 1b98373

Browse files
Merge branch 'main' into feature/CCM-12963-E2ETests
2 parents 12638f6 + dc897c5 commit 1b98373

38 files changed

Lines changed: 7666 additions & 10417 deletions

.github/actions/build-oas-spec/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,24 @@ runs:
4646
run: npm ci
4747
shell: bash
4848

49-
- name: Build ${{ inputs.apimEnv }} oas
49+
- name: Build OAS File
5050
working-directory: .
5151
env:
5252
APIM_ENV: ${{ inputs.apimEnv }}
5353
shell: bash
5454
run: |
5555
if [ ${{ env.APIM_ENV }} == "internal-dev-sandbox" ] && [ ${{ inputs.buildSandbox }} == true ]
5656
then
57-
echo "Building sandbox OAS spec"
57+
echo "Building JSON sandbox OAS spec"
5858
make build-json-oas-spec APIM_ENV=sandbox
59+
60+
echo "Building YML sandbox OAS spec"
61+
make build-yml-oas-spec APIM_ENV=sandbox
5962
else
60-
echo "Building env specific OAS spec"
63+
echo "Building env specific JSON OAS spec"
64+
make build-json-oas-spec APIM_ENV=${{ env.APIM_ENV }}
65+
66+
echo "Building env specific YML OAS spec"
6167
make build-yml-oas-spec APIM_ENV=${{ env.APIM_ENV }}
6268
fi
6369

.github/actions/trivy-iac/action.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ runs:
88
run: |
99
components_exit_code=0
1010
modules_exit_code=0
11-
11+
asdf plugin add trivy || true
12+
asdf install trivy || true
1213
./scripts/terraform/trivy-scan.sh --mode iac ./infrastructure/terraform/components || components_exit_code=$?
1314
./scripts/terraform/trivy-scan.sh --mode iac ./infrastructure/terraform/modules || modules_exit_code=$?
1415

.github/actions/trivy-package/action.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ runs:
77
shell: bash
88
run: |
99
exit_code=0
10-
10+
asdf plugin add trivy || true
11+
asdf install trivy || true
1112
./scripts/terraform/trivy-scan.sh --mode package . || exit_code=$?
1213
1314
if [ $exit_code -ne 0 ]; then

.github/workflows/release_created.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ name: Github Release Created
22

33
on:
44
release:
5-
types: ["published"] # Inherits all input defaults
5+
types: ["released"] # Inherits all input defaults
6+
workflow_dispatch:
7+
inputs:
8+
releaseVersion:
9+
description: Release, tag, branch, or commit ID to be used for deployment
10+
required: false
11+
default: "main"
12+
type: string
613

714
concurrency:
815
group: ${{ github.workflow }}-${{ github.ref }}
@@ -27,7 +34,7 @@ jobs:
2734
APP_PEM_FILE: ${{ secrets.APP_PEM_FILE }}
2835
run: |
2936
bash .github/scripts/dispatch_internal_repo_workflow.sh \
30-
--releaseVersion "${{ github.event.release.tag_name }}" \
37+
--releaseVersion "${{ github.event.release.tag_name || inputs.releaseVersion }}" \
3138
--targetWorkflow "dispatch-deploy-static-notify-supplier-api-env.yaml" \
3239
--targetEnvironment "main" \
3340
--targetAccountGroup "nhs-notify-supplier-api-nonprod" \
@@ -58,5 +65,5 @@ jobs:
5865
environment: "main"
5966
apimEnv: "int"
6067
runId: "${{ github.run_id }}"
61-
releaseVersion: "${{ github.event.release.tag_name }}"
68+
releaseVersion: "${{ github.event.release.tag_name || inputs.releaseVersion }}"
6269
isRelease: true

.github/workflows/stage-1-commit.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,6 @@ jobs:
169169
uses: actions/checkout@v4
170170
- name: "Setup ASDF"
171171
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
172-
- name: "Repo setup"
173-
uses: ./.github/actions/node-install
174-
with:
175-
node-version: ${{ inputs.nodejs_version }}
176-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177-
- name: "Perform Setup"
178-
uses: ./.github/actions/setup
179172
- name: "Trivy IaC Scan"
180173
uses: ./.github/actions/trivy-iac
181174
trivy-package:
@@ -191,13 +184,6 @@ jobs:
191184
uses: actions/checkout@v4
192185
- name: "Setup ASDF"
193186
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
194-
- name: "Repo setup"
195-
uses: ./.github/actions/node-install
196-
with:
197-
node-version: ${{ inputs.nodejs_version }}
198-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
199-
- name: "Perform Setup"
200-
uses: ./.github/actions/setup
201187
- name: "Trivy Package Scan"
202188
uses: ./.github/actions/trivy-package
203189
count-lines-of-code:

.github/workflows/stage-2-test.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ jobs:
7575
name: "Unit tests"
7676
runs-on: ubuntu-latest
7777
timeout-minutes: 5
78+
env:
79+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7880
steps:
7981
- name: "Checkout code"
8082
uses: actions/checkout@v5
@@ -149,6 +151,8 @@ jobs:
149151
name: "Linting"
150152
runs-on: ubuntu-latest
151153
timeout-minutes: 5
154+
env:
155+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152156
steps:
153157
- name: "Checkout code"
154158
uses: actions/checkout@v5
@@ -180,6 +184,8 @@ jobs:
180184
name: "Typecheck"
181185
runs-on: ubuntu-latest
182186
timeout-minutes: 5
187+
env:
188+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
183189
steps:
184190
- name: "Checkout code"
185191
uses: actions/checkout@v5

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"debug": "JEKYLL_ENV=development BUNDLE_GEMFILE=Gemfile bundle exec jekyll serve --config _config.yml,_config.dev.yml,_config.version.yml --limit_posts 100 --trace",
1616
"generate-includes": "./generate-includes.sh",
1717
"lint": "echo \"Documentation module has no code to lint\"",
18+
"lint:fix": "echo \"Documentation module has no code to lint\"",
1819
"test:unit": "echo \"Documentation module has no unit tests\"",
1920
"typecheck": "echo \"Documentation module has no typescript to typecheck\""
2021
},

infrastructure/terraform/components/api/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ No requirements.
5252
| <a name="module_letter_status_updates_queue"></a> [letter\_status\_updates\_queue](#module\_letter\_status\_updates\_queue) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-sqs.zip | n/a |
5353
| <a name="module_letter_updates_transformer"></a> [letter\_updates\_transformer](#module\_letter\_updates\_transformer) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
5454
| <a name="module_logging_bucket"></a> [logging\_bucket](#module\_logging\_bucket) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-s3bucket.zip | n/a |
55+
| <a name="module_mi_updates_transformer"></a> [mi\_updates\_transformer](#module\_mi\_updates\_transformer) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-lambda.zip | n/a |
5556
| <a name="module_patch_letter"></a> [patch\_letter](#module\_patch\_letter) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
5657
| <a name="module_post_letters"></a> [post\_letters](#module\_post\_letters) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
5758
| <a name="module_post_mi"></a> [post\_mi](#module\_post\_mi) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
resource "aws_lambda_event_source_mapping" "mi_updates_transformer_kinesis" {
2+
event_source_arn = aws_kinesis_stream.mi_change_stream.arn
3+
function_name = module.mi_updates_transformer.function_arn
4+
starting_position = "LATEST"
5+
batch_size = 10
6+
maximum_batching_window_in_seconds = 1
7+
8+
depends_on = [
9+
module.mi_updates_transformer # ensures updates transformer exists
10+
]
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
resource "aws_kinesis_stream" "mi_change_stream" {
2+
name = "${local.csi}-mi-change-stream"
3+
shard_count = 1
4+
retention_period = 24
5+
}
6+
7+
resource "aws_dynamodb_kinesis_streaming_destination" "mi_streaming_destination" {
8+
stream_arn = aws_kinesis_stream.mi_change_stream.arn
9+
table_name = aws_dynamodb_table.mi.name
10+
approximate_creation_date_time_precision = "MILLISECOND"
11+
}

0 commit comments

Comments
 (0)