Skip to main content
Version: Release 24.1

GitLab Container Plugin

The GitLab container plugin allows you to perform various functions in your GitLab ecosystem.

important

You must set up a connection to the GitLab server before adding GitLab tasks. For more information, see Set up Connection to GitLab Server.

note

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

  1. From the navigation pane, under CONFIGURATION, click Connections.
  2. Under HTTP Server connections, next to GitLab: Server (Container), click add button. The New GitLab: Server (Container) page opens.
  3. In the Title field, enter a name for the configuration.
  4. In the URL field, enter the server URL.
  5. If you want to connect to the server, without validating the TLS/SSL certificate, select the Allow Insecure Connection checkbox.
  6. In the API Token field, enter the PAT token created for the GitLab API.
  7. To test the connection, click Test.
  8. To save the configuration, click Save.

Create GitLab server

Create Project (Container)

The Create Project (Container) task creates a project in GitLab.

  1. In the release flow tab of a Release template, add a task of type GitLab > Create Project (Container).
  2. Click the added task to open it.
  3. 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.
  4. In the GitLab Server field, select the configured GitLab server.
  5. In the Project Name field, enter the name of the project that you want to create.
  6. In the Project Path field, enter the path for the project.
  7. In the Namespace field, enter a namespace ID for the project.
  8. In the Project Description field, enter the description of the project.
  9. In the Import URL field, enter the URL of the repository for the project.
  10. 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 (Container)

Query Commits (Container)

The Query Commits (Container) task queries the commit history within the GitLab repositories.

  1. In the release flow tab of a Release template, add a task of type GitLab > Query Commits (Container).
  2. Click the added task to open it.
  3. 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.
  4. In the GitLab Server field, select the configured GitLab server.
  5. In the Project ID field, enter the ID of the project.
  6. In the Branch Name field, enter the branch name where you want to query commits.
  7. 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 Commits (Container)