Gitlab Source Code Control

Prev Next

GitLab is an Open-Source code repository and collaborative software development platform for large DevOps and DevSecOps projects providing end-to-end DevOps capabilities for each stage of the software development lifecycle.  More information can be found at GitLab’s webpage.

Integration Method: API

Tables: Group Management Class (3006), User access management class (3005), Ticket Inventory (99405001), Entity management class (3004)

List of events supported by this integration. 

Events

Description

Projects

Get a list of all visible projects across GitLab

Audit Events

Projects created/deleted, API tokens, users added/deleted

Members

Get list of members as part of organizational groups

Merge Requests

Get list of merge requests across in a project

This integration supports the following versions.

Gitlab Version Tested

GitLab Enterprise Edition 17.9.0-pre

Gitlab API version

v4.0

Prerequisites

  • User should have Admin access to the Gitlab for creating API tokens.

  • User should have access to the DataBee console.

Configuration Overview

  1. Generate an API token on the GitLab console with the required scopes.

  2. Add the GitLab data feed integration in the DataBee console with the required API token.

    DataBee Parameters

    Gitlab Parameters

    Token

    Personal Access Token

Gitlab Configuration

Start by creating an API Token for the integration.

  1. Login to your GitLab account which has admin privileges.
     

  2. In the upper-left corner, select the avatar, then click Preferences.
     

  3. Click the Access tokens side bar.

  4. Select “Add new token” under Personal access tokens.  
     

  5. Fill in a ‘Token name’, ‘Token description’ and ‘Expiration date’. Choose a 12-month expiration. Longer expiration times can minimize disruption.
     

  6. Select the following scopes as highlighted below and click Create personal access token.

    • read_api

    • read_user

    • read_repository
       

  7. Copy and save the generated personal access token. This will not be available later to be copied. It is used when configuring DataBee.
     

DataBee Configuration

To configure the data source,

  1. Login to the DataBee UI, navigate to Data > Data Feeds and click the Add New Data Feed button
     

  2. Search for the GitLab Source Code Control and click it as shown below.
     

  3. Click on the API Ingest option for collection method.
     

  4. Enter feed contact information and click Next.

  5. In the configuration page, confirm the following:

    • API Base URL: this is the base URL that DataBee will interact with

    • Authorization Method: Bearer Token

    • Token: paste the Personal Access Token generated earlier in the GitLab console.

    • Event types: preselected for all the events types the integration pulls.

       

  6. Click Submit.

Troubleshooting Tips

  • Ensure the token is pasted correctly. Since you cannot view the token after the 1st time, re-create the token, paste it on a text editor to ensure no spaces or unexpected characters are included and reconfigure the DataBee feed.

  • Ensure the GitLab scopes/permissions are correct.