Skip to content

Conversation

@RossBugginsNHS
Copy link
Contributor

@RossBugginsNHS RossBugginsNHS commented Nov 12, 2025

CI CID publish

Currently the publish-stage in ci-cd-1-pull-request.yaml has needs: [metadata, acceptance-stage], this changes that to needs: [metadata, build-stage]

the publish-stage has a restriction of if: (github.event_name == 'push' && github.ref == 'refs/heads/main') ensuring publish-stage only runs when commited to main

Possibly look next to reintroduce the separate publish workflow stage (as per https://github.com/nhs-england-tools/repository-template/blob/main/.github/workflows/cicd-2-publish.yaml)

Tools

update root tool versions file for node to be set to the latest lambda supported version. Sub directories have specific requirements.

Update init.mk to recursively load tool-versions files. Discussion on this at (nhs-england-tools/repository-template#195)

Readme

Added to src folder

Codespaces

Added dev container referencing ghcr.io/nhsdigital/nhs-notify-devcontainer-loaded-codespaces:1.0.19 to allow for codespace development

Remove the auto loading of a new terminal, so it does not hide initial config in a dev container.

##Event Catalog

Bump to latest version

@RossBugginsNHS RossBugginsNHS requested a review from a team as a code owner November 12, 2025 08:24
@RossBugginsNHS RossBugginsNHS requested a review from a team as a code owner November 12, 2025 09:56
@RossBugginsNHS RossBugginsNHS changed the title Remove publish-stage needing acceptance-stage tools versions and remove publish-stage needing acceptance-stage Nov 12, 2025
secrets:
APP_PEM_FILE: ${{ secrets.APP_PEM_FILE }}
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.

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

@RossBugginsNHS RossBugginsNHS changed the title tools versions and remove publish-stage needing acceptance-stage tools versions & cicd publish-stage & codespace devcontainer Nov 13, 2025
tdroza-nhs
tdroza-nhs previously approved these changes Nov 13, 2025
Copy link
Contributor

@tdroza-nhs tdroza-nhs left a comment

Choose a reason for hiding this comment

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

Spoke with Ross about Ian's suggestions and happy to leave the changes as they are

@RossBugginsNHS RossBugginsNHS marked this pull request as draft November 13, 2025 17:00
@RossBugginsNHS RossBugginsNHS marked this pull request as ready for review November 14, 2025 08:37
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

secrets:
APP_PEM_FILE: ${{ secrets.APP_PEM_FILE }}
APP_CLIENT_ID: ${{ secrets.APP_CLIENT_ID }}
publish-stage: # Recommended maximum execution time is 10 minutes
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.

@RossBugginsNHS
Copy link
Contributor Author

Spoke with Ross about Ian's suggestions and happy to leave the changes as they are

Have put some more thought into the above and some additional changes in place

Copy link
Contributor

@Ian-Hodges Ian-Hodges left a comment

Choose a reason for hiding this comment

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

This PR is by-passing all the checks. There's no assurance that this PR won't break main when merged.

@RossBugginsNHS
Copy link
Contributor Author

This PR is by-passing all the checks. There's no assurance that this PR won't break main when merged.

See #111 for PR from branch instead of fork - checks now running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants