Skip to content

feat: central package management#1800

Draft
MWClayson-NHS wants to merge 70 commits intomainfrom
feat/central-package-management
Draft

feat: central package management#1800
MWClayson-NHS wants to merge 70 commits intomainfrom
feat/central-package-management

Conversation

@MWClayson-NHS
Copy link
Contributor

@MWClayson-NHS MWClayson-NHS commented Jan 5, 2026

Description

These are changes to enable Central Package Management across the whole Cohort Manager Project.
Additionally to implement these changes we were required to create base images that have access to the following files

  • Directory.Build.props
  • Directory.Build.targets
  • Directory.Packages.props

Base Image Process

  • Created two new Docker build Files (Dockerfile.dotnet.base, Dockerfile.function.base) These will ensure the above files are copied over so the function is built correctly
  • Created new CI/CD Step to build base images and push them to GHCR
  • Updated all other docker images to use the base images.

CPM Changes

  • Create root Directory.Packages.props file with versions of all nuget packages used across the whole product
  • Removed Versions from all *.csproj files
  • Created Directory.Build.props file to ensure the intermediary build step for functions does not error due to versions in the WorkerExtensions.csproj Files
  • Created Directory.Build.Targets to prevent Worker Extension Files from being created when unit tests are being run / built

Context

This change solves two problems

  • Package Drift, This change centralises the versioning of nuget Packages used across the project meaning that all packages will now be all aligned by version.
  • Pre-building Shared Libraries should improve the performance of the ci/cd and local build process.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Unit Test Results

✔️ Tests 975 / 975 - passed in 75.5s
📝 Coverage 47.76%
📏 4755 / 10228 lines covered 🌿 1167 / 2172 branches covered
🔍 click here for more details

✏️ updated for commit 6a01fe7

@MWClayson-NHS MWClayson-NHS marked this pull request as ready for review January 13, 2026 15:04
@rfk-nc rfk-nc marked this pull request as draft January 13, 2026 16:13
@stephhou stephhou added the Non-functional change A change that does not change any functions. Mainly config or database changes label Jan 14, 2026
SHORT_COMMIT_HASH=$(git rev-parse --short ${GITHUB_SHA})

docker build -f Dockerfile.dotnet.base -t cohort-manager-dotnet-base:latest .
docker tag cohort-manager-dotnet-base:latest "ghcr.io/nhsdigital/cohort-manager-dotnet-base:${PR_NUM_TAG}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please take a look at this archive branch and how we can target the GHCR using variables?
I think it would be slightly better in terms of the code.

GH_IMAGE="${{ inputs.gh_registry }}/${{ github.repository_owner }}/${{ inputs.project_name }}-${{ matrix.function }}:latest"

@stephhou stephhou added Deployment 1.1.0 Release scheduled for February 2026 merge in isolation To be merged and tested alone priority after freeze To be one of the first PRs merged after a code freeze and removed Deployment 1.0.6 priority after freeze To be one of the first PRs merged after a code freeze labels Feb 5, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2026

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

Labels

Deployment 1.1.0 Release scheduled for February 2026 merge in isolation To be merged and tested alone Non-functional change A change that does not change any functions. Mainly config or database changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants