Skip to main content
Version: Early Access

GitLab Container Plugin

The GitLab Container Plugin integrates Digital.ai Release with GitLab to enable scalable, secure, and high-performance execution of GitLab tasks using Release Runners and containerized environments.

This plugin is best suited for execution-heavy, cloud-native workflows that require scalability, isolation, and dynamic routing of tasks across distributed runners.

note

For event-driven workflows, triggers, and dashboard tiles, use the GitLab Plugin (Jython-based).

What You Can Do With This Plugin

  • Automate GitLab operations such as managing branches, tags, repositories, and merge requests
  • Trigger and monitor GitLab pipelines
  • Execute tasks on distributed runners using containerized environments
  • Route tasks dynamically using runner capabilities
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.

Prerequisites

Before using this plugin, ensure the following:

GitLab Access

  • Access to a GitLab instance (SaaS or self-managed)
  • Ensure that all required projects exist in GitLab. You can create new projects in advance or dynamically as part of your release pipeline using the Create Project task.
  • Digital.ai Release Runner set up to run container tasks

Authentication

You must provide a GitLab API token:

note

Some tasks (such as triggering pipelines) require a pipeline trigger token, which is different from a Personal or Project Access Token.

Required Information

You should have the following details available before configuring or running tasks with the GitLab Container Plugin:

  • GitLab Server URL (for example, https://gitlab.com)
  • Project ID (numeric ID from GitLab project settings)
  • Branch, tag, or ref names (depending on task)
  • Merge Request ID (for MR-related tasks)

When To Use This Plugin

Use the GitLab Container Plugin when you need:

  • Scalable, distributed execution using Release Runners and containers
  • High-performance automation for execution-heavy or cloud-native workflows
  • Dynamic routing of tasks to specific runners based on capabilities
  • Isolation and security for tasks running in containerized environments
note

For event-driven workflows, triggers, and dashboard tiles, use the GitLab Plugin (Jython-based).

Common Pitfalls

note

Using the wrong token type
Pipeline trigger tokens and API tokens are different. Most tasks require an API token with the correct scopes. Some tasks (such as triggering pipelines) require a pipeline trigger token. See the Authentication and Trigger Pipeline (Container) sections for details.

Missing required token scopes
If the token does not include the api scope, operations such as merge, create, or trigger may fail.

Using project name instead of Project ID
The plugin expects a numeric Project ID, not the repository name.

Incorrect Merge Request ID
Use the internal MR ID from GitLab, not the title or branch name.

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. In Capabilities, define routing rules for Release Runners. Add one or more capability labels to direct tasks to appropriate runners.
  8. To test the connection, click Test.
  9. To save the configuration, click Save.

Create GitLab server

Accept Merge Request (Container)

This task accepts (merges) a merge request in a GitLab project after review and approval. Use it to automate the process of merging feature or bugfix branches into your main branch as part of a release workflow.

Accept Merge Request

Field Descriptions

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
Merge IDInternal numeric ID of the merge request to accept. Not the title or branch name.42
Wait for ApprovalIf enabled, waits for the merge request to be approved before merging.true
Polling IntervalTime between calls made to GitLab to check merge request status.5
Polling Interval UnitUnit for polling interval: Seconds, Minutes, or Hours.Seconds
Polling Retry CountNumber of polling attempts before giving up.5

Example Usage

Suppose you want to accept a merge request for project ID 12345 and merge ID 42, waiting for approval, with a polling interval of 5 seconds and 5 retries:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Merge ID42
Wait for Approvaltrue
Polling Interval5
Polling Interval UnitSeconds
Polling Retry Count5

This will wait for the merge request to be approved, then merge it when ready, polling GitLab every 5 seconds up to 5 times.

Approve Merge Request (Container)

This task approves a merge request in a GitLab project, indicating that it has been reviewed and is ready to be merged. Use it to automate the approval step as part of your release workflow.

Input Field Descriptions

Approve Merge Request Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
Merge IDInternal numeric ID of the merge request to approve.42

Output Field Descriptions

Approve Merge Request Output

Field NameDescriptionExample
StatusStatus of the approval operation (Text).success

Example Usage

Suppose you want to approve a merge request for project ID 12345 and merge ID 42:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Merge ID42

The output field Status will indicate the result of the approval operation (for example, success).

Close Merge Request (Container)

This task closes a merge request in a GitLab project, marking it as closed without merging. Use it to automate the process of discarding or ending merge requests that are no longer needed as part of your release workflow.

Field Descriptions

Close Merge Request

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
Merge IDInternal numeric ID of the merge request to close.42
Comment(Optional) Comment to add to the merge request before closing.No longer needed

Example Usage

Suppose you want to close a merge request for project ID 12345 and merge ID 42, with a comment:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Merge ID42
CommentNo longer needed

This will close the specified merge request and add the comment "No longer needed" to the merge request before closing it.

Create Branch (Container)

This task creates a new branch in a GitLab project. Use it to automate the process of starting a new line of development from a specific commit or branch as part of your release workflow.

Input Field Descriptions

Create Branch Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
New Branch NameName of the new branch to create.feature/new-feature
ReferenceBranch name or commit hash to create the new branch from.main

Output Field Descriptions

Create Branch Output

Field NameDescriptionExample
Commit SourceCommit hash used to generate the new branch (Text).1a2b3c4d5e6f...

Example Usage

Suppose you want to create a new branch called feature/new-feature from the main branch in project ID 12345:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
New Branch Namefeature/new-feature
Referencemain

The output field Commit Source will contain the commit hash used to generate the new branch.

Create Group (Container)

This task creates a new group in GitLab. Use it to organize projects and manage permissions for a collection of related projects, or to create nested groups as part of your release workflow.

Input Field Descriptions

Create Group Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Group NameName of the new group to create.devops-team
Group PathURL path for the group (unique, lowercase, no spaces).devops-team
Group Description(Optional) Description for the group.Team for DevOps tools
Group VisibilityVisibility of the group: public, internal, or private.private
Parent ID(Optional) Parent group ID for creating a nested group.1234

Output Field Descriptions

Create Group Output

Field NameDescriptionExample
Group IDNumeric ID of the created group (Text).5678

Example Usage

Suppose you want to create a new private group called devops-team with path devops-team and description Team for DevOps tools:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Group Namedevops-team
Group Pathdevops-team
Group DescriptionTeam for DevOps tools
Group Visibilityprivate
Parent ID(leave blank)

The output field Group ID will contain the numeric ID of the created group.

Create Merge Request (Container)

This task creates a new merge request in a GitLab project. Use it to propose changes from one branch to be merged into another, often involving code review and approval processes as part of your release workflow.

Input Field Descriptions

Create Merge Request Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
Source BranchName of the branch containing your changes.feature/new-feature
Target BranchName of the branch you want to merge into.main
Merge Request TitleTitle for the new merge request.New task
Target Project ID(Optional) Numeric ID of the target project for cross-project merge.67890

Output Field Descriptions

Create Merge Request Output

Field NameDescriptionExample
Merge Request IDNumeric ID of the created merge request.42

Example Usage

Suppose you want to create a merge request from feature/new-feature to main in project ID 12345 with the title New task:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Source Branchfeature/new-feature
Target Branchmain
Merge Request TitleNew task
Target Project ID(leave blank)

The output field Merge Request ID will contain the numeric ID of the created merge request.

Create Project (Container)

This task creates a new project in GitLab. Use it to automate the creation of new repositories as part of your release workflow, including setting up visibility, importing from another repository, and organizing under a namespace.

Input Field Descriptions

Create Project Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project NameName of the new project to create.my-new-project
Project PathURL path for the project (unique, lowercase, no spaces).my-new-project
Namespace(Optional) Namespace ID for the project.1234
Project Description(Optional) Description for the project.Project for release
Import URL(Optional) URL of the repository to import from.https://.../repo.git
Project VisibilityVisibility of the project: public, internal, or private.private

Output Field Descriptions

Create Project Output

Field NameDescriptionExample
Project IDNumeric ID of the created project (Text).9876

Example Usage

Suppose you want to create a new private project called my-new-project with path my-new-project and description Project for release:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project Namemy-new-project
Project Pathmy-new-project
Namespace(leave blank)
Project DescriptionProject for release
Import URL(leave blank)
Project Visibilityprivate

The output field Project ID will contain the numeric ID of the created project.

Create Project Webhook (Container)

This task creates a new project webhook in GitLab. Use it to set up notifications for specific events occurring in a project, such as commits, merges, issues, pipelines, and more, as part of your release workflow.

Input Field Descriptions

Create Project Webhook Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
URLThe webhook URL to receive event notifications.https://.../webhook
Push EventsTrigger hook on push events.true
Issue EventsTrigger hook on issue events.false
Confidential Issues EventsTrigger hook on confidential issue events.false
Merge Requests EventsTrigger hook on merge request events.true
Tag Push EventsTrigger hook on tag push events.false
Note EventsTrigger hook on note events.false
Job EventsTrigger hook on job events.false
Pipeline EventsTrigger hook on pipeline events.true
Wiki Page EventsTrigger hook on wiki events.false
Verify SSLDo SSL verification when triggering the hook.true
Token(Optional) Secret token to validate received payloads.my-secret-token

Output Field Descriptions

Create Project Webhook Output

Field NameDescriptionExample
Hook IDNumeric ID of the created webhook (Text).2468

Example Usage

Suppose you want to create a webhook for project ID 12345 that triggers on push, merge request, and pipeline events, with SSL verification enabled:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
URLhttps://.../webhook
Push Eventstrue
Merge Requests Eventstrue
Pipeline Eventstrue
Verify SSLtrue
Tokenmy-secret-token

The output field Hook ID will contain the numeric ID of the created webhook.

Create Tag (Container)

This task creates a new tag in a GitLab project. Use it to mark a specific point in the repository history, such as for releases or significant milestones, as part of your release workflow.

Input Field Descriptions

Create Tag Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
ReferenceCommit hash, another tag name, or branch name from which to create the tag.main
Tag NameName of the tag to create.v1.0.0
Message(Optional) Description for the tag.Release v1.0.0

Output Field Descriptions

Create Tag Output

Field NameDescriptionExample
Commit IDThe hash of the commit for the tag (Text).1a2b3c4d5e6f...

Example Usage

Suppose you want to create a tag called v1.0.0 from the main branch in project ID 12345 with the message Release v1.0.0:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Referencemain
Tag Namev1.0.0
MessageRelease v1.0.0

The output field Commit ID will contain the hash of the commit for the tag.

Delete Tag (Container)

This task deletes a tag from a GitLab project. Use it to remove a tag from the repository, often when it is no longer relevant or was created by mistake, as part of your release workflow.

Input Field Descriptions

Delete Tag Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
Tag NameThe tag in the project that should be deleted.v1.0.0

Example Usage

Suppose you want to delete the tag v1.0.0 from project ID 12345:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Tag Namev1.0.0

This will delete the specified tag from the project repository.

Query Commits (Container)

This task queries the commit history within a GitLab project. Use it to retrieve a list of commits for a specific branch, with an optional limit on the number of results, as part of your release workflow.

Input Field Descriptions

Query Commits Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
Branch Name(Optional) Name of the branch to query commits from. Defaults to main branch.main
Results LimitUpper limit on the number of commits to return from the query.100

Output Field Descriptions

Query Commits Output

Field NameDescriptionExample
CommitsThe list of commits returned by the query.[commit data as text]

Example Usage

Suppose you want to query the latest 100 commits from the main branch in project ID 12345:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Branch Namemain
Results Limit100

The output field Commits will contain the list of commits returned by the query.

Query Data (Container)

This task queries general data from a GitLab project or repository using a specified API endpoint and JSON path. Use it to fetch metrics, logs, or other data as part of your release workflow.

Input Field Descriptions

Query Data Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Endpoint URIURI for the API endpoint (do not include URL parameters)./api/v4/projects/1/triggers
JSON PathThe JSON path expression for locating the value of interest.$.triggers[0].id

Output Field Descriptions

Query Data Output

Field NameDescriptionExample
ValueThe value extracted from the API response.12345

Example Usage

Suppose you want to query the first trigger ID from project ID 1:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
API Endpoint URI/api/v4/projects/1/triggers
JSON Path$.triggers[0].id

The output field Value will contain the value extracted from the API response using the specified JSON path.

Query Merge Requests (Container)

This task queries merge requests in a GitLab project. Use it to retrieve a list of merge requests, with options to filter, sort, and limit the results, as part of your release workflow.

Input Field Descriptions

Query Merge Requests Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
Results LimitUpper limit on the number of merge requests to return from the query.100
SortingApproach for sorting query results.Creation Datetime Descending
Simple ViewIf enabled, only basic merge request info is extracted.true
Source Branch(Optional) Only merge requests from this source branch will be returned.feature-branch
Target Branch(Optional) Only merge requests to this target branch will be returned.main
Milestone(Optional) Filter results by milestone.v1.0.0
State(Optional) Filter by merge request state (for example, opened, closed, merged).all

Output Field Descriptions

Query Merge Requests Output

Field NameDescriptionExample
Merge RequestsThe list of merge requests returned by the query.[merge request data as text]

Example Usage

Suppose you want to query the latest 100 merge requests from project ID 12345, sorted by creation date descending, and only those targeting the main branch:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Results Limit100
SortingCreation Datetime Descending
Target Branchmain
Stateall

The output field Merge Requests will contain the list of merge requests returned by the query.

Query Pipelines (Container)

This task queries CI/CD pipelines in a GitLab project. Use it to fetch information about pipelines, including their statuses and results, as part of your release workflow.

Input Field Descriptions

Query Pipelines Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345

Output Field Descriptions

Query Pipelines Output

Field NameDescriptionExample
PipelinesThe list of pipelines returned by the query.[pipeline data as text]

Example Usage

Suppose you want to query all pipelines for project ID 12345:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345

The output field Pipelines will contain the list of pipelines returned by the query.

Query Pipeline Status (Container)

This task queries the status of a specific pipeline run in a GitLab project. Use it to check the current state and results of a pipeline, as part of your release workflow.

Input Field Descriptions

Query Pipeline Status Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
Commit IDCommit SHA (hash id) for the pipeline.1a2b3c4d5e6f...
RefTag name or branch name for the build.main

Output Field Descriptions

Query Pipeline Status Output

Field NameDescriptionExample
Pipeline IDThe numeric ID of the pipeline.7890
Pipeline StatusThe current status of the pipeline.success
Pipeline Web URLThe web URL to view the pipeline in GitLab.https://.../pipelines/7890

Example Usage

Suppose you want to check the status of a pipeline for commit 1a2b3c4d5e6f... on the main branch in project ID 12345:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Commit ID1a2b3c4d5e6f...
Refmain

The output fields will provide the pipeline ID, its current status, and a web URL to view the pipeline in GitLab.

Query Project (Container)

This task queries a GitLab project. Use it to retrieve details about a specific project, such as its settings, members, and activity, as part of your release workflow.

Input Field Descriptions

Query Project Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project NameName of the GitLab project to query.my-project
Namespace(Optional) Namespace of the project.my-group

Output Field Descriptions

Query Project Output

Field NameDescriptionExample
Project IDThe numeric ID of the queried project.12345

Example Usage

Suppose you want to query the project named my-project in the namespace my-group:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project Namemy-project
Namespacemy-group

The output field Project ID will contain the numeric ID of the queried project.

Query Secure Data (Container)

This task queries secure or protected data from a GitLab project using a specified API endpoint and JSON path. Use it to fetch sensitive information with appropriate access controls as part of your release workflow.

Input Field Descriptions

Query Secure Data Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Endpoint URIURI for the API endpoint (do not include URL parameters)./api/v4/projects/1/variables
JSON PathThe JSON path expression for locating the value of interest.$.variables[0].value

Output Field Descriptions

Query Secure Data Output

Field NameDescriptionExample
ValueThe secure value extracted from the API response.my-secret-value

Example Usage

Suppose you want to query the first variable value from project ID 1:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
API Endpoint URI/api/v4/projects/1/variables
JSON Path$.variables[0].value

The output field Value will contain the secure value extracted from the API response using the specified JSON path.

Query Tags (Container)

This task queries tags in a GitLab project. Use it to list all tags in a repository, with options to filter, sort, and limit the results, as part of your release workflow.

Input Field Descriptions

Query Tags Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
Search(Optional) Search criteria to filter tags.v1.0
Results LimitUpper limit on the number of tags to return from the query.100
Order byTag order by name or updated. Default is updated.updated
Sorting OrderTag sorting order by asc or desc. Default is desc.desc

Output Field Descriptions

Query Tags Output

Field NameDescriptionExample
Gitlab_tagsThe list of tags returned by the query.[tag data as text]

Example Usage

Suppose you want to query the latest 100 tags from project ID 12345, ordered by update time descending:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Results Limit100
Order byupdated
Sorting Orderdesc

The output field Gitlab_tags will contain the list of tags returned by the query.

Trigger Pipeline (Container)

This task triggers a new CI/CD pipeline run for a GitLab project. Use it to start a pipeline after a commit, merge, or other event as part of your release workflow, using a Pipeline Trigger Token (not a Personal Access Token).

important

This task requires a GitLab Pipeline Trigger Token. Do not use a Personal Access Token – the task will fail.

To create a trigger token in GitLab:

  1. Go to your GitLab project
  2. Navigate to: Settings → CI/CD → Pipeline triggers
  3. Click Add trigger
  4. Copy the generated token and keep it handy

Input Field Descriptions

Trigger Pipeline Input

Field NameDescriptionExample
CapabilitiesRoute jobs to particular types of Release runners based on capabilities.remote
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Project IDNumeric ID of the GitLab project. Do not use the project name.12345
RefCommit hash, tag name, or branch name from which to trigger the pipeline.main
TokenThe token for the pipeline trigger (not the API access token).my-trigger-token
Variables(Optional) Key-value pairs to provide variables to the pipeline execution (for example, key1: value1, key2: value2).key1: value1

Output Field Descriptions

Trigger Pipeline Output

Field NameDescriptionExample
Pipeline IDThe numeric ID of the triggered pipeline.7890
Pipeline StatusThe current status of the triggered pipeline.pending
Pipeline Web URLThe web URL to view the pipeline in GitLab.https://.../pipelines/7890

Example Usage

Suppose you want to trigger a pipeline for the main branch in project ID 12345 with a trigger token and a variable:

FieldValue
Capabilitiesremote
GitLab Servergitlab.example.com
Project ID12345
Refmain
Tokenmy-trigger-token
Variableskey1: value1

The output fields will provide the pipeline ID, its current status, and a web URL to view the pipeline in GitLab.