GitLab Cloud

GitLab is a DevOps platform that provides Git repos, CI/CD pipelines, issue management, and more.

SEI supports two integrations to integrate SEI with GIthub.

  • Gitlab Cloud

  • Gitlab Enterprise

To integrate with Gitlab Enterprise, use the SEI Gitlab Enterprise integration.

Configuring the authentication

The SEI GitLab Cloud integration can use either OAuth or personal access token authentication.

For OAuth, your account must have the Reporter role or higher.

If you can't use OAuth, you must create a GitLab personal access token to configure the SEI GitLab integration.

  1. Log in to your GitLab account and create a personal access token. For instructions, go to the GitLab documentation on Personal access tokens.

  2. Select the api scope with complete read/write API access.

  3. Copy the token somewhere that you can retrieve it when you configure the integration.

SEI fetches the history for both the builds jobs and triggers jobs for each pipeline from GitLab. The list of all jobs is available in the job selection tab under Deployment Frequency when configuring the DORA profile.

Configure the integration on cloud

  1. Select Integrations under Settings.

  2. Select Available Integrations, locate the GitLab Cloud integration, and select Install. Note: To integrate with an on-premises, privately-hosted GitLab instance, install the GitLab Enterprise integration with API key (personal access token) authentication and an Ingestion Satellite. To learn more, Go to Gitlab Enterprise integration.

  3. Select an authentication method for the integration:

    1. To use OAuth, select Authorize and follow the prompts to grant access to GitLab.

    2. To use a personal access token, enter the URL for your GitLab instance and paste your Access Token.

  4. In Integration Name, enter a name for the integration.

  5. Finish configuration and save the integration.

Configure the integration using satellite

The steps for configuring the integration using satellite is similar to configuring the integration on the cloud using the PAT, with the exception of using the satellite to communicate with the Gitlab server.

Make sure to select the satellite integration checkbox while configuring the integration.

  1. Enter the Personal Access Token and click Next.

  2. In Integration Name, enter a name for the integration.

  3. Add a description for the integration. (Optional)

  4. In the URL field, add the URL where your Gitlab repository is deployed. For example, if your Gitlab is deployed on a virtual machine (VM), add the URL in the format: https://<GITLAB_INSTANCE>.

  5. If applicable, configure Additional Options:

    1. Fetch PRs: Allow SEI to ingest PR data from GitLab.

    2. Fetch Issues: Allow SEI to ingest data from GitLab Issues.

    3. Fetch Projects: Allow SEI to ingest data from GitLab Projects.

    4. Fetch Commits: Allow SEI to ingest commit metadata from GitLab.

    5. Fetch Commit Files: Allow SEI to ingest data within commits from GitLab.

Note that SEI fetches a maximum of 250 commits for a pull request.

  1. Select Next and click on Download Config and save the satellite.yml file. Update it following the instructions here.

Here’s a sample satellite.yml file:

satellite:
  tenant: foo
  api_key: <api-key>
  url: 'https://testapi1.propelo.ai'
integrations:
  - id: '4691'
    application: gitlab
    url: ' https://<IP_ADDRESS>/'
    metadata:
      fetch_prs: true
      fetch_issues: true
      fetch_projects: true
      fetch_commits: true
      fetch_commit_files: true
    authentication: apikey

While configuring the integration using satellite, the following are optional metadata fields that are supported to optimize the ingestion functionality:

  1. Check Project Membership (check_project_membership)

    • Default: True

    • When set to True, SEI selectively considers Gitlab projects based on token owner membership.

    • For self-hosted Gitlab instances, switching to False enables fetching ALL projects, regardless of membership.

    • Caution: Never disable this for cloud Gitlab instances.

  2. Fetch PR Patches (fetch_pr_patches)

    • Supported values: True/False

    • Determines whether to retrieve patches or file differentials for Pull Requests (PRs).

  3. Fetch Commit Patches (fetch_commit_patches)

    • Supported values: True/False

    • Governs the inclusion of commit patches or file differentials in the data.

  4. Fetch Pipelines: (fetch_pipelines)

    • Supported values: True/False

    • Specifies whether to fetch pipeline data.

  5. PR Commit Limit (pr_commit_limit)

    • Default value: 250

    • Sets a cap on the number of commits fetched per Pull Request.

If you encounter any issues during the integration process, go to the Satellite integration Troubleshooting and FAQs.

Last updated