add cache to yaml
This commit is contained in:
parent
001e6c9f5f
commit
c8405bfd2b
3 changed files with 16 additions and 2 deletions
|
@ -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.
|
||||||
|
|
|
@ -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 a new issue