GitLab Container Plugin
The GitLab container plugin allows you to perform various functions in your GitLab ecosystem.
You must set up a connection to the GitLab server before adding GitLab tasks. For more information, see Set up Connection to GitLab Server.
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
- From the navigation pane, under CONFIGURATION, click Connections.
- Under HTTP Server connections, next to GitLab: Server (Container), click . The New GitLab: Server (Container) page opens.
- In the Title field, enter a name for the configuration.
- In the URL field, enter the server URL.
- If you want to connect to the server, without validating the TLS/SSL certificate, select the Allow Insecure Connection checkbox.
- In the API Token field, enter the PAT token created for the GitLab API.
- To test the connection, click Test.
- To save the configuration, click Save.
Create Branch (Container)
This task creates a branch. It is used to start a new line of development separate from the main codebase.
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.
Create Group (Container)
This task creates a group. It is used to organize projects and manage permissions for a collection of related projects.
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 Project (Container)
This task creates a project in GitLab.
- In the release flow tab of a Release template, add a task of type GitLab > Create Project (Container).
- Click the added task to open it.
- 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.
- In the GitLab Server field, select the configured GitLab server.
- In the Project Name field, enter the name of the project that you want to create.
- In the Project Path field, enter the path for the project.
- In the Namespace field, enter a namespace ID for the project.
- In the Project Description field, enter the description of the project.
- In the Import URL field, enter the URL of the repository for the project.
- 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 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 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.
Query Commits (Container)
The Query Commits (Container) task queries the commit history within the GitLab repositories.
- In the release flow tab of a Release template, add a task of type GitLab > Query Commits (Container).
- Click the added task to open it.
- 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.
- In the GitLab Server field, select the configured GitLab server.
- In the Project ID field, enter the ID of the project.
- In the Branch Name field, enter the branch name where you want to query commits.
- 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 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 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 Pipelines (Container)
This task queries pipelines. It is used to fetch information about CI/CD pipelines, including their statuses and results.
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 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 Tags (Container)
This task queries tags. It is used to list all tags in a repository, often with details about the tagged commits.
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.
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.
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.
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.
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.