Badges
About 605 wordsAbout 2 min
Badges are used to display metric data and can distinguish whether metrics meet standards through different colors.
Cloud Native Build Related Badges
Badge Access Path
Badges generated during cloud native builds can be accessed via:
precise:
https://cnb.cool/{group}/{repository}/-/badge/git/{sha}/{metrics}
latest:
https://cnb.cool/{group}/{repository}/-/badge/git/latest/{metrics}
Parameter meanings:
group
: The repository's grouprepository
: Repository namesha
: First 8 characters of the CommitIdlatest
: Most recent datametrics
: Metric name, e.g.,ci/status/push
, which represents: build time triggered by push event during cloud native build
Badge Types
During cloud native builds, badge data for relevant build metrics will be automatically uploaded:
1. Git Events
- ci/status/push
Push event build time and build status
- ci/status/branch.create
Branch create event build time and build status
- ci/status/pull_request
Pull request event build time and build status
- ci/status/pull_request.update
Pull request update event build time and build status
- ci/status/pull_request.target
Pull request target event build time and build status
- ci/status/pull_request.merged
Pull request merged event build time and build status
- ci/status/tag_push
Tag push event build time and build status
2. Workspace Preparation
- ci/git-clone-yyds
Workspace size and preparation time:
3. Pipeline Configuration
- ci/pipeline-as-code
Cloud native build configuration file:
4. Cloud Native Development
- code/vscode-started
Development environment preparation time:
5. Unit Testing
Using the built-in task testing:coverage can report unit test badge data
- testing/unit/coverage
Total unit test coverage
- testing/unit/coverage-pr
Incremental unit test coverage for this pull request
Repository Related Badges
Fork Badge
Display repository fork count in badge form:
Access path: https://cnb.cool/{group}/{repository}/-/badge/fork
Parameter meanings:
group
: Repository organization pathrepository
: Repository name
Star Badge
Display repository star count in badge form:
Access path: https://cnb.cool/{group}/{repository}/-/badge/star
Parameter meanings:
group
: Repository organization pathrepository
: Repository name