Skip to main content
GitLab Pipelines
Updated over a week ago

Introduction

To enable the GitLab Pipelines connector you need a group access token. If your GitLab instance is behind a firewall or has IP restrictions, you must allowlist DX IP addresses in order to accept inbound API requests. Note—DX does not read, access, or store source code from your repositories.

You will also need to have set up the standard GitLab connector to import your groups, projects and users. The groups you give it access to in the standard connection are the same groups you'll want to give it access to on this connection. Please use separate API tokens in order to allow the connectors to run in parallel.

Steps to connect

Step 1

Create a GitLab group access token to be used for the DX Data Cloud connection. Enable the read_api scope to grant API read access.

Step 2

Grant the Group access to projects to which you want to get pipelines imported.

Step 3

Navigate to the Data Cloud > Connections screen within DX, select GitLab Pipelines, then add a connection using your credentials generated in the previous steps.

API Reference

Here is a list of the endpoints we reference while importing data from GitLab for this token.

Endpoint URL

Link to Endpoint Documentation

Permissions Needed

groups

Group access token with read_api scope

projects/#{project_id}/pipelines

Group access token with read_api scope

projects/#{project_id}/pipelines/#{pipeline_id}

Group access token with read_api scope

projects/#{project_id}/pipelines/#{pipeline_id}/jobs

Group access token with read_api scope

Errors

This table lists error codes that you may encounter when adding a connection in DX.

Error

Description

invalid_credentials

Your API credentials entered are not valid.

invalid_permissions

Your API token does not have the permissions required by DX.

no_resources

Your service account does not have access to any projects or repositories.

Did this answer your question?