mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 08:06:52 +02:00
Fixing merge conficts
This commit is contained in:
commit
72e9028ee9
@ -15,6 +15,6 @@ Drone documentation is organized into several categories:
|
|||||||
* [Plugin Guide](http://readme.drone.io/docs/plugin/)
|
* [Plugin Guide](http://readme.drone.io/docs/plugin/)
|
||||||
* [API Reference](http://readme.drone.io/docs/api/)
|
* [API Reference](http://readme.drone.io/docs/api/)
|
||||||
|
|
||||||
### Community
|
### Community, Help
|
||||||
|
|
||||||
Contributions, questions, and comments are welcomed and encouraged. Drone developers hang out in the [drone/drone](https://gitter.im/drone/drone) room on [gitter](https://gitter.im/drone/drone).
|
Contributions, questions, and comments are welcomed and encouraged. Drone developers hang out in the [drone/drone](https://gitter.im/drone/drone) room on gitter. We ask that you please post your questions to [gitter](https://gitter.im/drone/drone) before creating an issue.
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
Drone comes with support for MySQL as an alternate database engine. To enable Postgres, you should specify the following environment variables:
|
Drone comes with support for MySQL as an alternate database engine. To enable Postgres, you should specify the following environment variables:
|
||||||
|
|
||||||
```
|
```
|
||||||
DATASTORE_DRIVER="mysql"
|
DATABASE_DRIVER="mysql"
|
||||||
DATASTORE_CONFIG="root:pa55word@tcp(localhost:3306)/drone"
|
DATABASE_DATASOURCE="root:pa55word@tcp(localhost:3306)/drone"
|
||||||
```
|
```
|
||||||
|
|
||||||
## MySQL connection
|
## MySQL connection
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
Drone comes with support for Postgres as an alternate database engine. To enable Postgres, you should specify the following environment variables:
|
Drone comes with support for Postgres as an alternate database engine. To enable Postgres, you should specify the following environment variables:
|
||||||
|
|
||||||
```
|
```
|
||||||
DATASTORE_DRIVER="postgres"
|
DATABASE_DRIVER="postgres"
|
||||||
DATASTORE_CONFIG="postgres://root:pa55word@127.0.0.1:5432/postgres"
|
DATABASE_DATASOURCE="postgres://root:pa55word@127.0.0.1:5432/postgres"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Postgres connection
|
## Postgres connection
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
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:
|
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:
|
||||||
|
|
||||||
```
|
```
|
||||||
DATASTORE_DRIVER="sqlite3"
|
DATABASE_DRIVER="sqlite3"
|
||||||
DATASTORE_CONFIG="/var/lib/drone/drone.sqlite"
|
DATABASE_DATASOURCE="/var/lib/drone/drone.sqlite"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Sqlite3 connection
|
## Sqlite3 connection
|
||||||
|
|
||||||
The components of this connection string are:
|
The components of the datasource connection string are:
|
||||||
|
|
||||||
* `path` local path to sqlite database. The default value is `/var/lib/drone/drone.sqlite`.
|
* `path` local path to sqlite database. The default value is `/var/lib/drone/drone.sqlite`.
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ type Step struct {
|
|||||||
Entrypoint []string
|
Entrypoint []string
|
||||||
Command []string
|
Command []string
|
||||||
Volumes []string
|
Volumes []string
|
||||||
|
Cache []string
|
||||||
WorkingDir string `yaml:"working_dir"`
|
WorkingDir string `yaml:"working_dir"`
|
||||||
NetworkMode string `yaml:"net"`
|
NetworkMode string `yaml:"net"`
|
||||||
|
|
||||||
|
@ -37,3 +37,16 @@ func MarshalPrivateKey(privkey *rsa.PrivateKey) []byte {
|
|||||||
privateKeyPEM := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Headers: nil, Bytes: privateKeyMarshaled})
|
privateKeyPEM := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Headers: nil, Bytes: privateKeyMarshaled})
|
||||||
return privateKeyPEM
|
return privateKeyPEM
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// helper function to encrypt a plain-text string using
|
||||||
|
// an RSA public key.
|
||||||
|
func Encrypt(pubkey *rsa.PublicKey, msg string) ([]byte, error) {
|
||||||
|
return rsa.EncryptPKCS1v15(rand.Reader, pubkey, []byte(msg))
|
||||||
|
}
|
||||||
|
|
||||||
|
// helper function to encrypt a plain-text string using
|
||||||
|
// an RSA public key.
|
||||||
|
func Decrypt(privkey *rsa.PrivateKey, secret string) (string, error) {
|
||||||
|
msg, err := rsa.DecryptPKCS1v15(rand.Reader, privkey, []byte(secret))
|
||||||
|
return string(msg), err
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user