Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"containerEnv": {
"GITHUBMONITOR": "false",
"MAKECONFIG": "true",
"SHOWWELCOME": "false",
"UPDATEFROMTEMPLATE": "false"
},
"image": "ghcr.io/nhsdigital/nhs-notify-devcontainer-loaded-codespaces:1.0.19",
"name": "Digital Letters Codespaces"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"containerEnv": {
"GITHUBMONITOR": "false",
"MAKECONFIG": "true",
"SHOWWELCOME": "true",
"SHOWWELCOME": "false",
"UPDATEFROMTEMPLATE": "false"
},
"image": "ghcr.io/nhsdigital/nhs-notify-devcontainer-loaded:1.0.17",
"name": "Notify Loaded 1.0.17",
"image": "ghcr.io/nhsdigital/nhs-notify-devcontainer-loaded:1.0.19",
"name": "Digital Letters Local Dev",
"postStartCommand": "mkdir -p ~/.gnupg && echo '## 1-day timeout' > ~/.gnupg/gpg-agent.conf && echo 'default-cache-ttl 86400' >> ~/.gnupg/gpg-agent.conf && echo 'max-cache-ttl 86400' >> ~/.gnupg/gpg-agent.conf && gpg-connect-agent reloadagent /bye 2>/dev/null || true"
}
3 changes: 1 addition & 2 deletions .github/workflows/cicd-1-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ jobs:
APP_CLIENT_ID: ${{ secrets.APP_CLIENT_ID }}
publish-stage: # Recommended maximum execution time is 10 minutes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be better moved to pr_closed? There it will only run on main and after the acceptance tests have run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reason I've kept it here, is so i can push direct to main on a fork, and have this go through. otherwise on a fork when testing CICD to GHP, you would have to do your own pr to yourself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be making compromises to support forks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any suggestion on how to support forks?

Copy link
Contributor

@Ian-Hodges Ian-Hodges Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this isolated example you can amend the workflow on the forked repo.
It's not supporting forks, no. If you want full fork support I think it would be best to move it out to its own repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this is a wider conversation to fully move the publish stage out of here. Probably need to look at how our repository template (https://github.com/NHSDigital/nhs-notify-repository-template/tree/main/.github/workflows) is different from the NHSE template (https://github.com/nhs-england-tools/repository-template/tree/main/.github/workflows), in that we don't have the separate publish workflow, and that to get around that for this to be able to publish its just in https://github.com/NHSDigital/nhs-notify-digital-letters/blob/main/.github/workflows/cicd-1-pull-request.yaml instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would like to suggest that removing this at present is a breaking changes for a fork, so to leave it in. Then will look separately at bringing in the workflow "2 publish" and look at fully moving the publish stage out of this workflow?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to leave this as-is while we decide on the best place for it.

name: "Publish stage"
needs: [metadata, acceptance-stage] #PUT THIS BACK WHEN ACCEPTANCE STAGE IS ENABLED
#needs: [metadata, build-stage] BYPASSING ACCEPTANCE STAGE
needs: [metadata, build-stage]
uses: ./.github/workflows/stage-5-publish.yaml
if: (github.event_name == 'push' && github.ref == 'refs/heads/main')
with:
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
act 0.2.64
gitleaks 8.24.0
jq 1.6
nodejs 24.10.0
nodejs 22.11.0
pre-commit 3.6.0
python 3.13.2
python 3.14.0
terraform 1.10.1
terraform-docs 0.19.0
trivy 0.61.0
Expand Down
2 changes: 2 additions & 0 deletions docs/.tool-versions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of all these .tool-versions files. Do these packages need node 24?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure if they will play ball with 22. I do think this is the point of tools versions though so can do monorepo support for tools versioning?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it works well with npm workspaces and make where most commands are ran from the root directory. If you are keeping them, I presume you don't need all those tools i.e. terraform stuff?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of the make uses make -C so it runs child ones from their directory. Have gone through and removed all redundant lines. Was a good spot though as the template doesn't proactively install child tools versions - something that we've missed as there is an existing tool-versions nested in there. Have done a separate pr to backport changes - see change to init.mk

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodejs 24.11.1
python 3.14.0
Loading