GitLab-CI Sensor


The GitLab_CI sensor integrates results reported by CI/CD Pipeline Jobs in GitLab.

Setup

You will need a GitLab repository ID. On the “Details” page for your GitLab repo, just below the project name is “Project ID:” Alternatively, you can use “{GitLab_Username}/{GitLab_RepositoryName}”, ex: “MyCoolUsername/MyCoolRepository”

A GitLab token with at least the API permission scope is needed, which can be created on the GitLab Personal Access Tokens page of your GitLab User Settings.

Configuration

To enable this platform, please add the following to your configuration.yaml file:

# Example configuration.yaml entry
sensor:
  - platform: gitlab_ci
    gitlab_id: '1234567'
    token: 'aaaaaaaaaaAAAAAAAAAA'

Configuration Variables

gitlab_id

(string)(Required)GitLab repository ID or “username/repository”

token

(string)(Required)GitLab API Token

name

(string)(Optional)Sensor name as it appears in Home Assistant. Defaults to ‘GitLab CI Status’.

url

(string)(Optional)GitLab repository URL. Defaults to ‘https://gitlab.com’. Used for self-hosted repositories.