Skip to content

Docs:Add gitlab_group_badge usage guide with placeholders

Summary

Benefits

  • Users will be able to easily start using badges
    • Each projects will be able to use badges automatically.

Example

resource "gitlab_group" "foo" {
  name = "foo-group"
}

resource "gitlab_group_badge" "gitlab_pipeline" {
  group     = gitlab_group.foo.id
  link_url  = "https://gitlab.com/%%{project_path}/-/jobs/artifacts/main/browse"
  image_url = "https://gitlab.com/%%{project_path}/badges/%%{default_branch}/pipeline.svg"
}

resource "gitlab_group_badge" "gitlab_coverage" {
  group     = gitlab_group.foo.id
  link_url  = "https://gitlab.com/%%{project_path}/-/jobs"
  image_url = "https://gitlab.com/%%{project_path}/badges/%%{default_branch}/coverage.svg"
}

resource "gitlab_group_badge" "gitlab_release" {
  group     = gitlab_group.foo.id
  link_url  = "https://gitlab.com/%%{project_path}/-/releases"
  image_url = "https://gitlab.com/%%{project_path}/-/badges/release.svg"
}

image

image

Edited by arukiidou