Skip to main content
Version: Release 25.3

GitLab Plugin

This topic describes how to configure and use the Digital.ai Release GitLab plugin.

What is GitLab?

GitLab is a DevOps platform that provides Git repository management, CI/CD pipelines, and collaboration capabilities.

The Digital.ai Release GitLab plugin integrates Release with GitLab, enabling you to automate and orchestrate release workflows using GitLab repositories and pipelines.

With this plugin, you can:

  • Trigger releases based on GitLab commits or tags
  • Create and manage branches, merge requests, and tags
  • Monitor pipelines, commits, and merge requests
  • Trigger and manage GitLab CI/CD pipelines
  • Clone repositories and commit files during releases
  • Display GitLab data in Release dashboards

Prerequisites

Before configuring the GitLab plugin, ensure you have the following:

  • Digital.ai Release running and accessible.
  • Install the GitLab plugin using the plugin manager. For more information, see View and Install an Official Digital.ai Release Plugin.
  • Access to a GitLab server (compatible with API v4) that is running and accessible from your Digital.ai Release instance.
  • GitLab server URL.
  • Personal access token from GitLab. The token scopes should be set based on the operations you plan to perform (such as creating branches, merge requests, pipelines, etc.).

Set up a Connection to the GitLab Server

  1. From the navigation pane, click Configuration > Connections.

  2. Under configurations, beside GitLab: Server, click Add button

  3. Provide the connection details:

    Field NameDescription
    Title*Symbolic name for the configuration
    URL*Address where the server can be reached
    Proxy domainDomain to be used for NTLM proxy authentication
    Proxy hostHTTP proxy host
    Proxy portHTTP proxy port
    Proxy usernameHTTP proxy username
    Proxy passwordHTTP proxy password
    API Token*A personal access token for the GitLab API. Token scopes should be set based on the desired orchestration.
  4. Click Test, to test the connection.

  5. Click Save, to save the configuration.

XLR_gitlab_CONNECTION

Set up a Connection for Commit Webhook

  1. In your GitLab instance, add a webhook
  2. Select Push events
  3. Specify the Release URL as: http://username:password@xlrserver:port/api/extension/gitlab/commit_webhook?template=<templateName/prefix>
  4. The following variables are available in Release:
    • project_name
    • repo_full_name
    • branch_name
    • commit_message
    • current_commit_hash

XLR_commit_webhooks_CONNECTION

Set up a Connection for Merge Request Webhook

  1. In your GitLab instance, add a webhook
  2. Select Push events
  3. Specify the Release URL as: http://username:password@xlrserver:port/api/extension/gitlab/pr_webhook?template=<templateName/prefix>
  4. The following variables are available in Release:
    • pull_request_number
    • pull_request_title
    • repository_name
    • proj_name
    • source_hash
    • source_branch
    • source_project
    • source_repo
    • target_branch
    • target_project
    • target_repo

XLR_commit_webhooks_CONNECTION

Features

  • Webhooks event for GitLab.
  • GitLab tiles on the release dashboard.
  • GitLab triggers - Used to poll GitLab for triggering releases:
    • GitLab Commit Trigger
    • GitLab Tag Trigger

Available Tasks

The following tasks are available in Digital.ai Release:

  • GitLab: Accept Merge Request
  • GitLab: Create Branch
  • GitLab: Create Group
  • GitLab: Create Merge Request
  • GitLab: Create Project
  • GitLab: Create Project Webhook
  • GitLab: Create Tag
  • GitLab: Query Commits
  • GitLab: Query Data
  • GitLab: Query File Data
  • GitLab: Query Merge Requests
  • GitLab: Query Pipeline Status
  • GitLab: Query Pipelines
  • GitLab: Query Project
  • GitLab: Query Secure Data
  • GitLab: Query Tags
  • GitLab: Run Job
  • GitLab: Trigger Pipeline
  • GitLab: Create Pipeline
  • GitLab: Revert Commit
  • GitLab: Clone Repository
  • GitLab: Commit Files
  • GitLab: Close Merge Request
  • GitLab: Delete Tag
  • GitLab: Delete Branch
  • GitLab: Approve Merge Request
note

You cannot run the clone and commit tasks together in a clustered setup.

Tile and Dashboard Configuration

There are seven tiles available:

  • GitLab Commits Tile
  • GitLab Contributions Tile
  • GitLab Merge Requests Tile
  • GitLab Pipelines Tile
  • GitLab Pipeline Trends
  • GitLab Tags Timeline Tile
  • GitLab Timeline Tile
  1. From the navigation pane, click Reports.
  2. Select the dashboard where you want to add the new tile.
