GitLab support is experimental and unstable due to high variation in GitLab configurations and versions. We highly recommend using Gogs as an alternative to GitLab.
Drone comes with built-in support for GitLab version 8.0 and higher. To enable Gitlab you should configure the Gitlab driver using the following environment variables:
The following is the standard URI connection scheme:
The components of this string are:
hostserver address to connect to. The default value is github.com if not specified.
:portoptional. The default value is :80 if not specified.
?optionsconnection specific options.
This section lists all connection options used in the connection string format. Connection options are pairs in the following form:
name=value. The value is always case sensitive. Separate options with the ampersand (i.e. &) character:
client_idoauth client id for registered application
client_secretoauth client secret for registered application
open=falseallows users to self-register. Defaults to false for security reasons.
orgs=drone&orgs=dockerrestricts access to these GitLab organizations. Optional
skip_verify=falseskip ca verification if self-signed certificate. Defaults to false for security reasons.
hide_archives=falsehide projects archived in GitLab from the listing.
clone_mode=tokena strategy for clone authorization, by default use repo token, but can be changed to
oauth( This is not secure, because your user token, with full access to your gitlab account will be written to .netrc, and it can be read by all who have access to project builds )
search=truea strategy for search project, by default
false, use if you have apache without
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.
http://drone.mycompany.com/authorize as the Authorization callback URL.
Remote Driver Feature Chart
Drone is relatively well-supported on GitLab, though compatibility is is sometimes broken due to changes in GitLab from version to version.
|Push tags events||yes|
|Restrict by organizations||yes|
Once you have configured your Remote Driver, it’s time to Select and Configure a Database.