Skip to content

Commit 08f1ddd

Browse files
New: [AEA-6028] - Added shared code for CDK and Proxygen deployments (#432)
## Summary - ✨ New Feature
1 parent bec1d82 commit 08f1ddd

31 files changed

+5055
-1643
lines changed

.github/scripts/check_ecr_image_scan_results.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ for i in {1..30}; do
4545
--repository-name "$REPOSITORY_NAME" \
4646
--image-id imageDigest="$IMAGE_DIGEST" \
4747
--query 'imageScanStatus.status' \
48-
--output text 2>/dev/null || echo "NONE")
48+
--output text | grep -v "None" | head -n 1 2>/dev/null || echo "NONE"| grep -oE '^[^ ]+' | grep -v "None")
4949

5050
if [[ "$STATUS" == "COMPLETE" ]]; then
5151
echo "ECR scan completed."

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,13 @@ jobs:
5353

5454
tag_release:
5555
needs: [quality_checks, get_commit_id, get_asdf_version]
56-
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release.yml@9791a77de7b005056b4ddfb9789306f5179f53da
56+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release.yml@86ef0ff808222a9270c7b4fd041cb6af68399c98
5757
with:
5858
dry_run: true
5959
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
6060
branch_name: main
61-
publish_package: true
61+
publish_package: false
62+
publish_subpackages: packages/cdkConstructs,packages/deploymentUtils
6263
tag_format: ${{ needs.get_asdf_version.outputs.tag_format }}
6364
secrets: inherit
6465

.github/workflows/pull_request.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,12 @@ jobs:
109109

110110
tag_release:
111111
needs: [get_commit_id, get_asdf_version]
112-
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release.yml@9791a77de7b005056b4ddfb9789306f5179f53da
112+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release.yml@86ef0ff808222a9270c7b4fd041cb6af68399c98
113113
with:
114114
dry_run: true
115115
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
116116
branch_name: ${{ github.event.pull_request.head.ref }}
117-
publish_package: true
117+
publish_package: false
118+
publish_subpackages: packages/cdkConstructs,packages/deploymentUtils
118119
tag_format: ${{ needs.get_asdf_version.outputs.tag_format }}
119120
secrets: inherit

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ jobs:
5454

5555
tag_release:
5656
needs: [quality_checks, get_commit_id, get_asdf_version]
57-
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release.yml@9791a77de7b005056b4ddfb9789306f5179f53da
57+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release.yml@86ef0ff808222a9270c7b4fd041cb6af68399c98
5858
with:
5959
dry_run: false
6060
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
6161
branch_name: main
62-
publish_package: true
62+
publish_package: false
63+
publish_subpackages: packages/cdkConstructs,packages/deploymentUtils
6364
tag_format: ${{ needs.get_asdf_version.outputs.tag_format }}
6465
secrets: inherit
6566

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,14 @@ repos:
5050
types_or: [ts, tsx, javascript, jsx, json]
5151
pass_filenames: false
5252

53+
- id: lint-deploymentUtils
54+
name: Lint deploymentUtils
55+
entry: npm
56+
args: ["run", "--prefix=packages/deploymentUtils", "lint"]
57+
language: system
58+
files: ^packages\/deploymentUtils
59+
types_or: [ts, tsx, javascript, jsx, json]
60+
pass_filenames: false
61+
5362
fail_fast: true
5463
default_stages: [pre-commit]

.vscode/eps-cdk-utils.code-workspace

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@
77
{
88
"name": "packages/cdkConstructs",
99
"path": "../packages/cdkConstructs"
10+
},
11+
{
12+
"name": "packages/deploymentUtils",
13+
"path": "../packages/deploymentUtils"
1014
}
1115
],
1216
"settings": {
1317
"files.exclude": {
14-
"packages/": true,
18+
"packages/": true,
1519
},
16-
"cSpell.words": [
20+
"cSpell.words": [
1721
"apigw",
1822
"ASID",
1923
"AWSKMS",
@@ -49,6 +53,7 @@
4953
"pollable",
5054
"powertools",
5155
"Prosthetist",
56+
"proxygen",
5257
"querystring",
5358
"reingest",
5459
"reingested",

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ install-hooks: install-python
2020
lint-node:
2121
npm run lint
2222
npm run lint --workspace packages/cdkConstructs
23+
npm run lint --workspace packages/deploymentUtils
2324

2425
lint-githubactions:
2526
actionlint
@@ -32,6 +33,8 @@ lint: lint-node lint-githubactions lint-githubaction-scripts
3233
clean:
3334
rm -rf packages/cdkConstructs/lib
3435
rm -rf packages/cdkConstructs/coverage
36+
rm -rf packages/deploymentUtils/lib
37+
rm -rf packages/deploymentUtils/coverage
3538
rm -rf lib
3639

3740
deep-clean: clean
@@ -43,6 +46,7 @@ check-licenses: check-licenses-node check-licenses-python
4346
check-licenses-node:
4447
npm run check-licenses
4548
npm run check-licenses --workspace packages/cdkConstructs
49+
npm run check-licenses --workspace packages/deploymentUtils
4650

4751
check-licenses-python:
4852
scripts/check_python_licenses.sh
@@ -55,10 +59,13 @@ aws-login:
5559

5660
test: clean
5761
npm run test --workspace packages/cdkConstructs
62+
npm run test --workspace packages/deploymentUtils
5863

5964
package: build
6065
mkdir -p lib/
6166
npm pack --workspace packages/cdkConstructs --pack-destination lib/
67+
npm pack --workspace packages/deploymentUtils --pack-destination lib/
6268

6369
build:
6470
npm run build --workspace packages/cdkConstructs
71+
npm run build --workspace packages/deploymentUtils

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This repository contains a docker image used to deploy CDK to our environments a
66

77
- `docker/` Contains Dockerfile used to build image used fo for CDK deployments
88
- `packages/cdkConstructs/` Contains common CDK constructs used in EPS projects
9+
- `packages/depoymentUtils/` Contains shared code for standardizing OAS files and performing proxygen deployments
910
- `scripts/` Utilities helpful to developers of this specification
1011
- `.github/` Contains GitHub workflows that are used for building and deploying from pull requests and releases
1112

0 commit comments

Comments
 (0)