Connect to GitLab pipelines

Updated at:

Connect GitLab project pipelines to a Digital Employee so that conversations and long-running tasks can access data from those pipelines and jobs within the selected scope. This topic describes how to add a GitLab pipeline connector through the Pipeline entry in STAROps.

How it works

The GitLab pipeline connector uses an environment agent to run the GitLab command line interface (GitLab CLI) installed and authenticated on the bound machine. The GitLab credentials are held by the GitLab CLI and remain on the machine. You do not need to enter them when you configure the connector, and STAROps does not collect or store them. The connector's capabilities are limited by the GitLab CLI on the machine and the permissions of its credentials. The Pipeline entry and the Code Access entry add the same connector type.

Prerequisites

  • A Digital Employee is created.

  • An environment agent is created and bound to a machine whose status is Online. Each environment agent can bind to one machine.

  • The machine declares the bash capability in capabilities.json. When you enable the built-in bash capability with the installation command, the declaration is added automatically.

  • The GitLab CLI is installed and authenticated on the machine.

  • The target project has pipelines to analyze.

To install and authenticate the GitLab CLI, see GitLab CLI in the GitLab documentation. To create an environment agent and bind a machine, see Environment agent.

Add a GitLab pipeline connector

To add a GitLab pipeline connector, complete the following steps:

1. Open pipeline

Choose Settings > Connectors > Pipeline.

2. Select GitLab

  1. Click Add pipeline.

  2. Select GitLab.

  3. Click Next.

3. Enter connector information

Configure the following parameters:

  • Connector ID: Uniquely identifies the connector and cannot be changed after creation. The ID must contain 1 to 64 lowercase letters, digits, or hyphens, start with a letter, and end with a letter or digit.

  • Name: Distinguishes the connector in the list.

4. Select an environment agent

Select the environment agent that runs GitLab commands and make sure that it has the bash capability. You cannot continue if the selected environment agent is offline.

This connector does not provide a credential input field. For details about how the connector authenticates to GitLab, see Connect to GitHub Actions

5. Configure access scope

After you select an environment agent, Access scope appears. Select the GitLab projects whose pipelines the connector can make available. You can search by name, select all projects, or select specific projects. After you confirm the selection, click Next.

Pipelines are made available by project. Pipelines in projects outside the scope do not appear in access results even if the credentials on the machine have permission to access them. When you select all projects, the actual accessible scope is still limited by the permissions of the credentials on the machine.

6. Install skills

Install the required GitLab operation Skill starops-gitlab-operation. If it is not installed, the Digital Employee cannot query pipeline and job data in conversations and long-running tasks.

(Optional) Install the pipeline diagnostics Skill starops-gitlab-ci-diagnosis. After it is installed, the Digital Employee can use pipeline and job data in conversations to analyze the causes of pipeline failures.

7. Configure data modeling

  • Basic modeling: After the connector is created, the selected GitLab projects, their pipelines, and their basic relationships are modeled.

  • Agentic relationship exploration: (Optional) Explores cross-source relationships with applications, infrastructure, observable data, and other sources after basic modeling. Modeling starts conversations and is billed based on the selected model and actual usage.

8. Check and save

In Check and add, review the Connector ID, environment agent, Access scope, installed Skills, and modeling configuration. After you confirm the settings, click Save.

After you save, the system checks the connection status. The connector appears in the Pipeline list.

Connection check

The GitLab pipeline connector checks the environment agent runtime and machine capabilities. It does not check the sign-in status of the GitLab CLI. The following table describes the check items:

Check item

Description

Runtime status

Indicates whether the environment agent is online and can run commands on the bound machine.

Machine capability

Indicates whether the machine declares the bash capability.

Important

A status of Succeeded means only that the environment agent and its capabilities are available. If the GitLab CLI sign-in status on the machine expires, the status can still display Succeeded, but queries in conversations return authentication failures.

Available data

After the connector is created, conversations and long-running tasks can query the following data:

  • Pipelines — Pipeline lists and details for the selected projects.

  • Jobs — Job lists and details for pipelines.

  • Merge requests and pipelines — Pipeline lists and details associated with merge requests.

In addition to these read operations, the connector supports write operations such as triggering pipelines, retrying jobs, and canceling jobs.

Note

Write operations directly affect the target GitLab instance and have the same effect as running commands yourself on that machine. Whether an operation succeeds depends on the permissions of the credentials on the machine. Before you ask the Digital Employee to perform a write operation, verify each project and pipeline parameter and proceed carefully.

Verify the connection

After you save the connector, verify that it is added successfully:

  1. In the Pipeline list, confirm that the connector's Name, type GitLab, status Succeeded, environment agent, and Access scope match the settings used when you created it.

  2. Click View details and verify the environment agent and Access scope.

  3. In a conversation, ask, "What is the status of the most recent pipelines for project X?" Confirm that the response contains pipeline data for projects within the selected scope.

Note

A Succeeded status confirms only that the environment agent and its capabilities are available. To confirm that the Digital Employee can query GitLab data, complete step 3. For details, see Connect to GitHub Actions.

FAQ

How does a connector added through the Pipeline entry differ from one added through the Code Access entry?

Both are the same connector type and can query the same data. They differ in the list where they are added and the diagnostics capabilities that can be loaded. The Pipeline entry can additionally install the pipeline diagnostics Skill to analyze pipeline failures. If you need both code and pipeline context, add the connector through the entry that matches the primary purpose, or add it through both entries. For instructions, see Connect to GitHub Actions.

Why is the connector status Succeeded but no data is available in conversations?

Check the following in order:

  1. The environment agent is Online.

  2. The GitLab CLI on the machine is authenticated, and its sign-in status has not expired.

  3. The target project is within the Access scope.

In most cases, the sign-in status on the machine has expired. Authenticate the GitLab CLI again on the machine and retry.

Why is a conversation unable to identify the cause of a pipeline failure?

Make sure that starops-gitlab-ci-diagnosis is installed and that the failed pipeline belongs to a project within the Access scope. Include the project name and pipeline number in your question to narrow the analysis.

Why does saving show that the Connector ID already exists?

Change the Connector ID and try again.

Why is the connector status Failed?

Click Refresh status to check again. If the status remains Failed, delete the connector and create it again. For more information, see Troubleshoot connector issues.

References