
Types of GitLab Badges
Use GitLab’s built-in badges or roll your own to surface the data your team cares about:| Badge Type | Description |
|---|---|
| Pipeline status | Shows the latest pipeline state (pending, running, passed, failed, etc.). |
| Test coverage report | Displays the percentage of code covered by tests, based on your coverage job output. |
| Latest release | Indicates your project’s most recent release version. |
| Custom badge | Let you specify any image URL and link for other metrics (e.g., security scan). |

Badge URL Example
If you prefer hosting your own SVG badges in the repository, reference them with a raw file URL:Hosting badges in your repo makes them versioned alongside your code. Just ensure the branch name and file path are correct.
Configuring Pipeline Status & Coverage Badges
- Navigate to Settings ➔ CI/CD in your project.
- Expand the General pipelines section.
- Scroll down to Pipeline status and Coverage report.
- Pipeline status: Reflects the last pipeline’s outcome.
- Coverage report: Shows the test coverage percentage only if a coverage job exists.

The coverage badge will appear only when your pipeline includes a job that outputs a coverage metric. Ensure you’ve configured a
coverage: /regex/ in your job definition.
Badge Formats & Customization
Badges support Markdown, HTML, and AsciiDoc embed formats. You can also target specific branches by appending?ref=<branch> to the badge URL. Coverage badges change color based on percentage thresholds—up to five levels—which you can customize via URL parameters.

Adding Badges to Your Project
To add badges under your project description:- Go to Settings ➔ General.
- Find the Badges section and click Add badge.
- Complete the fields:
- Name: A descriptive label (e.g.,
Pipeline Status). - Link URL: Destination when the badge is clicked.
- Badge image URL: The SVG endpoint generated by GitLab.
- Name: A descriptive label (e.g.,
- Click Add badge to save and preview.

Example Configuration
-
Pipeline Status
- Name: Pipeline Status
- Link:
https://gitlab.example.com/<project_path>/pipelines - Image: Paste your pipeline status
.svgURL.
-
Code Coverage
- Name: Code Coverage
- Link:
https://gitlab.example.com/<project_path>/pipelines - Image: Paste your coverage report
.svgURL.

Viewing Badges in Your Project
Return to your project’s main page. The badges now appear beneath the project description, instantly communicating your build health and code coverage to every visitor.