Skip to content

Commit 2200d34

Browse files
authored
[PRM-516] Add run-names to NDR workflows (#953)
1 parent 4e20ffb commit 2200d34

Some content is hidden

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

46 files changed

+298
-234
lines changed

.github/workflows/base-cypress-build.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
# .github/workflows/terraform-dev
2-
name: 'Z-BASE Cypress Build: Run a cypress build job'
1+
name: "Z-BASE Cypress Build: Run a cypress build job"
2+
3+
run-name: "${{ github.event.inputs.build_branch }}"
34

45
on:
56
workflow_call:
67
inputs:
78
build_branch:
8-
description: 'Branch with smoke tests.'
9+
description: "Branch with smoke tests."
910
required: true
10-
type: 'string'
11+
type: "string"
1112

1213
permissions:
1314
pull-requests: write
@@ -22,13 +23,13 @@ jobs:
2223
- name: Checkout
2324
uses: actions/checkout@v6
2425
with:
25-
repository: 'NHSDigital/national-document-repository'
26+
repository: "NHSDigital/national-document-repository"
2627
ref: ${{ github.event.inputs.build_branch }}
2728

2829
- name: Cypress install
2930
run: npm install --legacy-peer-deps
3031
working-directory: ./app
31-
32+
3233
- name: Configure React environment vars
3334
env:
3435
ENDPOINT_DOC_STORE_API: http://localhost:3000
@@ -37,7 +38,7 @@ jobs:
3738
IDENTITY_PROVIDER_POOL_ID: not provided yet
3839
MONITOR_ACCOUNT_ID: not provided yet
3940
BUILD_ENV: development
40-
IMAGE_VERSION: 'not-required'
41+
IMAGE_VERSION: "not-required"
4142
run: |
4243
./react-environment-config.sh
4344
working-directory: ./app

.github/workflows/base-cypress-smoketest.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# .github/workflows/terraform-dev
21
name: "Z-BASE Cypress Smoketest: Smoketest shared actions for running"
32

3+
run-name: "${{ github.event.inputs.build_branch }} | ${{ github.event.inputs.environment }} | ${{ github.event.inputs.sandbox }}"
4+
45
on:
56
workflow_call:
67
inputs:

.github/workflows/base-cypress-test-all-env.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: "Z-BASE Cypress Test: Run a cypress test job against all browsers"
22

3+
run-name: "${{ github.event.inputs.cypress_base_url }} | ${{ github.event.inputs.build_branch }}"
4+
35
on:
46
workflow_call:
57
inputs:
@@ -21,7 +23,7 @@ jobs:
2123
view_action_parameters:
2224
name: View input params
2325
runs-on: ubuntu-latest
24-
steps:
26+
steps:
2527
- name: Display client passed variables
2628
run: |
2729
echo Build Branch: ${{ inputs.build_branch }}

.github/workflows/base-cypress-test.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
# .github/workflows/terraform-dev
2-
name: 'Z-BASE Cypress Test Base: Run a cypress test job against a specific browser'
1+
name: "Z-BASE Cypress Test Base: Run a cypress test job against a specific browser"
2+
3+
run-name: "${{ github.event.inputs.build_branch }} | ${{ github.event.inputs.cypress_base_url }} | ${{ github.event.inputs.cypress_browser }}"
34

45
on:
56
workflow_call:
67
inputs:
78
build_branch:
8-
description: 'Branch with smoke tests.'
9+
description: "Branch with smoke tests."
910
required: true
10-
type: 'string'
11+
type: "string"
1112
cypress_base_url:
12-
description: 'Base URL to run tests against'
13+
description: "Base URL to run tests against"
1314
required: true
14-
type: 'string'
15+
type: "string"
1516
cypress_browser:
16-
description: 'what browser to run against'
17+
description: "what browser to run against"
1718
required: true
18-
type: 'string'
19+
type: "string"
1920

2021
permissions:
2122
pull-requests: write
@@ -39,7 +40,7 @@ jobs:
3940
- name: Checkout
4041
uses: actions/checkout@v6
4142
with:
42-
repository: 'NHSDigital/national-document-repository'
43+
repository: "NHSDigital/national-document-repository"
4344
ref: ${{ inputs.build_branch }}
4445

4546
- name: Download the build folder
@@ -69,7 +70,7 @@ jobs:
6970
working-directory: ./app
7071
env:
7172
CYPRESS_BASE_URL: ${{ inputs.cypress_base_url }}
72-
CYPRESS_grepTags: 'regression'
73+
CYPRESS_grepTags: "regression"
7374

7475
- uses: actions/upload-artifact@v5
7576
if: failure()

.github/workflows/base-data-collection.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: "Z-BASE Deploy Data Collection: Build data collection image"
22

3+
run-name: "${{ github.event.inputs.build_branch }} | ${{ github.event.inputs.environment }} | ${{ github.event.inputs.sandbox }}"
4+
35
on:
46
workflow_call:
57
inputs:
@@ -32,9 +34,9 @@ jobs:
3234
steps:
3335
- uses: actions/checkout@v6
3436
with:
35-
repository: 'NHSDigital/national-document-repository'
37+
repository: "NHSDigital/national-document-repository"
3638
ref: ${{ inputs.build_branch }}
37-
fetch-depth: '0'
39+
fetch-depth: "0"
3840

3941
- name: Configure AWS Credentials
4042
uses: aws-actions/configure-aws-credentials@v5

.github/workflows/base-deploy-ui.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# .github/workflows/terraform-dev
21
name: "Z-BASE Deploy UI: Run a deploy job for the UI"
32

3+
run-name: "${{ github.event.inputs.build_branch }} | ${{ github.event.inputs.environment }} | ${{ github.event.inputs.sandbox }}"
4+
45
on:
56
workflow_call:
67
inputs:
@@ -21,7 +22,7 @@ on:
2122
required: true
2223

2324
permissions:
24-
actions: read # Required for anchore/sbom-action
25+
actions: read # Required for anchore/sbom-action
2526
contents: write # Required for anchore/sbom-action
2627
id-token: write # This is required for requesting the JWT
2728
pull-requests: write
@@ -37,9 +38,9 @@ jobs:
3738
steps:
3839
- uses: actions/checkout@v6
3940
with:
40-
repository: 'NHSDigital/national-document-repository'
41+
repository: "NHSDigital/national-document-repository"
4142
ref: ${{ inputs.build_branch }}
42-
fetch-depth: '0'
43+
fetch-depth: "0"
4344

4445
- name: Configure AWS Credentials
4546
uses: aws-actions/configure-aws-credentials@v5
@@ -48,10 +49,10 @@ jobs:
4849
role-skip-session-tagging: true
4950
aws-region: ${{ vars.AWS_REGION }}
5051
mask-aws-account-id: true
51-
52+
5253
- name: Get SSM parameters
5354
id: ssm-parameters
54-
run: |
55+
run: |
5556
doc_store_api_endpoint=$(aws ssm get-parameter --name "/ndr/${{ inputs.sandbox }}/api_endpoint" --with-decryption --query "Parameter.Value" --output text)
5657
echo "::add-mask::$doc_store_api_endpoint"
5758
echo "ENDPOINT_DOC_STORE_API=$doc_store_api_endpoint" >> $GITHUB_ENV
@@ -65,7 +66,7 @@ jobs:
6566
cloudfront_domain_name=$(aws cloudfront list-distributions --query "DistributionList.Items[?starts_with(Origins.Items[0].DomainName, '${{ inputs.sandbox }}')].DomainName" --output text)
6667
echo "Cloudfront domain name found for environment: $cloudfront_domain_name"
6768
echo "CLOUDFRONT_DOMAIN_NAME=$cloudfront_domain_name" >> $GITHUB_ENV
68-
69+
6970
- name: Login to Amazon ECR
7071
id: login-ecr
7172
uses: aws-actions/amazon-ecr-login@v2
@@ -86,16 +87,16 @@ jobs:
8687
--query "AppMonitorSummaries[?starts_with(Name, '${{ inputs.sandbox }}')].Id" \
8788
--output text)
8889
echo "::add-mask::$app_monitor_id"
89-
echo "MONITOR_ACCOUNT_ID=$app_monitor_id" >> $GITHUB_OUTPUT
90+
echo "MONITOR_ACCOUNT_ID=$app_monitor_id" >> $GITHUB_OUTPUT
9091
9192
- name: Configure React environment vars
9293
env:
9394
AWS_REGION: ${{ vars.AWS_REGION }}
9495
OIDC_PROVIDER_ID: not provided yet
95-
IDENTITY_PROVIDER_POOL_ID: ${{ steps.cognito-identity-pool.outputs.IDENTITY_PROVIDER_POOL_ID }}
96-
MONITOR_ACCOUNT_ID: ${{ steps.rum-app-monitor.outputs.MONITOR_ACCOUNT_ID }}
96+
IDENTITY_PROVIDER_POOL_ID: ${{ steps.cognito-identity-pool.outputs.IDENTITY_PROVIDER_POOL_ID }}
97+
MONITOR_ACCOUNT_ID: ${{ steps.rum-app-monitor.outputs.MONITOR_ACCOUNT_ID }}
9798
BUILD_ENV: ${{ inputs.environment }}
98-
IMAGE_VERSION: 'ndr-${{ inputs.sandbox }}-app:${{ github.sha }}'
99+
IMAGE_VERSION: "ndr-${{ inputs.sandbox }}-app:${{ github.sha }}"
99100
run: |
100101
./react-environment-config.sh
101102

