The GitLab Integration is used to connect JFrog Pipelines to your instance of GitLab so that you can run builds for your repositories hosted there.
Note
Pipelines does not support GitLab subgroups.
Creating a GitLab Integration
You can add this integration by following steps on the Managing Pipelines Integrations page.
Here is the information you need to create this integration:
Name -- choose a friendly name for the integration
URL -- location of your GitLab API. The URL should be in the format
https://(GitLab URL)/api/(api version)
. For example, if you're using gitlab.com, this will behttps://gitlab.com/api/v4
. Please note that if you're using Gitlab version 9.0 or later, you should usev4
for api version. If you're using Gitlab version 8.17 or earlier, you should usev3
for api version. API v3 is unsupported from Gitlab 9.5 according to this Gitlab noticeToken -- GitLab private token with the right levels of permission
Note
Token Permissions
To use this integration as a pipeline source, your token must be granted these scopes at minimum:
api
write_repository
Additionally, if your organization uses SAML single sign-on, and you want your tokens to work with the SAML, you will have to configure it.
Usage
The GitLab integration can be used in the GitRepo resource.
The GitLab integration can also be added directly to a step in the integrations
section.
Default Environment Variables
When you create a resource with this integration, and create a step that uses it, a set of environment variables is automatically made available.
Environment variable | Description |
---|---|
| GitLab API location |
| The token used to connect to GitLab |
When you add this integration directly to a step, a set of environment variables is automatically made available.
Environment variable | Description |
---|---|
| GitLab API location |
| The Token used to connect to GitLab |