I am trying to create a custom Gitlab badge but it does not seem to work for me. I have used anybadge python script to generate svg and I have placed this svg to my project directory. Then in my repository settings, I am trying to add a badge.
My repository URL is as following:
https://xxx-test.test.lt/embeded-programmers/Embedded-FW-Guidelines
Method1:
Link:
https://xxx-test.test.lt/%{project_path}
Badge image URL:
https://xxx-test.test.lt/%{project_path}/pylint.svg
Method2 (Badges | GitLab):
In the above method, according to official Gitlab docs, I should refer to raw image at the root of the repository. But in my case that does not even exist:
Method3:
I have placed an svg as an artifact using the following CI/CD script:
create_badge_svg:
stage: build
image: espressif/idf:v5.0.4
variables:
GIT_SUBMODULE_STRATEGY: normal
script:
- echo "Python other dependencies installation"
after_script:
- pip install anybadge
- cd test
- python Gitlab_badge_generate.py
artifacts:
paths:
- test/pylint.svg
when: always
expire_in: 4 weeks
I can access this artifact using the following link:
https://xxx-test.test.lt/embeded-programmers/Embedded-FW-Guidelines/-/jobs/871/artifacts/file/test/pylint.svg
See the image below:
But when I try to add this URL to the Badge image URL it still would not detect:
I would really appreciate if someone could clarify to me how can I add a custom badge as it does not seem to work as specified in the docs or any other tutorials that I have looked up.