Skip to main content
Version: Release 26.1

GitLab Plugin

The GitLab Plugin (Jython-based) integrates Digital.ai Release with GitLab to automate repository operations, manage merge requests, and trigger or monitor CI/CD pipelines as part of your release workflows.

This plugin runs directly on the Release server and is best suited for event-driven workflows, lightweight automation, and visibility use cases, such as triggers and dashboard tiles.

note

For scalable, runner-based execution, use the GitLab Container Plugin.

What You Can Do With This Plugin

  • Manage branches, tags, and repositories
  • Create, approve, close, and merge merge requests
  • Trigger and monitor GitLab pipelines
  • Query commits, projects, pipelines, and merge requests
  • Use webhooks and triggers to start releases
  • Visualize GitLab data using dashboard tiles

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.

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:

  • 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 Plugin (Jython) when you need:

  • Event-driven automation using GitLab triggers or webhooks
  • GitLab dashboards and reporting inside Release
  • Lightweight orchestration without distributed execution
note

For scalable, runner-based execution, use the GitLab Container Plugin.

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.

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 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 use 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

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 simultaneously 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 in the top right of the screen to create a dashboard.

  3. In the top right of the screen, click Configure dashboard.

  4. In the top right of the screen, click Add tiles.

  5. Hover over GitLab Commits Tile, and click Add.

  6. Click Configure option present in the tile.

  7. Enter a name for the tile in the Title field.

  8. Select the server configured in the GitLab Server field.

  9. Enter the project key in the Project ID field.

  10. Enter the name of branch from where data can be fetched in the Branch Name field.

  11. Enter the limit of list in numbers, in the Results Limit field.

  12. Click Save.

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

Accept Merge Request

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.

Field Descriptions

Accept Merge Request

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
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
GitLab Servergitlab.example.com
API Keyyour-api-token
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.

Create Branch

This task creates a new branch in a GitLab project, allowing you to start a new line of development separate from the main codebase.

Input Fields

Create Branch Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
New Branch NameName of the new branch to create.feature/new-login
ReferenceBranch name or commit hash to create the branch from.main

Output Fields

Create Branch Output

Output PropertyDescription
Commit SourceCommit hash used to generate the new branch.

Example Usage

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

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
New Branch Namefeature/new-login
Referencemain

After running the task, the output will provide the commit hash used to generate the new branch.

Create Group

This task creates a new group in GitLab, which is used to organize projects and manage permissions for a collection of related projects.

Input Fields

Create Group Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
Group NameThe name of the new group to create.devops-team
PathThe URL-friendly path for the group (used in URLs).devops-team
Parent ID(Optional) Numeric ID of the parent group if creating a subgroup.1234
Description(Optional) Description for the group."DevOps team group"
Group Visibility(Optional) Visibility level: private, internal, or public. Default is private.private

Output Fields

Create Group Output

Output PropertyDescription
Group IDThe numeric ID of the created group.

Example Usage

Suppose you want to create a group called devops-team with a description and private visibility:

FieldValue
GitLab Servergitlab.example.com
Group Namedevops-team
Pathdevops-team
DescriptionDevOps team group
Visibilityprivate

After running the task, the output will confirm group creation and provide the group ID, name, path, and a link to view the group in GitLab.

Create Merge Request

This task creates a merge request (MR) in GitLab, allowing you to propose changes from one branch to be merged into another, often involving code review and approval processes. You can optionally remove the source branch after the merge request is accepted.

Input Fields

Create Merge Request Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
Source BranchName of the branch with your changes.feature/new-login
Target BranchName of the branch you want to merge into.main
Merge Request TitleTitle for the merge request."Add login feature"
Target Project ID(Optional) Numeric ID of the target project for cross-project MRs.67890
Remove Source Branch(Optional) If true, the source branch will be removed after merge.true

Output Fields

Create Merge Request Output

Output PropertyDescription
Merge Request IDThe numeric ID of the created MR.

Example Usage

Suppose you want to create a merge request from feature/new-login to main in project ID 12345:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Source Branchfeature/new-login
Target Branchmain
Merge Request TitleAdd login feature
Remove Source Branchtrue

After running the task, the output will provide the Merge Request ID of the newly created MR.

