Skip to content

Commit 722384e

Browse files
committed
(ELI-466) pulling in main
2 parents 0743591 + 50c0563 commit 722384e

40 files changed

+1788
-401
lines changed

.github/workflows/base-deploy.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
--region eu-west-2
155155
156156
- name: "Upload lambda artifact for the current workflow"
157-
uses: actions/upload-artifact@v4
157+
uses: actions/upload-artifact@v5
158158
with:
159159
name: lambda-${{ needs.metadata.outputs.tag }}
160160
path: ./dist/lambda.zip
@@ -182,7 +182,7 @@ jobs:
182182
terraform_version: ${{ needs.metadata.outputs.terraform_version }}
183183

184184
- name: "Download Lambda Artifact"
185-
uses: actions/download-artifact@v5
185+
uses: actions/download-artifact@v6
186186
with:
187187
name: lambda-${{ needs.metadata.outputs.tag }}
188188
path: ./dist
@@ -220,12 +220,6 @@ jobs:
220220
echo "bucket_name=$BUCKET" >> $GITHUB_OUTPUT
221221
working-directory: ./infrastructure/stacks/api-layer
222222

223-
- name: "Upload lambda artifact to S3"
224-
run: |
225-
aws s3 cp ./dist/lambda.zip \
226-
s3://${{ steps.tf_output.outputs.bucket_name }}/artifacts/${{ needs.metadata.outputs.tag }}/lambda.zip \
227-
--region eu-west-2
228-
229223
- name: "Validate Feature Toggles"
230224
env:
231225
ENV: ${{ needs.metadata.outputs.environment }}
@@ -245,6 +239,17 @@ jobs:
245239
pip install requests
246240
python scripts/workflow/tag_and_release.py
247241
242+
- name: "Capture release tag"
243+
id: release_tag
244+
run: |
245+
echo "release_tag=$(cat release_tag.txt)" >> $GITHUB_OUTPUT
246+
247+
- name: "Upload lambda artifact to S3"
248+
run: |
249+
aws s3 cp ./dist/lambda.zip \
250+
s3://${{ steps.tf_output.outputs.bucket_name }}/artifacts/${{ steps.release_tag.outputs.release_tag }}/lambda.zip \
251+
--region eu-west-2
252+
248253
249254
regression-tests:
250255
name: "Regression Tests"

.github/workflows/cicd-2-publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
make build
8383
8484
- name: "Upload lambda artefact for cross-workflow use"
85-
uses: actions/upload-artifact@v4
85+
uses: actions/upload-artifact@v5
8686
with:
8787
name: lambda-${{ needs.metadata.outputs.version }}
8888
path: dist/lambda.zip

.github/workflows/cicd-3-test-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
aws-region: eu-west-2
7474

7575
- name: "Download lambda artefact from dev workflow"
76-
uses: actions/download-artifact@v5
76+
uses: actions/download-artifact@v6
7777
with:
7878
name: lambda-${{ needs.metadata.outputs.tag }}
7979
path: ./dist

.github/workflows/sonarcube-scan-main-branch.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
make test-unit
3030
- name: "Save the coverage check result"
31-
uses: actions/upload-artifact@v4
31+
uses: actions/upload-artifact@v5
3232
with:
3333
name: coverage.xml
3434
path: coverage.xml
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
fetch-depth: 0
4343
- name: "Get the coverage report"
44-
uses: actions/download-artifact@v5
44+
uses: actions/download-artifact@v6
4545
with:
4646
name: coverage.xml
4747
- name: Run static analysis script

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
output_format: sarif
102102
output_file_path: checkov-report.sarif
103103
- name: Upload Checkov results to GitHub Security tab
104-
uses: actions/upload-artifact@v4
104+
uses: actions/upload-artifact@v5
105105
with:
106106
name: checkov_results
107107
path: checkov-report.sarif

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
run: |
4949
make test-unit
5050
- name: "Save the coverage check result"
51-
uses: actions/upload-artifact@v4
51+
uses: actions/upload-artifact@v5
5252
with:
5353
name: coverage.xml
5454
path: coverage.xml
@@ -83,7 +83,7 @@ jobs:
8383
with:
8484
fetch-depth: 0 # Full history is needed to improving relevancy of reporting
8585
- name: "Get the coverage report"
86-
uses: actions/download-artifact@v5
86+
uses: actions/download-artifact@v6
8787
with:
8888
name: coverage.xml
8989
- name: "Perform static analysis"

