Skip to main content

GitLab Badges

Gitlab provides a function for us to set their default badges and we can use it for tracking our CI/CD processes on the specific branch.

  1. Go to Settings > General > Badges
  2. Set up the Name, Link and Badge image URL. You can check this page that there are some discussions and comments.

For example

I wanna specify the branch, not using default branch. Then we can do like this way.

Name

Master Status

Link

https://gitlab.com/%{project_path}/-/commits/master

Badge image URL

https://gitlab.com/%{project_path}/badges/master/pipeline.svg?key_text=Branch:+Master&key_width=90

It will show the preview image for you checking, and it will also show on main page of this repository.

In the future, when we access into this repository, we can directly see the pipeline status on the main page. Very convenient!