Create Project

This task creates a new project in GitLab, initializing a new repository within a specified namespace or group.

Input Fields

Create Project Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project NameName of the new project.my-new-project
Project PathURL-friendly path for the project (used in URLs).my-new-project
Namespace(Optional) Namespace ID for the project. Defaults to user namespace if blank.12345
Project Description(Optional) Description for the project."Demo project repo"
Import URL(Optional) URL to import an existing repository.https://.../repo.git

Output Fields

Create Project Output

Output PropertyDescription
Project IDThe numeric ID of the created project.

Example Usage

Suppose you want to create a project called my-new-project in your default namespace:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project Namemy-new-project
Project Pathmy-new-project
Project DescriptionDemo project repo

After running the task, the output will provide the Project ID of the newly created project.

Create Project Webhook

This task creates a project webhook in GitLab, allowing you to set up notifications for specific events (such as commits, issues, merge requests, and more) occurring in a project.

Input Fields

Create Project Webhook Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
URLThe webhook URL to receive event notifications.https://.../webhook
Push EventsTrigger hook on push events.true
Issues EventsTrigger hook on issues events.true
Confidential Issues EventsTrigger hook on confidential issues events.false
Merge Requests EventsTrigger hook on merge requests 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

Output Fields

Create Project Webhook Output

Output PropertyDescription
Hook IDThe numeric ID of the created webhook.

Example Usage

Suppose you want to create a webhook for project ID 12345 that triggers on push and merge request events:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
URLhttps://.../webhook
Push Eventstrue
Merge Requests Eventstrue

After running the task, the output will provide the Hook ID of the newly created webhook.

Create Tag

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

Input Fields

Create Tag Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.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 version 1.0.0

Output Fields

Create Tag Output

Output PropertyDescription
Commit IDThe hash of the commit for the tag.

Example Usage

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

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Referencemain
Tag Namev1.0.0
MessageRelease version 1.0.0

After running the task, the output will provide the Commit ID (hash) for the created tag.

Query Commits

This task queries commits in a GitLab project. It is used to retrieve a list of commits from a repository, including details such as author, date, commit message, and more.

Input Fields

Query Commits Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
Branch Name(Optional) Branch to filter commits. If not provided, the default branch is used.main
Results LimitUpper limit on the number of commits to return from the query.10

Output Fields

Query Commits Output

Output PropertyDescription
CommitsList of commit objects with details (ID, message, author, date, etc.).

Example Usage

Suppose you want to query the last 5 commits on the main branch for project ID 12345:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Branch Namemain
Results Limit5

After running the task, the output will provide a list of the latest 5 commits, including their commit IDs, messages, authors, and dates.

Query Data

This task queries data from a GitLab project or repository using a custom API endpoint. It is used to fetch general data, such as metrics or logs, and extract specific values using a JSON path expression. In Release 25.3, a new Query Parameters field is added to narrow search results.

Input Fields

Query Data Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
API endpoint URIURI for the API endpoint (for example, /api/v4/projects/1/triggers). Do not include URL parameters./api/v4/projects/1/triggers
Query parameters(Optional) Key-value pairs to add as query parameters to the API endpoint.key: status, value: success
JSON pathThe JSON path expression for locating the value of interest in the response.$.[0].id

Output Fields

Query Data Output

Output PropertyDescription
ValueOutput received as per the JSON path expression given.

Example Usage

Suppose you want to fetch the ID of the first trigger for a project using the endpoint /api/v4/projects/1/triggers and extract the ID using the JSON path $. [0].id:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
API endpoint URI/api/v4/projects/1/triggers
Query parameters(leave blank for all triggers)
JSON path$.[0].id

After running the task, the output will provide the value of the first trigger's ID as specified by the JSON path.

Query File Data

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

Input Fields

Query File Data Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
File pathPath to the JSON or YAML file in the repository.config/settings.json
Revision(Optional) Branch, tag, or commit hash to fetch file data.main
JSON path(Optional) The JSON path expression for locating the value of interest.$.version

Output Fields

Query File Data Output

Output PropertyDescription
ValueOutput received as per the JSON path expression given.

Example Usage

