Skip to content

Commit 1c5b213

Browse files
committed
merge changes from master
Signed-off-by: Tim Ireland <[email protected]>
2 parents c0ad485 + 31e95ce commit 1c5b213

File tree

450 files changed

+27437
-35878
lines changed

Some content is hidden

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

450 files changed

+27437
-35878
lines changed

.eslintrc.json

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55
}
66
},
77
"extends": [
8-
"airbnb",
98
"eslint:recommended",
109
"plugin:@typescript-eslint/recommended",
1110
"plugin:jest/recommended",
1211
"plugin:jsx-a11y/recommended",
1312
"plugin:prettier/recommended",
14-
"plugin:react-hooks/recommended",
15-
"plugin:react/recommended",
1613
"plugin:security/recommended-legacy",
1714
"plugin:sonarjs/recommended-legacy",
1815
"plugin:unicorn/recommended"
@@ -24,14 +21,11 @@
2421
"jest",
2522
"jsx-a11y",
2623
"prettier",
27-
"react",
28-
"react-hooks",
2924
"security",
3025
"sonarjs",
3126
"unicorn"
3227
],
3328
"rules": {
34-
"react/display-name": "off",
3529
"no-restricted-syntax": "off",
3630
"consistent-return": "off",
3731
"prettier/prettier": "error",
@@ -45,16 +39,6 @@
4539
]
4640
}
4741
],
48-
"react/react-in-jsx-scope": "off",
49-
"react/jsx-filename-extension": "off",
50-
"react/jsx-props-no-spreading": "off",
51-
"react/function-component-definition": "off",
52-
"react/jsx-no-useless-fragment": [
53-
"error",
54-
{
55-
"allowExpressions": true
56-
}
57-
],
5842
"import/prefer-default-export": "off",
5943
"import/extensions": "off",
6044
"no-shadow": "off",
@@ -69,13 +53,10 @@
6953
],
7054
"security/detect-object-injection": "off",
7155
"sonarjs/no-duplicate-string": "off",
72-
"react/no-danger": "off",
7356
"no-param-reassign": "off",
74-
"react/require-default-props": "off",
7557
"no-useless-constructor": "off",
7658
"sonarjs/no-small-switch": "off",
7759
"sonarjs/no-unused-vars": "off",
78-
"react/jsx-no-bind": "off",
7960
"unicorn/no-null": "off",
8061
"prefer-regex-literals": "off",
8162
"class-methods-use-this": "off",

.github/actions/lint-terraform/action.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ inputs:
77
runs:
88
using: "composite"
99
steps:
10-
- uses: hashicorp/setup-terraform@v3
11-
- uses: asdf-vm/actions/setup@v3
1210
- name: "Check Terraform format"
1311
shell: bash
1412
run: |
@@ -18,5 +16,6 @@ runs:
1816
run: |
1917
stacks=${{ inputs.root-modules }}
2018
for dir in $(find infrastructure/environments -maxdepth 1 -mindepth 1 -type d; echo ${stacks//,/$'\n'}); do
19+
dir=$dir opts='-backend=false' make terraform-init
2120
dir=$dir make terraform-validate
2221
done

.github/actions/normalize-branch-name/action.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@ name: "Normalize branch name"
22
description: "Normalize branch name"
33
outputs:
44
normalized_branch_name:
5+
description: 10 character branch identifier (0000-branch)
56
value: ${{ steps.normalize_branch_name.outputs.normalized_branch_name }}
67
runs:
78
using: "composite"
89
steps:
910
- id: normalize_branch_name
1011
shell: bash
11-
run: echo "normalized_branch_name=$(sed -e 's/[^a-zA-Z0-9-]//g' <<< $(git rev-parse --abbrev-ref HEAD) | tr '[:upper:]' '[:lower:]' | head -c 25)" >> $GITHUB_OUTPUT
12-
12+
run: |
13+
branch=$(git rev-parse --abbrev-ref HEAD)
14+
stripped=$(echo $branch | sed -e 's/[^a-zA-Z0-9-]//g' | tr '[:upper:]' '[:lower:]')
15+
starting_from_jira_ref=$(echo $stripped | sed -n 's/.*\([0-9]\{4,\}.*\)/\1/p')
16+
with_fallback=${starting_from_jira_ref:-$stripped}
17+
chopped=$(echo $with_fallback | head -c 10)
18+
echo "normalized_branch_name=$chopped" >> $GITHUB_OUTPUT

.github/actions/tfsec/action.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ description: "Scan HCL using TFSec"
33
runs:
44
using: "composite"
55
steps:
6-
- uses: hashicorp/setup-terraform@v3
7-
- uses: asdf-vm/actions/setup@v3
86
- name: "TFSec Scan - Components"
97
shell: bash
108
run: |

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ jobs:
3636
echo "build_datetime=$datetime" >> $GITHUB_OUTPUT
3737
echo "build_timestamp=$(date --date=$datetime -u +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
3838
echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT
39-
echo "nodejs_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
40-
echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
41-
echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
39+
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
40+
echo "python_version=$(grep "^python\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
41+
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4242
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
4343
- name: "Check if pull request exists for this branch"
4444
id: pr_exists

.github/workflows/pr_destroy_dynamic_env.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
"targetAccountGroup", $targetAccountGroup,
3636
"targetComponent", $targetComponent,
3737
"terraformAction", $terraformAction,
38-
"overrides", $overrides,
3938
}
4039
}')
4140

