mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 00:46:30 +00:00
1.9 KiB
1.9 KiB
Drone comes with built-in support for the GitLab version 8.2 and higher. To enable GitLab you should configure the Drone container using the following environment variables:
version: '2'
services:
drone-server:
image: drone/drone:{{% version %}}
ports:
- 80:8000
- 9000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
environment:
+ - DRONE_GITLAB=true
+ - DRONE_GITLAB_CLIENT=95c0282573633eb25e82
+ - DRONE_GITLAB_SECRET=30f5064039e6b359e075
+ - DRONE_GITLAB_URL=http://gitlab.mycompany.com
- DRONE_SECRET=${DRONE_SECRET}
drone-agent:
image: drone/agent:{{% version %}}
restart: always
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_SERVER=drone-server:9000
- DRONE_SECRET=${DRONE_SECRET}
Configuration
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.
- DRONE_GITLAB=true
- Set to true to enable the GitLab driver.
- DRONE_GITLAB_URL=
https://gitlab.com
- GitLab Server address.
- DRONE_GITLAB_CLIENT
- GitLab oauth2 client id.
- DRONE_GITLAB_SECRET
- GitLab oauth2 client secret.
- DRONE_GITLAB_GIT_USERNAME
- Optional. Use a single machine account username to clone all repositories.
- DRONE_GITLAB_GIT_PASSWORD
- Optional. Use a single machine account password to clone all repositories.
- DRONE_GITLAB_SKIP_VERIFY=false
- Set to true to disable SSL verification.
- DRONE_GITLAB_PRIVATE_MODE=false
- Set to true if GitLab is running in private mode.
Registration
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.
Please use http://drone.mycompany.com/authorize
as the Authorization callback URL. Grant api
scope to the application.