Suppose you want to fetch the value of the version property from the file config/settings.json in project ID 12345 on the main branch:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
File pathconfig/settings.json
Revisionmain
JSON path$.version

After running the task, the output will provide the value of the version property as specified by the JSON path.

Query Merge Requests

This task queries merge requests (MRs) in a GitLab project. It is used to retrieve a list of merge requests, along with their statuses and details, with options to filter, sort, and control the output format.

Input Fields

Query Merge Requests Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
Results LimitUpper limit on the number of merge requests to return from the query.10
SortingApproach for sorting query results.Creation Datetime Descending
Simple ViewIf enabled, only the id, URL, title, description, and basic state are extracted.true
Source Branch(Optional) Only matching merge requests with this source branch will be returned.feature/new-login
Target Branch(Optional) Only matching merge requests with this target branch will be returned.main
Milestone(Optional) Filter results by milestone. Provide a specific milestone, "Any", or "None".v1.0.0

Output Fields

Query Merge Requests Output

Output PropertyDescription
Merge RequestsList of merge request objects with details (ID, title, state, etc.).

Example Usage

Suppose you want to query the last 5 merge requests for project ID 12345, sorted by creation date (descending), and only show simple view:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Results Limit5
SortingCreation Datetime Descending
Simple Viewtrue

After running the task, the output will provide a list of the latest 5 merge requests, including their IDs, URLs, titles, descriptions, and basic states.

Query Pipelines

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

Input Fields

Query Pipelines Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345

Output Fields

Query Pipelines Output

Output PropertyDescription
PipelinesList of pipeline objects with details (ID, status, etc.).

Example Usage

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

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345

After running the task, the output will provide a list of pipelines, including their IDs, statuses, and other details.

Query Project

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

Input Fields

Query Project Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project NameName of the project to query.my-project
Namespace(Optional) Namespace of the project.my-group

Output Fields

Query Project Output

Output PropertyDescription
Project IDThe numeric ID of the queried project.

Example Usage

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

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project Namemy-project
Namespacemy-group

After running the task, the output will provide the Project ID and other details of the queried project.

Query Secure Data

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

Input Fields

Query Secure Data Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
API Endpoint URIURI for the API endpoint (for example, /api/v4/projects/1/triggers). Do not include URL parameters./api/v4/projects/1/triggers
Query parameters(Optional) Key-value pairs to add as query parameters to the API endpoint.key: status, value: success
JSON PathThe JSON path expression for locating the value of interest in the response.$.[0].id

Output Fields

Query Secure Data Output

Output PropertyDescription
ValueOutput received as per the JSON path expression given.

Example Usage

Suppose you want to fetch a sensitive value from the endpoint /api/v4/projects/1/triggers and extract the ID using the JSON path $. [0].id:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
API Endpoint URI/api/v4/projects/1/triggers
Query parameters(leave blank for all triggers)
JSON Path$.[0].id

After running the task, the output will provide the sensitive value as specified by the JSON path.

Query Tags

This task queries tags in a GitLab project. It is used to list all tags in a repository, often with details about the tagged commits. You can filter, sort, and limit the results.

Input Fields

Query Tags Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
Search(Optional) Search string to filter tags.v1.0
Results LimitUpper limit on the number of tags to return from the query.10
Order byTag order by name or updated. Default is updated.updated
Sorting OrderTag sorting order by asc or desc. Default is desc.desc

Output Fields

Query Tags Output

Output PropertyDescription
TagsList of tag objects with details (name, commit, etc.).

Example Usage

Suppose you want to query the 5 most recently updated tags for project ID 12345:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Results Limit5
Order byupdated
Sorting Orderdesc

After running the task, the output will provide a list of the latest 5 tags, including their names, associated commits, and other details.

Run Job

This task runs a GitLab job manually. It is used to trigger a specific job defined in a GitLab CI/CD pipeline, with options to pass variables and control completion behavior.

Input Fields

Run Job Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
Job IDID of the job to run.678
Job variables(Optional) Variables passed to the job, overriding existing ones.key: ENV, value: prod
Wait for completionWait for the job to complete before finishing the task.true
Retry wait timeTime in seconds to wait before checking the status of the job again.10
Maximum retriesMaximum number of times to check the job status before ending the task.3