.github/workflows/scheduled-repository-template-sync.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727

2828
- name: Run syncronisation script
2929
run: |
30-
./scripts/githooks/sync-template-repo.sh
30+
./nhs-notify-repository-template/scripts/githooks/sync-template-repo.sh
3131
rm -Rf ./nhs-notify-repository-template
3232
3333
- name: Create Pull Request
3434
if: ${{ !env.ACT }}
35-
uses: peter-evans/[email protected].1
35+
uses: peter-evans/[email protected].7
3636
with:
3737
token: ${{ secrets.GITHUB_TOKEN }}
3838
commit-message: Drift from template

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,30 @@ jobs:
6666
fetch-depth: 0 # Full history is needed to compare branches
6767
- name: "Check Markdown format"
6868
uses: ./.github/actions/check-markdown-format
69+
terraform-docs:
70+
name: "Run terraform-docs"
71+
runs-on: ubuntu-latest
72+
needs: detect-terraform-changes
73+
if: needs.detect-terraform-changes.outputs.terraform_changed == 'true'
74+
permissions:
75+
contents: write
76+
steps:
77+
- name: "Checkout code"
78+
uses: actions/checkout@v4
79+
with:
80+
fetch-depth: 0 # Full history is needed to compare branches
81+
- name: "Check to see if Terraform Docs are up-to-date"
82+
run: |
83+
make terraform-docs
84+
- name: "Stage changes"
85+
run: |
86+
git add infrastructure/terraform/**/*.md
87+
- name: "Check for changes in Terraform Docs"
88+
run: |
89+
if git diff --cached --name-only | grep -qE '\.md$'; then
90+
echo "Markdown files have changed. Please run 'make terraform-docs' and commit the changes."
91+
exit 1
92+
fi
6993
check-english-usage:
7094
name: "Check English usage"
7195
runs-on: ubuntu-latest

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ jobs:
8989
runs-on: ubuntu-latest
9090
needs: [sandbox-set-up]
9191
environment: dev
92-
env:
93-
INCLUDE_AUTH_PAGES: 'true'
9492
timeout-minutes: 10
9593
steps:
9694
- name: "Checkout code"
@@ -124,8 +122,6 @@ jobs:
124122
runs-on: ubuntu-latest
125123
needs: [sandbox-set-up]
126124
environment: dev
127-
env:
128-
INCLUDE_AUTH_PAGES: 'true'
129125
timeout-minutes: 10
130126
steps:
131127
- name: "Checkout code"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*sbom*report*.json
66
*vulnerabilities*report*.json
77
*report*json.zip
8+
version.json
89
.version
910

1011
*.code-workspace

0 commit comments

Comments
 (0)