1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-18 08:26:45 +02:00
woodpecker/pkg/plugin/deploy/deployment.go

55 lines
1.3 KiB
Go
Raw Normal View History

2014-02-07 13:10:01 +03:00
package deploy
import (
"github.com/drone/drone/pkg/build/buildfile"
)
// 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"`
Git *Git `yaml:"git,omitempty"`
2014-02-07 13:10:01 +03:00
Heroku *Heroku `yaml:"heroku,omitempty"`
Modulus *Modulus `yaml:"modulus,omitempty"`
2014-02-07 13:10:01 +03:00
Nodejitsu *Nodejitsu `yaml:"nodejitsu,omitempty"`
Openshift *Openshift `yaml:"openshift,omitempty"`
2014-02-23 16:19:00 +03:00
SSH *SSH `yaml:"ssh,omitempty"`
2014-02-07 13:10:01 +03: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)
}
if d.Git != nil {
d.Git.Write(f)
}
2014-02-07 13:10:01 +03:00
if d.Heroku != nil {
d.Heroku.Write(f)
}
if d.Modulus != nil {
d.Modulus.Write(f)
}
2014-02-07 13:10:01 +03:00
if d.Nodejitsu != nil {
d.Nodejitsu.Write(f)
}
if d.Openshift != nil {
d.Openshift.Write(f)
}
2014-02-23 16:19:00 +03:00
if d.SSH != nil {
d.SSH.Write(f)
}
2014-02-07 13:10:01 +03:00
}