We’re using GitLab 17.1.2 Ultimate in a self-hosted environment. I’m trying to get to grips with badges, which seem like a fairly simple concept, but the documentation isn’t great.
I want a Latest Release badge that I can embed in an HTML page which links to the latest release’s notes. I can go to Project > Settings > CI/CD > General Pipelines > Latest Release to get the default badge for that, but it only links to the Releases page, not the actual latest release.
So I went to Project > Settings > General > Badges and created the badge I want, using a placeholder to generate a Latest Release badge which links to the latest release. Perfect! Now how do I get the URL of that badge to embed it in an HTML page? I’m assuming I can’t just the URL with the placeholder %{latest_tag}
in the href
attribute of an anchor element (even if that’s how it’s supposed to work, our corporate firewall blocks the URL with those symbols)?
I really can’t grasp the purpose of creating badges if there’s no way to grab the URL of a badge you’ve created so as to embed it elsewhere. It seems like they’re just a way of previewing what a badge will look like with certain placeholders.