.github/workflows/stage-3-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
make dependencies install-python
5050
make build
5151
- name: "Upload lambda artefact"
52-
uses: actions/upload-artifact@v4
52+
uses: actions/upload-artifact@v5
5353
with:
5454
name: lambda
5555
path: dist/lambda.zip

.github/workflows/stage-4-acceptance.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
with:
121121
python-version: '3.13'
122122
- name: "Get lambda artefact"
123-
uses: actions/download-artifact@v5
123+
uses: actions/download-artifact@v6
124124
with:
125125
name: lambda
126126
path: dist
@@ -132,13 +132,13 @@ jobs:
132132
echo "Nothing to save"
133133
- name: Upload Integration Test Results
134134
if: always()
135-
uses: actions/upload-artifact@v4
135+
uses: actions/upload-artifact@v5
136136
with:
137137
name: integration-test-results
138138
path: integration-test-results.xml
139139
- name: Gather Integration Test Summaries
140140
if: always()
141-
uses: actions/download-artifact@v5
141+
uses: actions/download-artifact@v6
142142
with:
143143
path: summary
144144
pattern: ci-summary-*

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ check-licenses:
4343
build: dist/lambda.zip # Build lambda.zip in dist/
4444

4545
dist/lambda.zip: $(MAKE_DIR)/pyproject.toml $(MAKE_DIR)/poetry.lock $(shell find src -type f)
46-
poetry build-lambda -vv
46+
poetry build-lambda -vv && poetry run clean-lambda
4747

4848
deploy: # Deploy the project artefact to the target environment @Pipeline
4949
# TODO: Implement the artefact deployment step

infrastructure/stacks/api-layer/api_gateway.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ resource "aws_api_gateway_stage" "eligibility-signposting-api" {
5151
stage_name = "${local.workspace}-eligibility-signposting-api-live"
5252
xray_tracing_enabled = true
5353

54+
# Access log settings
55+
# A subscription filter (see csoc_log_forwarding.tf) forwards these logs to CSOC
5456
access_log_settings {
5557
destination_arn = module.eligibility_signposting_api_gateway.cloudwatch_destination_arn
56-
format = "{ \"requestId\":\"$context.requestId\", \"ip\": \"$context.identity.sourceIp\", \"caller\":\"$context.identity.caller\", \"user\":\"$context.identity.user\", \"requestTime\":\"$context.requestTime\", \"httpMethod\":\"$context.httpMethod\", \"resourcePath\":\"$context.resourcePath\", \"status\":\"$context.status\", \"protocol\":\"$context.protocol\", \"responseLength\":\"$context.responseLength\", \"accountId\":\"$context.accountId\", \"apiId\":\"$context.apiId\", \"stage\":\"$context.stage\", \"domainName\":\"$context.domainName\", \"error_message\":\"$context.error.message\", \"clientCertSerialNumber\":\"$context.identity.clientCert.serialNumber\", \"clientCertValidityNotBefore\":\"$context.identity.clientCert.validity.notBefore\", \"clientCertValidityNotAfter\":\"$context.identity.clientCert.validity.notAfter\" }"
58+
format = "{ \"requestId\":\"$context.requestId\", \"ip\": \"$context.identity.sourceIp\", \"caller\":\"$context.identity.caller\", \"user\":\"$context.identity.user\", \"requestTime\":\"$context.requestTime\", \"httpMethod\":\"$context.httpMethod\", \"resourcePath\":\"$context.resourcePath\", \"status\":\"$context.status\", \"protocol\":\"$context.protocol\", \"responseLength\":\"$context.responseLength\", \"accountId\":\"$context.accountId\", \"apiId\":\"$context.apiId\", \"stage\":\"$context.stage\", \"api_key\":\"$context.identity.apiKey\" }"
5759
}
5860

5961
depends_on = [

0 commit comments

Comments
 (0)