GitLab

Introduction

GitLab is a web-based DevOps lifecycle tool that provides a Git repository manager, CI/CD pipeline features, and more, enabling teams to collaborate on code, track issues, and deploy applications.

What is GitLab?

GitLab is an open-source platform that offers a complete DevOps toolchain, allowing developers to manage repositories, run automated tests, and deploy code. It supports version control, continuous integration, and continuous deployment, facilitating development workflows.

Autom Mate Integration with GitLab

Integrating GitLab with Autom Mate enhances your automation capabilities by allowing you to manage projects and pipelines directly within your workflows. This integration enables you to automate tasks such as creating and managing pipelines, retrieving project details, searching for projects, thereby improving efficiency and reducing manual effort.

Credentials

To connect Autom Mate with your GitLab account, user needs yo generate a Personal Access Token in GitLab. To do that please follow below steps.

1

Log in to your GitLab account.

2

Navigate to your profile settings.

3

Select "Access Tokens" and create a new token with the necessary scopes.

Credentials Creation Steps

To use GitLab actions in Autom Mate, you need to create credentials. Follow these steps:

1

Navigate to the Vault page under the Management section in the left side menu.

2

Ensure you are on the Application Credentials tab on the left side.

3

Search for GitLab using the filter or manually.

4

Alternatively, click on the "New App Credentials" button at the top left side of the window to create new credentials.

5

Provide Credentials

  • Connector Name: Unique name for the connector.

  • Authentication Type: Choose the method you want to connect.

  • URL: URL of the GitLab instance.

  • Username: Username of the user which will do the API Calls.

  • API Token: The API Token of the user provided above.

6

After filling the fields, press on "Test Connect". This option will try to send an API call to "{GitLab_url}/user/{username}/api/json" to see if the credentials are working. If you get a successful response, you can press the "Connect & Create" button to save the credential.

How to Use Actions

Autom Mate provides several actions to interact with GitLab. Below are the available actions and their details:

Create Pipeline

Initiates a new pipeline for a specified project and branch or tag. Triggers a new pipeline in a GitLab project, which automates tasks such as building, testing, and deploying code. This is useful for CI/CD workflows, ensuring code changes are validated and deployed.

  • Use this action when you need to automate deployments after a code push or merge.

  • Ideal for continuous integration, ensuring all commits go through the same validation process.

  • Works with specific branches or tags, allowing for precise control over the pipeline execution.

Usage Instructions

1

Project ID

The unique identifier of the project where the pipeline will be created.

2

Ref

The branch or tag to run the pipeline on.

3

Variables (Optional)

A list of key-value pairs to set CI/CD variables for the pipeline.


Delete Pipeline

Removes a specified pipeline from a project. This is useful when a pipeline is no longer needed or if a faulty pipeline needs to be cleared from the system.

  • Use this action to clean up old pipelines and keep the project history organized.

  • Helps reset incorrect builds by deleting problematic pipelines and rerunning new ones.

Usage Instructions

1

Project ID

The unique identifier of the project containing the pipeline.

2

Pipeline ID

The unique identifier of the pipeline to be deleted.


Get Pipeline

Retrieves details of a specific pipeline within a project. Retrieves details of a specific pipeline, including its status, execution time, and associated commits.

  • Use this action to monitor pipeline progress within Autom Mate.

  • Helps in troubleshooting failed pipelines by fetching details such as logs and errors.

  • Can be combined with notifications to alert teams when a pipeline completes or fails.

Usage Instructions

1

Project ID

The unique identifier of the project containing the pipeline.

2

Pipeline ID

The unique identifier of the pipeline to retrieve.


Get Project

Fetches details of a specific project. Fetches detailed information about a GitLab project, such as repository details, visibility settings, and members.

  • Use this action to retrieve project metadata dynamically within workflows.

  • Helps automate project-related reporting and documentation.

  • Useful when working with multiple projects and needing quick access to project details.

Usage Instructions

1

Project ID

The Project ID is required to retrieve project details. When selecting or entering a Project ID, the Data Manager will open automatically, displaying available fields within the project.

The Project ID is required to retrieve project details. Once you select or enter a Project ID, the Data Manager will automatically open, displaying the available fields within the project.


List Project Pipelines

Lists all pipelines associated with a specific project. Returns a list of all pipelines for a given GitLab project, including their statuses, IDs, and creation timestamps.

  • Use this action to get an overview of recent pipeline runs.

  • Helps identify patterns in failures or delays in the CI/CD process.

  • Useful for automating reports about pipeline success rates.

Usage Instructions

1

The Project ID field is required to retrieve pipelines.

2

You can either select a Project ID from a dropdown (maximum 100 projects will be listed) or enter it manually.

3

When selecting a Project ID, the Data Manager will open automatically, displaying all available fields within GitLab related to pipelines.

4

You can specify additional parameters such as Name, Order By, Ref, Scope, SHA, Sort, Source, Status, Updated After, etc.


List Projects

Retrieves a list of all accessible projects. Allows users to fetch projects, applying filters to refine the results as needed.

  • Use this action to retrieve a filtered list of projects. When configuring this action, the Data Manager will open automatically, displaying all available fields within the projects, such as archived status, visibility, ID range, and more. These fields help refine the query and customize the output.

  • Select a project from a list when configuring new processes.

  • Useful for managing multiple GitLab repositories efficiently.

The Data Manager will automatically open, displaying the available fields within the project.


Search Projects by Name

Searches for projects that match a specified name or pattern. Searches for GitLab projects based on a given name or keyword.

  • Use this action to find projects quickly without manually browsing through GitLab.

  • Helps when managing large-scale projects with multiple repositories.

  • Useful for automating workflows that need to operate on specific projects dynamically.

Usage Instructions

1

Project Name

The name or partial name of the project to search for.

Last updated

Was this helpful?