2014-02-07 10:10:01 +00:00
|
|
|
package deploy
|
|
|
|
|
|
|
|
import (
|
2014-06-04 21:25:38 +00:00
|
|
|
"github.com/drone/drone/shared/build/buildfile"
|
2014-02-07 10:10:01 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Deploy stores the configuration details
|
|
|
|
// for deploying build artifacts when
|
|
|
|
// a Build has succeeded
|
|
|
|
type Deploy struct {
|
|
|
|
AppFog *AppFog `yaml:"appfog,omitempty"`
|
|
|
|
CloudControl *CloudControl `yaml:"cloudcontrol,omitempty"`
|
|
|
|
CloudFoundry *CloudFoundry `yaml:"cloudfoundry,omitempty"`
|
|
|
|
EngineYard *EngineYard `yaml:"engineyard,omitempty"`
|
2014-02-11 19:28:50 +00:00
|
|
|
Git *Git `yaml:"git,omitempty"`
|
2014-02-07 10:10:01 +00:00
|
|
|
Heroku *Heroku `yaml:"heroku,omitempty"`
|
2014-02-23 17:08:44 +00:00
|
|
|
Modulus *Modulus `yaml:"modulus,omitempty"`
|
2014-02-07 10:10:01 +00:00
|
|
|
Nodejitsu *Nodejitsu `yaml:"nodejitsu,omitempty"`
|
|
|
|
Openshift *Openshift `yaml:"openshift,omitempty"`
|
2014-02-23 13:19:00 +00:00
|
|
|
SSH *SSH `yaml:"ssh,omitempty"`
|
2014-03-23 02:22:01 +00:00
|
|
|
Tsuru *Tsuru `yaml:"tsuru,omitempty"`
|
2014-03-19 20:36:14 +00:00
|
|
|
Bash *Bash `yaml:"bash,omitempty"`
|
2014-02-07 10:10:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (d *Deploy) Write(f *buildfile.Buildfile) {
|
|
|
|
if d.AppFog != nil {
|
|
|
|
d.AppFog.Write(f)
|
|
|
|
}
|
|
|
|
if d.CloudControl != nil {
|
|
|
|
d.CloudControl.Write(f)
|
|
|
|
}
|
|
|
|
if d.CloudFoundry != nil {
|
|
|
|
d.CloudFoundry.Write(f)
|
|
|
|
}
|
|
|
|
if d.EngineYard != nil {
|
|
|
|
d.EngineYard.Write(f)
|
|
|
|
}
|
2014-02-11 19:28:50 +00:00
|
|
|
if d.Git != nil {
|
|
|
|
d.Git.Write(f)
|
|
|
|
}
|
2014-02-07 10:10:01 +00:00
|
|
|
if d.Heroku != nil {
|
|
|
|
d.Heroku.Write(f)
|
|
|
|
}
|
2014-02-23 17:08:44 +00:00
|
|
|
if d.Modulus != nil {
|
|
|
|
d.Modulus.Write(f)
|
|
|
|
}
|
2014-02-07 10:10:01 +00:00
|
|
|
if d.Nodejitsu != nil {
|
|
|
|
d.Nodejitsu.Write(f)
|
|
|
|
}
|
|
|
|
if d.Openshift != nil {
|
|
|
|
d.Openshift.Write(f)
|
|
|
|
}
|
2014-02-23 13:19:00 +00:00
|
|
|
if d.SSH != nil {
|
|
|
|
d.SSH.Write(f)
|
|
|
|
}
|
2014-03-23 02:22:01 +00:00
|
|
|
if d.Tsuru != nil {
|
|
|
|
d.Tsuru.Write(f)
|
|
|
|
}
|
2014-03-19 20:36:14 +00:00
|
|
|
if d.Bash != nil {
|
|
|
|
d.Bash.Write(f)
|
|
|
|
}
|
2014-02-07 10:10:01 +00:00
|
|
|
}
|