Skip to content

GitLab - Usage

To use the GitLab plug-in you must define the integration, create a value stream, and upload the integration.

The value stream map contains the properties, you will use to define the plug-in integration. Basically, the plug-in integration is defined with a value stream within the DevOps Velocity user interface. Defining the integration includes defining configuration properties that connect the DevOps Velocity server to the GitLab server.

The basic flow to use the plug-in includes:

  1. Download the value stream map. The value stream map is a JSON file used to define integrations.
  2. Edit the JSON file to include the plug-in configuration properties.
  3. Save and upload the JSON file. This replaces the current JSON file with the new content.
  4. View the new integration on the Integration user interface page.

Integration type

The GitLab plug-in supports scheduled events integration which are listed in the following table.

NameDescription
syncGitLabIssueQueries the GitLab Server for issues in a project.
syncGitLabPullQueries the GitLab Server for merge requests in a project.
syncGitLabCommitQueries the GitLab Server for commits in a project.
syncGitLabBuildQueries the GitLab Server for builds in a project.
Sync Gitlab deploymentsA Gitlab deployments that will occur on a timer
Sync Gitlab issuesA Gitlab issues that will occur on a timer
Sync Gitlab PipelinesGitlab Pipeline that will occur on a timer

Integration

From the user interface Value Steam page, click Upload to upload the value stream map which is a JSON file.

The JSON file contains the information for creating a value stream and integrating with the GitLab server. The following table describes the information for the creating a DevOps Velocity value stream map.

NameDescriptionRequired
imageThe version of the plug-in that you want to use. To view available versions, see the UrbanCode DockerHub. If a value is not specified, the latest version is used.No
loggingLevelThe level of Log4j messages to display in the log file. Valid values are: all, debug, info, warn, error, fatal, off, and trace.No
nameAn assigned name to the value stream.Yes
propertiesList of configuration properties used to connect and communicate with the GitLab server. Enclose the properties within braces.Yes
tenant_idThe name of the tenant.Yes
typeUnique identifier assigned to the plug-in. The value for the GitLab plug-in is ucv-ext-gitlab.Yes

Configuration Properties

The configuration properties which are included in the properties field are unique to the GitLab plug-in and define the connection and communication to the GitLab server.

NameTypeDescriptionRequiredProject Name
URLStringThe URL of the GitLab server.YesbaseUrl
Private TokenStringThe Gitlab server access token. For more information, see the GitLab documentation at https://gitlab.com/profile/personal_access_tokens.Yesprivate_token
DevOps Velocity User Access KeyStringThe user access key used to authenticate with the DevOps Velocity server.YesucvAccessKey
Priorty Field Mapping using LabelsArrayMap GitLab label for Priorty to this server. The priorty field label must be a key vaule pair connected by “:” or “-“. Example: If Gitlab Label for priorty is priortyKey:High, then pass priortyKey in this field.NofieldMapping
Proxy ServerStringThe URL of the proxy server including the port number.NoproxyServer
Proxy User NameStringThe user name used to authenticate with the proxy server.NoproxyUsername
Proxy PasswordStringThe password used to authenticate with the proxy server.NoproxyPassword
Project Names (Comma Separated List)ArrayYou can import the source data by providing a list of GitLab Project Names, which can include regular expressions for pattern matching. For instance, you can use wildcards such as * to match any character sequence, such as sample* to match project names that start with sample. Example: sample, sample1, etc.NoprojectNames
BranchStringGitLab repositories branch, The branch to pull commits from.NobranchName
Additional Branches (Comma Separated List)ArrayThe name of additional branches to collect commits from besides the main one, leave blank if not needed.NootherBranches

Example

The following example can be used as a template to include the GitLab plug-in integration into the JSON file. Copy and paste the template into the JSON file and make the appropriate changes.


"integrations":[
{

"type":"ucv-ext-gitlab",
"tenant_id":"tenantId",
"name":"my-repo",
"disabled":false,

"properties":{
"ucvAccessKey":"key",
"baseUrl":"https://gitlab.com",

"private_token":"token",
"projectIds":[
"8918",
"12345"
],

"proxyServer": "http://localhost:3128",
"proxyUsername": "admin",
"proxyPassword": "1234",

"fieldMapping:[
"priorityKey1",
"priorityKey2"
]
}``
}``
]