Badges

Badges are used to display data for a specific metric and can be differentiated by color to indicate whether the metric meets a certain standard.

# Badge Types

# Cloud Native Build Badges

Badges generated during cloud native builds, access path:

  • precise: https://cnb.cool/{group}/{repository}/-/badge/git/{sha}/{metrics}

  • latest: https://cnb.cool/{group}/{repository}/-/badge/git/latest/{metrics}

  • Parameter meanings

    • group: The group where the repository is located
    • repository: Repository name
    • sha: Represents the first 8 digits of commitId
    • latest: The most recent data
    • metrics: Indicator name, such as ci/status/push, the corresponding badge represents: During cloud native build, the build time triggered by push event

# Meaning of Cloud Native Build Badges

During cloud native builds, badge data of related build indicators will be automatically uploaded:

# git Events

# ci/status/push

push event push event push event

Build duration and status for push events

# ci/status/branch.create

branch.create event branch.create event branch.create event

Build duration and status for branch.create events

# ci/status/pull_request

pull_request event pull_request event pull_request event

Build duration and status for pull_request events

# ci/status/pull_request.target

pull_request.target event pull_request.target event pull_request.target event

Build duration and status for pull_request.target events

# ci/status/pull_request.merged

pull_request.merged event pull_request.merged event pull_request.merged event

Build duration and status for pull_request.merged events

# ci/status/tag_push

tag_push event tag_push event tag_push event

Build duration and status for tag_push events

# Workspace Preparation

# ci/git-clone-yyds

git-clone-yyds event

Workspace size and the time and size of workspace preparation

# Pipeline Configuration

# ci/pipeline-as-code

pipeline-as-code event

Configuration file for cloud native builds

# Cloud Native Development

# code/vscode-started

vscode-started

Time taken to prepare the development environment

# Unit Testing

Using the built-in task testing:coverage can report unit test badge data

# testing/unit/coverage

coverage coverage coverage coverage

Full coverage rate of unit tests

# testing/unit/coverage-pr

coverage-pr coverage-pr coverage-pr coverage-pr

Incremental coverage rate of unit tests for this pull_request