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.

Availability:
  • App Connect Enterprise as a Service connector
  • A local connector in a Designer instance of IBM App Connect in containers (Continuous Delivery release)Local connector in containers (Continuous Delivery release) 11.0.0.11-r2 or later
  • A local connector in a Designer instance of IBM App Connect in containers (Long Term Support)Local connector in containers (Long Term Support release)
  • A local connector in a Designer instance of IBM App Connect in containers (Support Cycle 2)Local connector in containers (Long Term Support Cycle-2 release)

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.

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

Click Show configurable events..., then select from the following events:

Commits
New commit
Epics
New epic
Updated epic
New or updated epic
Issues
New issue
Updated issue
New or updated issue
Merge requests
New merge request
Updated merge request
New or updated merge request
Pipelines
Updated pipeline

GitLab actions

Your flow completes these actions on this application.

Branches
Create branch
Retrieve branches
Delete branch
Commits
Retrieve commits
Revert a commit
Epic notes
Create epic note
Retrieve epic notes
Update epic note
Delete epic note
Epics
Create epic
Retrieve epics
Update epic
Delete epic
Groups
Create group
Retrieve groups
Update group
Delete group
Issue notes
Create issue note
Retrieve issue notes
Update issue note
Delete issue note
Issues
Create issue
Retrieve issues
Update issue
Delete issue
Move issue
Jobs
Retrieve jobs
Retry job
Cancel job
Erase job
Download job artifacts
Labels
Create label
Retrieve labels
Update label
Delete label
Members
Retrieve members
Add member
Edit member
Remove member
Merge request notes
Create merge request note
Retrieve merge request notes
Update merge request note
Delete merge request note
Merge requests
Create merge request
Retrieve merge requests
Update merge request
Delete merge request
Accept merge request
Milestones
Create milestone
Retrieve milestones
Update milestone
Delete milestone
Namespaces
Retrieve namespaces
Pipelines
Create pipeline
Retrieve pipelines
Delete pipeline
Retry jobs in a pipeline
Cancel a pipeline’s jobs
Projects
Create project
Retrieve projects
Update project
Delete project
Share project with group
Releases
Create release
Retrieve releases
Update release
Delete release
Tags
Create tag
Retrieve tags
Delete tag
Users
Retrieve 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 the Templates gallery, and then search for GitLab.

Dashboard tile for a template that uses GitLab