2014-02-07 13:10:01 +03:00
|
|
|
package publish
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/drone/drone/pkg/build/buildfile"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Publish stores the configuration details
|
|
|
|
// for publishing build artifacts when
|
|
|
|
// a Build has succeeded
|
|
|
|
type Publish struct {
|
2014-03-30 01:18:25 +03:00
|
|
|
S3 *S3 `yaml:"s3,omitempty"`
|
2014-03-26 16:07:16 +03:00
|
|
|
Swift *Swift `yaml:"swift,omitempty"`
|
2014-03-30 01:18:25 +03:00
|
|
|
PyPI *PyPI `yaml:"pypi,omitempty"`
|
2014-02-07 13:10:01 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Publish) Write(f *buildfile.Buildfile) {
|
|
|
|
if p.S3 != nil {
|
|
|
|
p.S3.Write(f)
|
|
|
|
}
|
2014-03-26 16:07:16 +03:00
|
|
|
if p.Swift != nil {
|
|
|
|
p.Swift.Write(f)
|
|
|
|
}
|
2014-03-28 08:43:58 +03:00
|
|
|
if p.PyPI != nil {
|
|
|
|
p.PyPI.Write(f)
|
|
|
|
}
|
2014-02-07 13:10:01 +03:00
|
|
|
}
|