Skip to content

Commit e7e7eda

Browse files
committed
Merge remote-tracking branch 'origin/main' into syft_grype
2 parents 4567f4b + abfdd2f commit e7e7eda

23 files changed

Lines changed: 79 additions & 14 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"--network=host"
2323
],
2424
"remoteEnv": { "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" },
25-
"postAttachCommand": "git-secrets --register-aws; git-secrets --add-provider -- cat /usr/share/secrets-scanner/nhsd-rules-deny.txt",
25+
"postCreateCommand": "bash ${SCRIPTS_DIR}/post_create.sh",
26+
"postStartCommand": "bash ${SCRIPTS_DIR}/post_start.sh",
27+
"postAttachCommand": "bash ${SCRIPTS_DIR}/post_attach.sh",
2628
"features": {
2729
},
2830
"customizations": {

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ on:
55

66
jobs:
77
get_config_values:
8-
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@5ac2707dd9cd60ad127275179495b9c890d74711
8+
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@f2d4d6942115472d3f08316cd25f400b02a9dc69
99
with:
1010
verify_published_from_main_image: true
1111
quality_checks:
12-
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
12+
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@f2d4d6942115472d3f08316cd25f400b02a9dc69
1313
needs:
1414
- get_config_values
1515
with:
@@ -18,7 +18,7 @@ jobs:
1818
SONAR_TOKEN: '${{ secrets.SONAR_TOKEN }}'
1919
tag_release:
2020
needs: [quality_checks, get_config_values]
21-
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
21+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@f2d4d6942115472d3f08316cd25f400b02a9dc69
2222
permissions:
2323
id-token: write
2424
contents: write

.github/workflows/pull_request.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ jobs:
99
dependabot-auto-approve-and-merge:
1010
needs: quality_checks
1111
uses: >-
12-
NHSDigital/eps-common-workflows/.github/workflows/dependabot-auto-approve-and-merge.yml@5ac2707dd9cd60ad127275179495b9c890d74711
12+
NHSDigital/eps-common-workflows/.github/workflows/dependabot-auto-approve-and-merge.yml@f2d4d6942115472d3f08316cd25f400b02a9dc69
1313
secrets:
1414
AUTOMERGE_APP_ID: '${{ secrets.AUTOMERGE_APP_ID }}'
1515
AUTOMERGE_PEM: '${{ secrets.AUTOMERGE_PEM }}'
1616
get_config_values:
17-
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@5ac2707dd9cd60ad127275179495b9c890d74711
17+
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@f2d4d6942115472d3f08316cd25f400b02a9dc69
1818
with:
1919
verify_published_from_main_image: false
2020
quality_checks:
21-
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
21+
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@f2d4d6942115472d3f08316cd25f400b02a9dc69
2222
needs:
2323
- get_config_values
2424
with:
@@ -27,7 +27,7 @@ jobs:
2727
SONAR_TOKEN: '${{ secrets.SONAR_TOKEN }}'
2828
pr_title_format_check:
2929
uses: >-
30-
NHSDigital/eps-common-workflows/.github/workflows/pr_title_check.yml@5ac2707dd9cd60ad127275179495b9c890d74711
30+
NHSDigital/eps-common-workflows/.github/workflows/pr_title_check.yml@f2d4d6942115472d3f08316cd25f400b02a9dc69
3131
get_issue_number:
3232
runs-on: ubuntu-22.04
3333
needs: quality_checks

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: release workflow
22
on:
33
workflow_dispatch:
44
schedule:
5-
- cron: "0 18 * * 4"
5+
- cron: "0 18 * * 3"
66

77
jobs:
88
get_config_values:
9-
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@5ac2707dd9cd60ad127275179495b9c890d74711
9+
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@f2d4d6942115472d3f08316cd25f400b02a9dc69
1010
with:
1111
verify_published_from_main_image: false
1212
quality_checks:
13-
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
13+
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@f2d4d6942115472d3f08316cd25f400b02a9dc69
1414
needs:
1515
- get_config_values
1616
with:
@@ -19,7 +19,7 @@ jobs:
1919
SONAR_TOKEN: '${{ secrets.SONAR_TOKEN }}'
2020
tag_release:
2121
needs: [quality_checks, get_config_values]
22-
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
22+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@f2d4d6942115472d3f08316cd25f400b02a9dc69
2323
permissions:
2424
id-token: write
2525
contents: write

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ src/base/.devcontainer/language_versions/
55
.out/
66
.envrc
77
.sbom/
8+
.grype_out/

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,12 @@ build-grant:
7373
docker build -f src/base/.devcontainer/Dockerfile.grant --tag local_grant src/base/.devcontainer/
7474

7575
build-image: build-syft build-grype build-grant guard-CONTAINER_NAME guard-BASE_VERSION_TAG guard-BASE_FOLDER guard-IMAGE_TAG
76+
workspace_folder="$${CONTAINER_NAME}"; \
77+
case "$${CONTAINER_NAME}" in \
78+
eps_*) workspace_folder="$$(printf '%s' "$${CONTAINER_NAME}" | tr '_' '-')" ;; \
79+
esac; \
7680
npx devcontainer build \
77-
--workspace-folder ./src/$${BASE_FOLDER}/$${CONTAINER_NAME} \
81+
--workspace-folder ./src/$${BASE_FOLDER}/$${workspace_folder} \
7882
$(NO_CACHE_FLAG) \
7983
--push false \
8084
--output type=image,name="${CONTAINER_PREFIX}$${CONTAINER_NAME}:$${IMAGE_TAG}",push=false,compression=zstd \

src/base/.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ENV CONTAINER_NAME=${CONTAINER_NAME}
1313
ENV TARGETARCH=${TARGETARCH}
1414

1515
COPY .tool-versions.asdf ${SCRIPTS_DIR}/${CONTAINER_NAME}/.tool-versions.asdf
16+
COPY --chmod=755 scripts/lifecycle/*.sh ${SCRIPTS_DIR}/
1617
COPY --chmod=755 scripts/root_install.sh ${SCRIPTS_DIR}/${CONTAINER_NAME}/root_install.sh
1718
COPY --chmod=755 Mk ${SCRIPTS_DIR}/Mk
1819

src/base/.devcontainer/Mk/check.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ guard-%:
9393
fi
9494

9595
zizmor:
96-
zizmor .
96+
zizmor --min-severity medium .
9797

9898
generate-sbom:
9999
syft \

src/base/.devcontainer/devcontainer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
"IMAGE_TAG": "${localEnv:IMAGE_TAG}"
1313
}
1414
},
15+
"postCreateCommand": "bash ${SCRIPTS_DIR}/post_create.sh",
16+
"postStartCommand": "bash ${SCRIPTS_DIR}/post_start.sh",
17+
"postAttachCommand": "bash ${SCRIPTS_DIR}/post_attach.sh",
1518
"features": {
1619
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
1720
"version": "latest",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
# Script to run as devcontainer postAttachCommand
3+
set -euo pipefail
4+
5+
# currently empty

0 commit comments

Comments
 (0)