Fixing merge conficts

This commit is contained in:
Don Olmstead 2015-08-04 11:34:14 -07:00 committed by Olmstead
commit 72e9028ee9
6 changed files with 23 additions and 9 deletions

View file

@ -15,6 +15,6 @@ Drone documentation is organized into several categories:
* [Plugin Guide](http://readme.drone.io/docs/plugin/)
* [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.

View file

@ -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:
```
DATASTORE_DRIVER="mysql"
DATASTORE_CONFIG="root:pa55word@tcp(localhost:3306)/drone"
DATABASE_DRIVER="mysql"
DATABASE_DATASOURCE="root:pa55word@tcp(localhost:3306)/drone"
```
## MySQL connection

View file

@ -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:
```
DATASTORE_DRIVER="postgres"
DATASTORE_CONFIG="postgres://root:pa55word@127.0.0.1:5432/postgres"
DATABASE_DRIVER="postgres"
DATABASE_DATASOURCE="postgres://root:pa55word@127.0.0.1:5432/postgres"
```
## Postgres connection

View file

@ -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:
```
DATASTORE_DRIVER="sqlite3"
DATASTORE_CONFIG="/var/lib/drone/drone.sqlite"
DATABASE_DRIVER="sqlite3"
DATABASE_DATASOURCE="/var/lib/drone/drone.sqlite"
```
## 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`.

View file

@ -47,6 +47,7 @@ type Step struct {
Entrypoint []string
Command []string
Volumes []string
Cache []string
WorkingDir string `yaml:"working_dir"`
NetworkMode string `yaml:"net"`

View file

@ -37,3 +37,16 @@ func MarshalPrivateKey(privkey *rsa.PrivateKey) []byte {
privateKeyPEM := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Headers: nil, Bytes: privateKeyMarshaled})
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
}