Deployment with Bash command

Using this piece of YAML:
```
deploy:
	bash:
		command: 'bundle exec cap production deploy'
```

Will run Capistrano and deploy your app to production.
You can use any other deployment tool instead of Capistrano.
This commit is contained in:
Kir Shatrov 2014-03-20 00:36:14 +04:00
parent cb0986a57b
commit 9bd7706ca3
3 changed files with 18 additions and 0 deletions

View file

@ -210,6 +210,7 @@ Drone currently has these `deploy` and `publish` plugins implemented (more to co
- [nodejitsu](#docs)
- [ssh](#docs)
- [tsuru](#docs)
- [bash](#docs)
**publish**
- [Amazon s3](#docs)

13
pkg/plugin/deploy/bash.go Normal file
View file

@ -0,0 +1,13 @@
package deploy
import (
"github.com/drone/drone/pkg/build/buildfile"
)
type Bash struct {
Command string `yaml:"command,omitempty"`
}
func (g *Bash) Write(f *buildfile.Buildfile) {
f.WriteCmd(g.Command)
}

View file

@ -19,6 +19,7 @@ type Deploy struct {
Openshift *Openshift `yaml:"openshift,omitempty"`
SSH *SSH `yaml:"ssh,omitempty"`
Tsuru *Tsuru `yaml:"tsuru,omitempty"`
Bash *Bash `yaml:"bash,omitempty"`
}
func (d *Deploy) Write(f *buildfile.Buildfile) {
@ -55,4 +56,7 @@ func (d *Deploy) Write(f *buildfile.Buildfile) {
if d.Tsuru != nil {
d.Tsuru.Write(f)
}
if d.Bash != nil {
d.Bash.Write(f)
}
}