mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-29 00:54:49 +00:00
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:
@@ -210,6 +210,7 @@ Drone currently has these `deploy` and `publish` plugins implemented (more to co
|
|||||||
- [nodejitsu](#docs)
|
- [nodejitsu](#docs)
|
||||||
- [ssh](#docs)
|
- [ssh](#docs)
|
||||||
- [tsuru](#docs)
|
- [tsuru](#docs)
|
||||||
|
- [bash](#docs)
|
||||||
|
|
||||||
**publish**
|
**publish**
|
||||||
- [Amazon s3](#docs)
|
- [Amazon s3](#docs)
|
||||||
|
13
pkg/plugin/deploy/bash.go
Normal file
13
pkg/plugin/deploy/bash.go
Normal 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)
|
||||||
|
}
|
@@ -19,6 +19,7 @@ type Deploy struct {
|
|||||||
Openshift *Openshift `yaml:"openshift,omitempty"`
|
Openshift *Openshift `yaml:"openshift,omitempty"`
|
||||||
SSH *SSH `yaml:"ssh,omitempty"`
|
SSH *SSH `yaml:"ssh,omitempty"`
|
||||||
Tsuru *Tsuru `yaml:"tsuru,omitempty"`
|
Tsuru *Tsuru `yaml:"tsuru,omitempty"`
|
||||||
|
Bash *Bash `yaml:"bash,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Deploy) Write(f *buildfile.Buildfile) {
|
func (d *Deploy) Write(f *buildfile.Buildfile) {
|
||||||
@@ -55,4 +56,7 @@ func (d *Deploy) Write(f *buildfile.Buildfile) {
|
|||||||
if d.Tsuru != nil {
|
if d.Tsuru != nil {
|
||||||
d.Tsuru.Write(f)
|
d.Tsuru.Write(f)
|
||||||
}
|
}
|
||||||
|
if d.Bash != nil {
|
||||||
|
d.Bash.Write(f)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user