Hello, I’m trying to include build status badges but for the jobs and not pipelines only. I tried a lot but couldn’t find a solution for that. How can I add build status badges for JOBS?
I don’t know what you have tried already, but as an admin of your gitlab instance you can add your own badges via the setting page: https://EXAMPLE.gitlab.com/PROJECT/settings/badges
There is a documentation for that:
https://EXAMPLE.gitlab.com/help/user/project/badges
or the use via the API:
https://EXAMPLE.gitlab.com/help/api/project_badges.md
https://EXAMPLE.gitlab.com/help/api/group_badges.md
The setting page even shows how to set it up in a markdown (Readme.md) file:
https://EXAMPLE.gitlab.com/PROJECT/settings/ci_cd
Replace EXAMPLE.gitlab.com
with your own gitlab url and PROJECT
with your project name (or navigate to the CI/CD
settings as admin user).
HTH
thanks for the reply. I was able to add badges but they are not dynamic. That means after creating my own badge using (shields.io) for example, I added it in “Badge image URL” and when clicking on it it will redirect me to the “Link” I provided without showing the status of the build.
How can I have a dynamic badge like https://EXAMPLE.gitlab.com/USERNAME/PROJECT/badges/master/pipeline.svg but for jobs?
To make it clearer, I have a pipeline with several jobs e.g. job1, job2
I want a dynamic badge for the progress or build status of job1 and job2 separately …
Moreover, when using the test coverage, it is showing “coverage unknown”. Should I add a code in .yml file for it to work?
Thanks
Have you tried:
Seems like it could be working.
yeah I saw this before …
I thought there might be a direct and simple way of doing that