How ggingggang/jenkins-shared-library works
This Jenkins Global Pipeline Library lets an application Jenkinsfile call ci(service: ...) to run a centrally governed pipeline: test, build and push, scan, optionally sign, then bump the GitOps manifest. services.yaml owns service and policy configuration; the shared steps implement the work. The README also documents failure alerts and Trivy HTML reporting. Source excerpts were unavailable, so relationships below rely on README statements only.
Main entry points: ci.groovy CI pipeline · kanikoBuild.groovy Kaniko build · trivyImageScan.groovy Trivy scan · cosignSign.groovy Cosign signing
Components 14
Pipeline entry
- CI pipeline
vars/ci.groovy
Pipeline stages
- Test gate
vars/ci.groovy - Kaniko build
vars/kanikoBuild.groovy - Trivy scan
vars/trivyImageScan.groovy - Cosign signing
vars/cosignSign.groovy - GitOps bump
vars/deployBump.groovy
Policy and reports
- Service settings
resources/ci/services.yaml - HTML template
resources/trivy/html.tpl - Image digest
External systems
- GHCR
- GitOps repository
- Alertmanager
Other components
- App Jenkinsfile
- Application repository
Connections 16
- App Jenkinsfile → CI pipeline: invokes
README.md - CI pipeline → Service settings: reads policy
README.md - CI pipeline → Test gate: runs first
README.md - CI pipeline → Kaniko build: runs next
README.md - CI pipeline → Trivy scan: runs next
README.md - CI pipeline → Cosign signing: runs conditionally
README.md - CI pipeline → GitOps bump: runs last
README.md - Application repository → Test gate: provides code
README.md - Kaniko build → GHCR: pushes image
README.md - Kaniko build → Image digest: writes digest
README.md - Cosign signing → Image digest: reads digest
README.md - Cosign signing → GHCR: stores signature
README.md - Trivy scan → HTML template: renders report
README.md - Trivy scan → GHCR: scans image
README.md - GitOps bump → GitOps repository: pushes tag
README.md - CI pipeline → Alertmanager: sends failure alert
README.md