How to use IBM® App Connect with GitLab

Gitlab is a DevOps platform that facilitates continuous integration and continuous delivery (CI/CD), and deployment in a single application.

Supported product and API versions

To find out which product and API versions this connector supports, see Detailed System Requirements on the IBM Support page.

Connecting to GitLab

Complete the connection fields that you see in the App Connect Designer Connect > Applications and APIs page (previously the Catalog page) or flow editor. If necessary, work with your GitLab administrator to obtain these values.

GitLab connection fields:

Application type
Select the Gitlab environment that you want to connect to:
  • GitLab self-managed - (the default): A GitLab instance that you have deployed on premises or in the cloud.
  • GitLab.com: Managed and administered by GitLab Inc.
Authorization method
Select the authorization method that you want to use, then click Continue.
  • Provide a username, password, and client credentials (OAUTH 2.0 PASSWORD) - (the default)
  • Provide credentials for App Connect to use (BASIC)

Then specify values in the connection fields for your chosen Gitlab environment and authorization method:

Authorization type Connection fields Applicability
Use the application's website to sign in (OAUTH 2.0 AUTH CODE)(For Git Lab.com only)   App Connect Enterprise as a Service
Provide credentials for App Connect to use (BASIC) Endpoint URL - (For GitLab self-managed only) App Connect Enterprise as a Service and App Connect in containers
Personal access token
Provide a username, password, and client credentials (OAUTH 2.0 PASSWORD) Endpoint URL - (For GitLab self-managed only) App Connect Enterprise as a Service and App Connect in containers
Username
Password
Client ID
Client secret
Endpoint URL
The URL of the Gitlab self-managed instance. For example, https://<hostName>:<port_number>.
  • Required: True
Personal access token
Specify the personal access token to authenticate with the GitLab API. For more information, see https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html.
  • Required: True
Username
The username to log in to your GitLab account
  • Required: True
Password
The password to log in to your GitLab account
  • Required: True
Client ID
Specify the application ID created in GitLab. For more information, see https://docs.gitlab.com/ee/integration/oauth_provider.html.
  • Required: True
Client secret
Specify the application secret created in GitLab. For more information, see https://docs.gitlab.com/ee/integration/oauth_provider.html.
  • Required: True

To connect to a GitLab endpoint from the App Connect Designer Applications and APIs page for the first time, expand GitLab, then click Connect. For more information, see Managing accounts.

General considerations

Before you use App Connect Designer with GitLab, take note of the following considerations:

  • (General consideration) You can see lists of the trigger events and actions that are available on the Applications and APIs page of the App Connect Designer.

    For some applications, the events and actions depend on the environment and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.

Events and actions

GitLab events

These events are for changes in this application that trigger a flow to start completing the actions in the flow.

Show more configurable events: Events that are shown by default are pre-configured by using optimized connectivity. More items are available after you configure events that can trigger a flow by polling this application for new or updated objects.

Note: In containers, only local accounts can be used for these events.

GitLab actions

Your flow completes these actions on this application.

Object Action Description
Members Add member Adds a member to a group or project
Edit member Updates a member of a group or project
Remove member Removes a member from a group or project
Retrieve members Retrieves all the members of a group or project
Merge request notes Create merge request note Creates a new note for a single merge request
Delete merge request note Deletes an existing note of a merge request
Retrieve merge request notes Retrieves a list of all the notes in a merge request
Update merge request note Updates the existing note of a merge request
Merge requests Accept merge request The merges changes submitted during a merge request
Create merge request Creates a merge request
Delete merge request Deletes a merge request
Retrieve merge requests Retrieves a list of merge requests
Update merge request Updates the properties of a merge request
Milestones Create milestone Creates a milestone
Delete milestone Deletes a milestone
Retrieve milestones Retrieves a list of milestones
Update milestone Updates the properties of a milestone
Namespaces Retrieve namespaces Retrieves a list of namespaces
Pipelines Cancel a pipeline’s jobs Cancels a pipeline’s jobs
Create pipeline Creates a pipeline
Delete pipeline Deletes a pipeline
Retrieve pipelines Retrieves a list of pipelines
Retry jobs in a pipeline Retries jobs in a pipeline
Projects Create project Creates a new project in GitLab
Delete project Deletes a project that includes all associated resources such as issues, and merge requests
Retrieve projects Retrieves a list of all visible projects across GitLab for the authenticated user
Share project with group Shares the project with a group
Update project Updates an existing project
Releases Create release Creates a release
Delete release Deletes a release
Retrieve releases Retrieves a list of releases
Update release Updates the properties of a release
Tags Create tag Creates a tag
Delete tag Deletes a tag
Retrieve tags Retrieves a list of tags
Users Retrieve users Retrieves a list of users

Examples

Dashboard tile for a template that uses GitLab

Use templates to quickly create flows for GitLab

Learn how to use App Connect templates to quickly create flows that complete actions on GitLab. For example, open Discover, and then search for GitLab.

Dashboard tile for a template that uses GitLab