Skip to content

larscom/gitlab-ci-dashboard

Repository files navigation

Gitlab CI Dashboard

Docker Image Version workflow License MIT codecov

Preview


Gitlab CI Dashboard will provide you with a global overview of all pipelines, schedules, and their statuses within a single group. The default functionality of Gitlab is limited at the project level. This can become problematic when you have a lot of projects to manage, potentially resulting in undetected failed pipelines.

Demo may contain functionality that has not been released yet.


🚀 Highlights

  • View all pipeline statuses per group (e.g: failed/canceled/success)
  • View all pipeline schedules per group
  • You won't get rate limited by the Gitlab API, due to server-side caching
  • Communication to the Gitlab API happens only server side
  • Only 1 read only token is needed to serve a whole team

📒 Checklist

  • Overview of all latest pipeline statuses within a group
  • Overview of all pipeline statuses within a group
  • Overview of all schedules within a group
  • Overview of all artifacts within a group
  • ...

⚡️ Requirements

  • Gitlab server (v4 API)
  • Readonly API token
  • Docker

💡 Getting started

  1. Generate a read_api access token in Gitlab (e.g: https://gitlab.com/-/profile/personal_access_tokens)

Access Token

  1. Run docker with the required environment variables (GITLAB_BASE_URL, GITLAB_API_TOKEN)
docker run -p 8080:8080 -e GITLAB_BASE_URL=https://example.gitlab.com -e GITLAB_API_TOKEN=my_token larscom/gitlab-ci-dashboard:latest
  1. Dashboard should be available at: http://localhost:8080/ showing (by default) all available groups and their projects

⏰ Metrics

Prometheus

http://localhost:8080/metrics/prometheus

Fiber

http://localhost:8080/metrics


🔌 Environment variables

Variable Type Description Required Default
GITLAB_BASE_URL string The base url to the Gitlab server (e.g: https://gitlab.com) yes
GITLAB_API_TOKEN string A readonly access token generated in Gitlab (see: https://gitlab.com/-/profile/personal_access_tokens) yes
GITLAB_GROUP_ONLY_IDS string Provide a comma seperated string of group ids which will only be displayed (e.g: 123,789,888) no
GITLAB_GROUP_SKIP_IDS string Provide a comma seperated string of group ids which will be ignored (e.g: 123,789,888) no
GITLAB_GROUP_ONLY_TOP_LEVEL bool Show only top level groups no false
GITLAB_GROUP_CACHE_TTL_SECONDS int Expire after write time in seconds for groups (cache) no 300
GITLAB_PROJECT_SKIP_IDS string Provide a comma seperated string of project ids which will be ignored (e.g: 123,789,888) no
GITLAB_PROJECT_CACHE_TTL_SECONDS int Expire after write time in seconds for projects (cache) no 300
GITLAB_PIPELINE_CACHE_TTL_SECONDS int Expire after write time in seconds for pipelines (cache) no 10
GITLAB_PIPELINE_HISTORY_DAYS int How far back in time (days), it should fetch pipelines from gitlab (pipelines tab only) no 5
GITLAB_BRANCH_CACHE_TTL_SECONDS int Expire after write time in seconds for branches (cache) no 60
GITLAB_SCHEDULE_CACHE_TTL_SECONDS int Expire after write time in seconds for schedules (cache) no 300
GITLAB_JOB_CACHE_TTL_SECONDS int Expire after write time in seconds for jobs (cache) no 10
SERVER_LISTEN_ADDR string Listen address, e.g: ":8080" or "127.0.0.1:8080" no :8080
SERVER_DEBUG_MODE bool Enable debug logging no false