Badges
About 736 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}branch latest:
https://cnb.cool/{group}/{repository}/-/badge/git/latest/{metrics}?branch={branch}Parameter meanings:
group: The repository's grouprepository: Repository namesha: First 8 characters of the CommitIdlatest: When the branch parameter is not specified, fetch the badge for the latest commit on the default branch; when the branch parameter is specified, fetch the badge corresponding to the latest commit hash of the specified branch.metrics: Metric name, e.g.,ci/status/push, which represents: build time triggered by push event during cloud native buildbranch: The branch name, such asmain, takes effect only when the SHA is set tolatest. In this case, the badge corresponding to the latest commit hash of the current branch will be fetched.
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/commit.add
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
6. Security
- security/tca
Tencent cloud code analysis(TCA):
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
