Skip to main content
Version: Release 24.3

GitLab Container Plugin

The GitLab container plugin allows you to perform various functions in your GitLab ecosystem.

important

You must set up a connection to the GitLab server before adding GitLab tasks. For more information, see Set up Connection to GitLab Server.

note

In the release flow editor, Container tasks have a blue border.

GitLab plugin provides the following features:

  • Accept Merge Request (Container)
  • Approve Merge Request (Container)
  • Close Merge Request (Container)
  • Create Branch (Container)
  • Create Group (Container)
  • Create Merge Request (Container)
  • Create Project (Container)
  • Create Project Webhook (Container)
  • Create Tag (Container)
  • Delete Tag (Container)
  • Query Commits (Container)
  • Query Data (Container)
  • Query Merge Requests (Container)
  • Query Pipeline Status (Container)
  • Query Project (Container)
  • Query Secure Data (Container)
  • Query Tags (Container)
  • Trigger Pipeline (Container)

Prerequisites

For GitLab integration, you need the following:

  • GitLab server running and accessible via HTTP(s)
  • Digital.ai Release Runner setup to run the container tasks

Set up Connection to GitLab Server

  1. From the navigation pane, under CONFIGURATION, click Connections.
  2. Under HTTP Server connections, next to GitLab: Server (Container), click add button. The New GitLab: Server (Container) page opens.
  3. In the Title field, enter a name for the configuration.
  4. In the URL field, enter the server URL.
  5. If you want to connect to the server, without validating the TLS/SSL certificate, select the Allow Insecure Connection checkbox.
  6. In the API Token field, enter the PAT token created for the GitLab API.
  7. To test the connection, click Test.
  8. To save the configuration, click Save.

Create GitLab server

Create Branch (Container)

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

Create Branch

Accept Merge Request (Container)

This task accepts a merge request. It is used to merge changes from one branch into another, typically after review and approval.

Accept Merge Request

Create Group (Container)

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 (Container)

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.

Create Merge Request

Create Project (Container)

This task creates a project in GitLab.

  1. In the release flow tab of a Release template, add a task of type GitLab > Create Project (Container).
  2. Click the added task to open it.
  3. In the Capabilities field, enter a value that matches the capability set for your Runner. This will help you to route jobs to that particular Runner.
  4. In the GitLab Server field, select the configured GitLab server.
  5. In the Project Name field, enter the name of the project that you want to create.
  6. In the Project Path field, enter the path for the project.
  7. In the Namespace field, enter a namespace ID for the project.
  8. In the Project Description field, enter the description of the project.
  9. In the Import URL field, enter the URL of the repository for the project.
  10. In the Project Visibility drop-down list, select the required visibility option for the project. The options are as follows:
    • public
    • internal
    • private

Create Project (Container)

Create Project Webhook (Container)

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 (Container)

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 (Container)

The Query Commits (Container) task queries the commit history within the GitLab repositories.

  1. In the release flow tab of a Release template, add a task of type GitLab > Query Commits (Container).
  2. Click the added task to open it.
  3. In the Capabilities field, enter a value that matches the capability set for your Runner. This will help you to route jobs to that particular Runner.
  4. In the GitLab Server field, select the configured GitLab server.
  5. In the Project ID field, enter the ID of the project.
  6. In the Branch Name field, enter the branch name where you want to query commits.
  7. In the Results Limit field, enter a value to define the number of commits to return from the query. By default, the value is set to 100.

Query Commits (Container)

Query Data (Container)

This task queries data. It is used to fetch general data related to a project or repository, such as metrics or logs.

Query Data

Query Merge Requests (Container)

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 (Container)

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

Query Pipelines

Query Project (Container)

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 (Container)

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 (Container)

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

Query Tags

Trigger Pipeline (Container)

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 (Container)

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

Query Pipeline Status

Approve Merge Request (Container)

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 (Container)

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 (Container)

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