woodpecker/docs/docs/30-administration/11-forges/40-gitlab.md

65 lines
2 KiB
Markdown
Raw Normal View History

# GitLab
2019-11-13 18:50:54 +00:00
Woodpecker comes with built-in support for the GitLab version 8.2 and higher. To enable GitLab you should configure the Woodpecker container using the following environment variables:
2019-07-05 13:30:25 +00:00
```ini
WOODPECKER_GITLAB=true
WOODPECKER_GITLAB_URL=http://gitlab.mycompany.com
WOODPECKER_GITLAB_CLIENT=95c0282573633eb25e82
WOODPECKER_GITLAB_SECRET=30f5064039e6b359e075
2019-07-05 13:30:25 +00:00
```
## Registration
2019-07-05 13:30:25 +00:00
You must register your application with GitLab in order to generate a Client and Secret. Navigate to your account settings and choose Applications from the menu, and click New Application.
2019-07-05 13:30:25 +00:00
Please use `http://woodpecker.mycompany.com/authorize` as the Authorization callback URL. Grant `api` scope to the application.
2019-07-05 13:30:25 +00:00
2023-09-07 13:40:13 +00:00
If you run the Woodpecker CI server on a private IP (RFC1918) or use a non standard TLD (e.g. `.local`, `.intern`) with your GitLab instance, you might also need to allow local connections in GitLab, otherwise API requests will fail. In GitLab, navigate to the Admin dashboard, then go to `Settings > Network > Outbound requests` and enable `Allow requests to the local network from web hooks and services`.
## Configuration
2019-07-05 13:30:25 +00:00
This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations.
2019-07-05 13:30:25 +00:00
### `WOODPECKER_GITLAB`
2023-10-24 12:42:05 +00:00
> Default: `false`
2019-07-05 13:30:25 +00:00
Enables the GitLab driver.
2019-07-05 13:30:25 +00:00
### `WOODPECKER_GITLAB_URL`
2023-10-24 12:42:05 +00:00
> Default: `https://gitlab.com`
2019-07-05 13:30:25 +00:00
Configures the GitLab server address.
2019-07-05 13:30:25 +00:00
### `WOODPECKER_GITLAB_CLIENT`
2023-10-24 12:42:05 +00:00
> Default: empty
Configures the GitLab OAuth client id. This is used to authorize access.
### `WOODPECKER_GITLAB_CLIENT_FILE`
2023-10-24 12:42:05 +00:00
> Default: empty
Read the value for `WOODPECKER_GITLAB_CLIENT` from the specified filepath
### `WOODPECKER_GITLAB_SECRET`
2023-10-24 12:42:05 +00:00
> Default: empty
Configures the GitLab OAuth client secret. This is used to authorize access.
### `WOODPECKER_GITLAB_SECRET_FILE`
2023-10-24 12:42:05 +00:00
> Default: empty
Read the value for `WOODPECKER_GITLAB_SECRET` from the specified filepath
### `WOODPECKER_GITLAB_SKIP_VERIFY`
2023-10-24 12:42:05 +00:00
> Default: `false`
Configure if SSL verification should be skipped.