note

If you have not created a dashboard yet, click Add dashboard on the top right of the screen to create dashboard.

  1. In the top right of the screen, click Configure dashboard.
  2. In the top right of the screen, click Add tiles.
  3. Hover over GitLab Commits Tile, and click Add.
  4. Click Configure option present in the tile.
  5. Enter a name for the tile in the Title field.
  6. Select the server configured in the GitLab Server field.
  7. Enter the project key in the Project ID field.
  8. Enter the name of branch from where data can be fetched in the Branch Name field.
  9. Enter the limit of list in numbers, in the Results Limit field.
  10. Click Save.

You can configure the rest of the tiles using the same process described above.

Accept Merge Request

This task accepts a merge request, merging changes from one branch into another after review and approval.

Create Branch

This task creates a branch. It is used to start a new line of development separate from the main codebase.

Create Branch

Create Group

This task creates a group. It is used to organize projects and manage permissions for a collection of related projects.

Create group

Create Merge Request

This task creates a merge request. It is used to propose changes from one branch to be merged into another, often involving code review and approval processes. Toggle the Remove Source Branch switch on to delete the source branch post-merge.

Create Merge Request

Create Project

This task creates a project. It is used to initialize a new project repository, typically within a version control system.

Create Project

Create Project Webhook

This task creates a project webhook. It is used to set up notifications for specific events occurring in a project, such as commits or merges.

Create Project Webhook

Create Tag

This task creates a tag. It is used to mark a specific point in the repository history, often for releases or significant milestones.

Create Tag

Query Commits

This task queries commits. It is used to retrieve a list of commits from a repository, often with details such as author, date, and commit message.

Query Commits

Query Data

This task queries data. It is used to fetch general data related to a project or repository, such as metrics or logs. In Release 25.3, a new Query Parameters field is added to narrow search results.

Query Data

Query File Data

This task queries file data. It is used to fetch data from a JSON or YAML file in a GitLab repository using the Project ID, File path, and Revision, and optionally extract a specific value using a JSON path expression.

Query File Data

Query Merge Requests

This task queries merge requests. It is used to retrieve a list of merge requests, along with their statuses and details.

Query Merge Requests

Query Pipelines

This task queries pipelines. It is used to fetch information about CI/CD pipelines, including their statuses and results.

Query Pipelines

Query Project

This task queries a project. It is used to retrieve details about a specific project, such as its settings, members, and activity.

Query Project

Query Secure Data

This task queries secure data. It is used to fetch sensitive or protected information related to a project, typically with appropriate access controls.

Query Secure Data

Query Tags

This task queries tags. It is used to list all tags in a repository, often with details about the tagged commits.

Query Tags

Run Job

This task runs a GitLab job manually. It is used to trigger a specific job defined in a GitLab CI/CD pipeline.

Run Job

Trigger Pipeline

This task triggers a pipeline. It is used to start a new CI/CD pipeline run for a project, usually after a commit or merge.

Trigger Pipeline

Query Pipeline Status

This task queries the pipeline status. It is used to check the current state and results of a specific pipeline run.

Query Pipeline Status

Clone Repository

This task clones a repository. It is used to create a local copy of a remote repository for development or analysis.

Clone Repository

Commit Files

This task commits files. It is used to save changes to the repository with a new commit, typically including a commit message describing the changes.

Commit Files

Revert Commit

This task reverts a commit. It is used to undo the changes introduced by a specific commit, creating a new commit that reverses those changes.

Revert Commit

Approve Merge Request

This task approves a merge request. It is used to indicate that a merge request has been reviewed and is ready to be merged.

Approve Merge Request

Close Merge Request

This task closes a merge request. It is used to mark a merge request as closed without merging it, often due to changes being no longer needed or handled differently.

Close Merge Request

Delete Tag

This task deletes a tag. It is used to remove a tag from the repository, often when it is no longer relevant or was created by mistake.

Delete Tag

Delete Branch

This task deletes a branch in a GitLab repository. It is used to remove an existing branch that is no longer needed. To delete a branch, you must provide the project ID and the branch name. Once executed, the specified branch will be permanently removed from the repository.

Delete Branch

Create Pipeline

This task creates a new pipeline, setting up and initiating a new CI/CD pipeline for a project.

Create Pipeline