How hmcts/cnp-jenkins-library works
This is a Jenkins Shared Library for HMCTS application and infrastructure pipelines. A consuming Jenkinsfile loads the library; its opinionated pipeline entry points coordinate build, test, security and deployment stages, while separate entry points support infrastructure and nightly work. The README also identifies performance testing and Pact contract testing as capabilities. Source excerpts are limited to build configuration and an audit-transform script, so component relationships below rely on the README’s documented workflow; no unsampled implementation calls are asserted.
Main entry points: withPipeline.groovy App pipeline · withInfraPipeline.groovy Infrastructure pipeline · withNightlyPipeline.groovy Nightly pipeline · withEnvironmentAgent.groovy Environment agents
Components 18
Pipeline entry points
- App pipeline
vars/withPipeline.groovy - Infrastructure pipeline
vars/withInfraPipeline.groovy - Nightly pipeline
vars/withNightlyPipeline.groovy
Application delivery
- Build and test
vars/sectionBuildAndTest.groovy - Docker build
src/uk/gov/hmcts/contino/Docker.groovy - AKS deployment
vars/sectionDeployToAKS.groovy - Environment deployment
vars/sectionDeployToEnvironment.groovy - Build promotion
vars/sectionPromoteBuildToStage.groovy
Infrastructure delivery
- Infrastructure build
vars/sectionInfraBuild.groovy - Shared infrastructure
vars/sharedInfrastructurePipeline.groovy - Environment agents
vars/withEnvironmentAgent.groovy - Subscription access
vars/withSubscription.groovy
Quality and integrations
- Security checks
src/uk/gov/hmcts/contino/SecurityScan.groovy - Fortify scanning
vars/fortifyScan.groovy - Pact testing
src/uk/gov/hmcts/contino/PactBroker.groovy - Performance testing
src/uk/gov/hmcts/contino/Gatling.groovy - Dynatrace testing
src/uk/gov/hmcts/contino/DynatraceClient.groovy
Other components
- Jenkins consumer
Connections 18
- Jenkins consumer → App pipeline: loads library
README.md - Jenkins consumer → Infrastructure pipeline: loads library
README.md - Jenkins consumer → Nightly pipeline: loads library
README.md - App pipeline → Build and test: runs stages
README.md - App pipeline → Security checks: runs checks
README.md - App pipeline → Docker build: builds image
README.md - App pipeline → AKS deployment: deploys to AKS
README.md - App pipeline → Environment deployment: deploys environment
README.md - App pipeline → Build promotion: promotes build
README.md - Infrastructure pipeline → Infrastructure build: runs stages
README.md - Infrastructure pipeline → Shared infrastructure: supports infrastructure
README.md - App pipeline → Environment agents: uses scoped agents
README.md - Infrastructure pipeline → Environment agents: uses scoped agents
README.md - Jenkins consumer → Subscription access: runs block
README.md - Nightly pipeline → Performance testing: supports performance tests
README.md - Nightly pipeline → Dynatrace testing: supports performance tests
README.md - App pipeline → Pact testing: supports contract tests
README.md - App pipeline → Fortify scanning: supports security scans
README.md