.github/workflows/base-e2e-backendtest.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# .github/workflows/terraform-dev
21
name: "Z-BASE E2e Test: E2e shared actions for running tests on the NDR Backend"
32

3+
run-name: "${{ github.event.inputs.build_branch }} | ${{ github.event.inputs.environment }} | ${{ github.event.inputs.sandbox }}"
4+
45
on:
56
workflow_call:
67
inputs:

.github/workflows/base-e2e-fhir-backendtest.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# .github/workflows/terraform-dev
21
name: "Z-BASE FHIR API E2E Test: E2e shared actions for running FHIR API tests on the NDR Backend"
32

3+
run-name: "${{ github.event.inputs.build_branch }} | ${{ github.event.inputs.environment }} | ${{ github.event.inputs.sandbox }}"
4+
45
on:
56
workflow_call:
67
inputs:

.github/workflows/base-lambda-layer-reusable-publish-all.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
name: 'ZBASE Lambda Layers: Deploy all required Lambda layers'
1+
name: "ZBASE Lambda Layers: Deploy all required Lambda layers"
2+
3+
run-name: "${{ github.event.inputs.environment }} | ${{ github.event.inputs.python_version }} | ${{ github.event.inputs.build_branch }} | ${{ github.event.inputs.sandbox }}"
24

35
on:
46
workflow_call:
@@ -10,13 +12,13 @@ on:
1012
required: true
1113
type: string
1214
build_branch:
13-
description: 'Feature branch to push to test?'
15+
description: "Feature branch to push to test?"
1416
required: true
15-
type: 'string'
17+
type: "string"
1618
sandbox:
17-
description: 'Which Sandbox to push to'
19+
description: "Which Sandbox to push to"
1820
required: true
19-
type: 'string'
21+
type: "string"
2022
secrets:
2123
AWS_ASSUME_ROLE:
2224
required: true
@@ -84,4 +86,4 @@ jobs:
8486
sandbox: ${{ inputs.sandbox }}
8587
lambda_layer_name: alerting_lambda_layer
8688
secrets:
87-
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}
89+
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}

.github/workflows/base-lambda-layer-reusable-publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
name: 'Z-BASE Lambda Layer: action to deploy a single lambda layer'
1+
name: "Z-BASE Lambda Layer: action to deploy a single lambda layer"
2+
3+
run-name: "${{ github.event.inputs.environment }} | ${{ github.event.inputs.python_version }} | ${{ github.event.inputs.build_branch }} | ${{ github.event.inputs.sandbox }} | ${{ github.event.inputs.lambda_layer_name }}"
24

35
on:
46
workflow_call:
@@ -47,9 +49,9 @@ jobs:
4749
- name: Checkout
4850
uses: actions/checkout@v6
4951
with:
50-
repository: 'NHSDigital/national-document-repository'
52+
repository: "NHSDigital/national-document-repository"
5153
ref: ${{ inputs.build_branch }}
52-
fetch-depth: '0'
54+
fetch-depth: "0"
5355

5456
- name: Set up Python ${{ inputs.python_version }}
5557
uses: actions/setup-python@v6

0 commit comments

Comments
 (0)