Output Fields

Run Job Output

Output PropertyDescription
Job statusStatus of the job (for example, success, failed, running).

Example Usage

Suppose you want to run job ID 678 in project ID 12345, wait for completion, and check the status every 10 seconds up to 3 times:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Job ID678
Wait for completiontrue
Retry wait time10
Maximum retries3

After running the task, the output will provide the final status of the job (for example, success, failed).

Trigger Pipeline

This task triggers a pipeline in GitLab. It is used to start a new CI/CD pipeline run for a project, usually after a commit or merge, 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

Also see, Create Pipeline.

Input Fields

Trigger Pipeline Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
RefCommit hash, tag name, or branch name from which to trigger the pipeline.main
TokenPipeline Trigger Token (not a Personal Access Token).glptt-abc123
Variables(Optional) Key-value pairs to provide variables to the pipeline execution.key: ENV, value: prod
Complete task on pipeline failureIf enabled, the task will be completed even if the pipeline is failed or canceled.true

Output Fields

Trigger Pipeline Output

Output PropertyDescription
Pipeline IDThe numeric ID of the triggered pipeline.
Pipeline StatusThe status of the triggered pipeline.
Pipeline Web URLThe web URL to view the pipeline in GitLab.

Example Usage

Suppose you want to trigger a pipeline for project ID 12345 on the main branch, using a pipeline trigger token:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Refmain
Tokenglptt-abc123
VariablesENV=prod

After running the task, the output will provide the Pipeline ID, status, and a link to view the pipeline in GitLab.

Query Pipeline Status

This task queries the status of a pipeline in GitLab. It is used to check the current state and results of a specific pipeline run, such as after triggering a pipeline.

Input Fields

Query Pipeline Status Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
Commit ID(Optional) Commit SHA (hash) to filter the pipeline status.1a2b3c4d
Ref(Optional) Tag name or branch name for the build.main
Pipeline ID(Optional) ID of the triggered pipeline run to check status.6789
Complete task on pipeline failureIf enabled, the task will be completed even if the pipeline is failed or canceled.true

Output Fields

Query Pipeline Status Output

Output PropertyDescription
Pipeline IDThe numeric ID of the pipeline.
Pipeline StatusThe status of the pipeline (for example, running, success, failed).
Pipeline Web URLThe web URL to view the pipeline in GitLab.

Example Usage

Suppose you want to check the status of pipeline ID 6789 for project ID 12345:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Pipeline ID6789

After running the task, the output will provide the Pipeline ID, its current status, and a link to view the pipeline in GitLab.

Clone Repository

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

Input Fields

Clone Repository Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Repository NameName of the repository to clone.my-repo
Repository URLThe full URL of the repository to clone.https://gitlab.com/my-group/my-repo.git
Local PathLocal path where the repository will be cloned./home/user/projects/my-repo
Branch Name(Optional) Branch to checkout after cloning.main
Clear Existing FolderIf enabled, clears the local path folder if it already exists.true

Example Usage

Suppose you want to clone the repository my-repo from GitLab to your local machine:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Repository Namemy-repo
Repository URLhttps://gitlab.com/my-group/my-repo.git
Local Path/home/user/projects/my-repo
Branch Namemain
Clear Existing Foldertrue

After running the task, the specified repository will be cloned to the given local path, and the specified branch (if provided) will be checked out.

Commit Files

This task commits files to a GitLab repository. It is used to save changes to the repository with a new commit, typically including a commit message describing the changes. You can also push the commit to the remote repository if desired.

Input Fields

Commit Files Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Local PathLocal path to the repository where files will be committed./home/user/projects/my-repo
FilesList of files to stage and commit.src/app.py, README.md
Commit MessageMessage to add to the commit.Update app logic
Push to RemoteIf enabled, pushes the commit to the remote repository.true

Output Fields

Commit Files Output

Output PropertyDescription
OutputOutput message from the commit and push operation.

Example Usage

Suppose you want to commit changes to src/app.py and README.md in your local repository and push them to the remote:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Local Path/home/user/projects/my-repo
Filessrc/app.py, README.md
Commit MessageUpdate app logic
Push to Remotetrue

