mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +00:00
updated docs
This commit is contained in:
parent
90f73be6fb
commit
be8f31f0fd
9 changed files with 80 additions and 55 deletions
|
@ -5,8 +5,6 @@
|
|||
* [Docker](docker.md)
|
||||
* [GitHub](github.md)
|
||||
* [GitLab](gitlab.md)
|
||||
* [Bitbucket](bitbucket.md)
|
||||
* [Database](#)
|
||||
* [SQLite](sqlite.md)
|
||||
* [Postgres](postgres.md)
|
||||
* [MySQL](mysql.md)
|
||||
|
|
|
@ -1,25 +1,40 @@
|
|||
# GitHub
|
||||
|
||||
Drone comes with built-in support for GitHub and GitHub Enterprise. To enable and configure GitHub, you should set the following environment variables:
|
||||
Drone comes with built-in support for GitHub and GitHub Enterprise. To enable GitHub you should configure the GitHub driver using the following environment variables:
|
||||
|
||||
```bash
|
||||
REMOTE_DRIVER="github"
|
||||
|
||||
GITHUB_CLIENT="c0aaff74c060ff4a950d"
|
||||
GITHUB_SECRET="1ac1eae5ff1b490892f5"
|
||||
REMOTE_CONFIG="https://github.com?client_id=${client_id}&client_secret=${client_secret}"
|
||||
```
|
||||
|
||||
## GitHub settings
|
||||
## GitHub configuration
|
||||
|
||||
This section lists all environment variables used to configure GitHub.
|
||||
The following is the standard URI connection scheme:
|
||||
|
||||
* `GITHUB_HOST` server address to connect to. The default value is `https://github.com` if not specified.
|
||||
* `GITHUB_CLIENT` oauth client id for registered application
|
||||
* `GITHUB_SECRET` oauth client secret for registered application
|
||||
* `GITHUB_OPEN=false` allows users to self-register. Defaults to false for security reasons.
|
||||
* `GITHUB_ORGS=drone,docker` restricts access to these GitHub organizations. **Optional**
|
||||
* `GITHUB_PRIVATE_MODE=false` indicates GitHub Enterprise is running in private mode
|
||||
```
|
||||
scheme://host[:port][?options]
|
||||
```
|
||||
|
||||
## GitHub Enterprise
|
||||
The components of this string are:
|
||||
|
||||
If you are configuring Drone with GitHub Enterprise edition, you must specify the `GITHUB_HOST` in the configuration string. Note that you may also need to set `GITHUB_PRIVATE_MODE=true` when running GitHub Entperirse in private mode.
|
||||
* `scheme` server protocol `http` or `https`.
|
||||
* `host` server address to connect to. The default value is github.com if not specified.
|
||||
* `:port` optional. The default value is :80 if not specified.
|
||||
* `?options` connection specific options.
|
||||
|
||||
## GitHub 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_id` oauth client id for registered application
|
||||
* `client_secret` oauth client secret for registered application
|
||||
* `open=false` allows users to self-register. Defaults to false for security reasons.
|
||||
* `orgs=drone,docker` restricts access to these GitHub organizations. **Optional**
|
||||
* `private_mode=false` indicates GitHub Enterprise is running in private mode
|
||||
* `skip_verify=false` skip ca verification if self-signed certificate. Defaults to false.
|
||||
|
||||
## GitHub registration
|
||||
|
||||
You must register your application with GitHub in order to generate a Client and Secret. Navigate to your account settings and choose Applications from the menu, and click Register new application.
|
||||
|
||||
Please use `/authorize` as the Authorization callback URL path.
|
||||
|
|
|
@ -1,27 +1,39 @@
|
|||
> **NOTE** GitLab integration has not yet been merged into 0.4, but is planned in the near future
|
||||
# Gitlab
|
||||
|
||||
# GitLab
|
||||
Drone comes with built-in support for GitLab version 7.7 and higher. To enable Gitlab you should configure the Gitlab driver using the following environment variables:
|
||||
|
||||
Drone comes with built-in support for GitLab 7.7 and higher. To enable and configure GitLab, you should set the following environment variables:
|
||||
|
||||
```
|
||||
```bash
|
||||
REMOTE_DRIVER="gitlab"
|
||||
|
||||
GITLAB_HOST="https://gitlab.hooli.com"
|
||||
GITLAB_CLIENT="c0aaff74c060ff4a950d"
|
||||
GITLAB_SECRET="1ac1eae5ff1b490892f5"
|
||||
GITLAB_OPEN="true"
|
||||
GITLAB_ORGS="drone,drone-plugins"
|
||||
GITLAB_SKIP_VERIFY="false"
|
||||
REMOTE_CONFIG="https://gitlab.hooli.com?client_id=${client_id}&client_secret=${client_secret}"
|
||||
```
|
||||
|
||||
## GitLab settings
|
||||
## Gitlab configuration
|
||||
|
||||
This section lists all environment variables used to configure GitLab.
|
||||
The following is the standard URI connection scheme:
|
||||
|
||||
* `GITLAB_HOST` server address to connect to.
|
||||
* `GITLAB_CLIENT` oauth client id for registered application
|
||||
* `GITLAB_SECRET` oauth client secret for registered application
|
||||
* `GITLAB_OPEN=false` allows users to self-register. Defaults to false for security reasons.
|
||||
* `GITLAB_ORGS=drone,docker` restricts access to these GitLab organizations. **Optional**
|
||||
* `GITLAB_SKIP_VERIFY=false` skip certificate chain and host name. Defaults to false for security reasons.
|
||||
```
|
||||
scheme://host[:port][?options]
|
||||
```
|
||||
|
||||
The components of this string are:
|
||||
|
||||
* `scheme` server protocol `http` or `https`.
|
||||
* `host` server address to connect to. The default value is github.com if not specified.
|
||||
* `:port` optional. The default value is :80 if not specified.
|
||||
* `?options` connection specific options.
|
||||
|
||||
## GitLab 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_id` oauth client id for registered application
|
||||
* `client_secret` oauth client secret for registered application
|
||||
* `open=false` allows users to self-register. Defaults to false for security reasons.
|
||||
* `orgs=drone,docker` restricts access to these GitLab organizations. **Optional**
|
||||
* `skip_verify=false` skip ca verification if self-signed certificate. Defaults to false for security reasons.
|
||||
|
||||
## Gitlab 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 `/authorize` as the Authorization callback URL path.
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
Drone comes with support for MySQL as an alternate database engine. To enable Postgres, you should specify the following environment variables:
|
||||
|
||||
```
|
||||
```bash
|
||||
DATABASE_DRIVER="mysql"
|
||||
DATABASE_DATASOURCE="root:pa55word@tcp(localhost:3306)/drone"
|
||||
DATABASE_CONFIG="root:pa55word@tcp(localhost:3306)/drone"
|
||||
```
|
||||
|
||||
## MySQL connection
|
||||
## MySQL configuration
|
||||
|
||||
The following is the standard URI connection scheme:
|
||||
|
||||
|
@ -29,7 +29,7 @@ The components of this string are:
|
|||
This is an example connection string:
|
||||
|
||||
```
|
||||
root:pa55word@tcp(localhost:3306)/drone?autocommit=false
|
||||
root:pa55word@tcp(localhost:3306)/drone
|
||||
```
|
||||
|
||||
## MySQL options
|
||||
|
|
|
@ -5,10 +5,10 @@ Drone comes with support for Postgres as an alternate database engine. To enable
|
|||
|
||||
```
|
||||
DATABASE_DRIVER="postgres"
|
||||
DATABASE_DATASOURCE="postgres://root:pa55word@127.0.0.1:5432/postgres"
|
||||
DATABASE_CONFIG="postgres://root:pa55word@127.0.0.1:5432/postgres"
|
||||
```
|
||||
|
||||
## Postgres connection
|
||||
## Postgres configuration
|
||||
|
||||
The following is the standard URI connection scheme:
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ This section lists all environment variables used to configure the server.
|
|||
|
||||
This example changes the default port to `:80`:
|
||||
|
||||
```
|
||||
```bash
|
||||
SERVER_ADDR=":80"
|
||||
```
|
||||
|
||||
|
@ -22,7 +22,7 @@ Drone uses the `ListAndServerTLS` function in the Go standard library to accept
|
|||
|
||||
This example accepts `HTTPS` connections:
|
||||
|
||||
```
|
||||
```bash
|
||||
SERVER_ADDR=":443"
|
||||
SERVER_KEY="/path/to/key.pem"
|
||||
SERVER_CERT="/path/to/cert.pem"
|
||||
|
@ -30,9 +30,9 @@ SERVER_CERT="/path/to/cert.pem"
|
|||
|
||||
> **NOTE** if the certificate is signed by a certificate authority, the cert should be the concatenation of the server's certificate followed by the CA's certificate.
|
||||
|
||||
When running Drone inside Docker, you'll need to mount the volume containing the certificate:
|
||||
When running Drone inside Docker, you'll need to mount a volume containing the certificate:
|
||||
|
||||
```
|
||||
```bash
|
||||
docker run
|
||||
--volume /path/to/cert.pem:/path/to/cert.pem \
|
||||
--volume /path/to/key.pem:/path/to/key.pem \
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
Drone uses SQLite as the default database with zero configuration required. In order to customize the SQLite database configuration you should specify the following environment variables:
|
||||
|
||||
```
|
||||
```bash
|
||||
DATABASE_DRIVER="sqlite3"
|
||||
DATABASE_DATASOURCE="/var/lib/drone/drone.sqlite"
|
||||
DATABASE_CONFIG="/var/lib/drone/drone.sqlite"
|
||||
```
|
||||
|
||||
## Sqlite3 connection
|
||||
## Sqlite3 configuration
|
||||
|
||||
The components of the datasource connection string are:
|
||||
|
||||
|
@ -15,6 +15,6 @@ The components of the datasource connection string are:
|
|||
|
||||
This is an example connection string:
|
||||
|
||||
```
|
||||
/var/lib/drone/drone.sqlite
|
||||
```bash
|
||||
DATABASE_CONFIG="/var/lib/drone/drone.sqlite"
|
||||
```
|
||||
|
|
|
@ -53,8 +53,8 @@ func NewDriver(config string) (remote.Remote, error) {
|
|||
|
||||
github := GitHub{}
|
||||
github.URL = url_.String()
|
||||
github.Client = params.Get("client")
|
||||
github.Secret = params.Get("secret")
|
||||
github.Client = params.Get("client_id")
|
||||
github.Secret = params.Get("client_secret")
|
||||
github.AllowedOrgs = params["orgs"]
|
||||
github.PrivateMode, _ = strconv.ParseBool(params.Get("private_mode"))
|
||||
github.SkipVerify, _ = strconv.ParseBool(params.Get("skip_verify"))
|
||||
|
|
|
@ -49,8 +49,8 @@ func NewDriver(config string) (remote.Remote, error) {
|
|||
|
||||
gitlab := Gitlab{}
|
||||
gitlab.URL = url_.String()
|
||||
gitlab.Client = params.Get("client")
|
||||
gitlab.Secret = params.Get("secret")
|
||||
gitlab.Client = params.Get("client_id")
|
||||
gitlab.Secret = params.Get("client_secret")
|
||||
gitlab.AllowedOrgs = params["orgs"]
|
||||
gitlab.SkipVerify, _ = strconv.ParseBool(params.Get("skip_verify"))
|
||||
gitlab.Open, _ = strconv.ParseBool(params.Get("open"))
|
||||
|
|
Loading…
Reference in a new issue