Skip to content

Commit 18f8e9e

Browse files
authored
Build: [AEA-4506] - Move to communal QC (#1402)
## Summary - 🤖 Operational or Infrastructure Change ### Details Replace the `quality-checks.yml` file in the repo with the communal one shared across all EPS projects Also removes the unused `create_certs.sh` script
1 parent 7c572b5 commit 18f8e9e

File tree

10 files changed

+22
-520
lines changed

10 files changed

+22
-520
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99

1010
jobs:
1111
quality_checks:
12-
uses: ./.github/workflows/quality_checks.yml
12+
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v3.0.0
1313
secrets:
1414
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1515

.github/workflows/pr-link.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,25 @@ jobs:
1414

1515
- name: Grab ticket name
1616
if: contains(github.event.pull_request.head.ref, 'aea-') || contains(github.event.pull_request.head.ref, 'AEA-') || contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'apmspii-') || contains(github.event.pull_request.head.ref, 'APMSPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
17-
run: echo name=TICKET_NAME::"$(echo "$REF" | grep -i -o '\(aea-[0-9]\+\)\|\(apm-[0-9]\+\)\|\(apmspii-[0-9]\+\)\|\(adz-[0-9]\+\)|\(amb-[0-9]\+\)' | tr '[:lower:]' '[:upper:]')" >> "$GITHUB_ENV"
1817
continue-on-error: true
19-
env:
20-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
18+
run: |
19+
# Match ticket name patterns
20+
REGEX='
21+
(aea-[0-9]+)|
22+
(apm-[0-9]+)|
23+
(apmspii-[0-9]+)|
24+
(adz-[0-9]+)|
25+
(amb-[0-9]+)
26+
'
27+
28+
# Remove whitespace and newlines from the regex
29+
REGEX=$(echo "$REGEX" | tr -d '[:space:]')
30+
31+
# Extract the ticket name and convert to uppercase
32+
TICKET_NAME=$(echo "$REF" | grep -i -E -o "$REGEX" | tr '[:lower:]' '[:upper:]')
33+
34+
# Set the environment variable
35+
echo "TICKET_NAME=$TICKET_NAME" >> "$GITHUB_ENV"
2136
2237
- name: Comment on PR with link to JIRA ticket
2338
if: contains(github.event.pull_request.head.ref, 'aea-') || contains(github.event.pull_request.head.ref, 'AEA-') || contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'apmspii-') || contains(github.event.pull_request.head.ref, 'APMSPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
@@ -27,5 +42,5 @@ jobs:
2742
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2843
with:
2944
msg: |
30-
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket:
45+
This branch is work on a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:
3146
# [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME }})

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99

1010
jobs:
1111
quality_checks:
12-
uses: ./.github/workflows/quality_checks.yml
12+
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v3.0.0
1313
secrets:
1414
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1515

.github/workflows/quality_checks.yml

Lines changed: 0 additions & 143 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
quality_checks:
8-
uses: ./.github/workflows/quality_checks.yml
8+
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v3.0.0
99
secrets:
1010
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1111

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ Workflows are in the .github/workflows folder
266266
- `combine-dependabot-prs.yml`: Workflow for combining dependabot pull requests. Runs on demand
267267
- `delete_old_cloudformation_stacks.yml`: Workflow for deleting old cloud formation stacks. Runs daily
268268
- `pull_request.yml`: Called when pull request is opened or updated. Calls sam_package_code and sam_release_code to build and deploy the code. Deploys to dev AWS account. The main and sandbox stacks deployed have PR-<PULL_REQUEST_ID> in the name
269-
- `quality_checks.yml`: Runs check-licenses, lint, test and sonarcloud scan against the repo. Called from pull_request.yml and release.yml
270269
- `release.yml`: Runs on demand to create a release and deploy to all environments.
271270
- `sam_package_code.yml`: Packages code and uploads to a github artifact for later deployment
272271
- `sam_release_code.yml`: Release code built by sam_package_code.yml to an environment

privateCA/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

privateCA/README.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)