After running the task, the output will provide a message about the result of the commit and push operation.

Revert Commit

This task reverts a commit in a GitLab repository. It is used to undo the changes introduced by a specific commit, creating a new commit that reverses those changes on a specified branch.

Input Fields

Revert Commit Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Commit HashCommit hash to revert.1a2b3c4d5e6f7g8h9i0j
Project IDNumeric ID of the GitLab project.12345
Branch NameName of the branch where the revert will be applied.main

Output Fields

Revert Commit Output

Output PropertyDescription
OutputOutput message from the revert operation.
Reverted CommitID of the reverted commit.
Revert CommitID of the new commit created for the revert.

Example Usage

Suppose you want to revert commit 1a2b3c4d5e6f7g8h9i0j in project ID 12345 on the main branch:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Commit Hash1a2b3c4d5e6f7g8h9i0j
Project ID12345
Branch Namemain

After running the task, the output will provide a message about the revert operation, the ID of the reverted commit, and the ID of the new commit created by the revert.

Approve Merge Request

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

Input Fields

Approve Merge Request Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
Merge IDNumeric ID of the merge request to approve.678

Output Fields

Approve Merge Request Output

Output PropertyDescription
StatusStatus of the merge request approval (for example, approved, failed).

Example Usage

Suppose you want to approve merge request ID 678 for project ID 12345:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Merge ID678

After running the task, the output will provide the status of the merge request approval.

Close Merge Request

This task closes a merge request in GitLab. It is used to mark a merge request as closed without merging it, often due to changes being no longer needed or handled differently. You can optionally add a comment when closing the merge request.

Input Fields

Close Merge Request Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
Merge IDNumeric ID of the merge request to close.678
Comment(Optional) Comment to add to the merge request before closing.Closing as not needed

Example Usage

Suppose you want to close merge request ID 678 for project ID 12345 with a comment:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Merge ID678
CommentClosing as not needed

After running the task, the specified merge request will be closed and the comment will be added if provided.

Delete Tag

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

Input Fields

Delete Tag Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
Tag NameThe tag in the project that should be deleted.v1.0

Example Usage

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

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Tag Namev1.0

After running the task, the specified tag will be deleted from the project.

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.

Input Fields

Delete Branch Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
Branch NameThe branch in the project that should be deleted.feature/old-branch

Example Usage

Suppose you want to delete the branch feature/old-branch from project ID 12345:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Branch Namefeature/old-branch

After running the task, the specified branch will be deleted from the project.

Create Pipeline

This task creates a pipeline in GitLab using the GitLab API. It is used to start a new CI/CD pipeline run for a project using a GitLab API token (Personal Access Token or Project Access Token).

Unlike the Trigger Pipeline task, this task does not use a pipeline trigger token. Instead, it uses standard GitLab API authentication and is recommended for Release-managed automation workflows.

important

This task requires a GitLab API token with appropriate permissions (typically api scope). Do not use a Pipeline Trigger Token - the task will fail.

This task provides more control and flexibility compared to Trigger Pipeline, as it uses the GitLab API and supports standard authentication mechanisms.

Input Fields

Create Pipeline Input

Field NameDescriptionExample
GitLab ServerThe configured GitLab server connection to use.gitlab.example.com
API Key(Optional) Override the GitLab Server configuration API token for this task.your-api-token
Project IDNumeric ID of the GitLab project.12345
RefThe branch or tag to run the pipeline on.main
Variables(Optional) Key-value pairs to provide variables to the pipeline execution.key: ENV, value: prod
Wait For CompletionIf enabled, waits for the triggered pipeline run to complete.true

Output Fields

Create Pipeline Output

Output PropertyDescription
Pipeline IDThe numeric ID of the created pipeline.
Pipeline Web URLThe web URL to view the pipeline in GitLab.
Pipeline StatusThe status of the created pipeline.

Example Usage

Suppose you want to create a pipeline for project ID 12345 on the main branch, passing a variable and waiting for completion:

FieldValue
GitLab Servergitlab.example.com
API Keyyour-api-token
Project ID12345
Refmain
VariablesENV=prod
Wait For Completiontrue

After running the task, the output will provide the Pipeline ID, status, and a link to view the pipeline in GitLab.