drone

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() transform.Transformer

func TriggerToGlobalWhen added in v0.2.0

func TriggerToGlobalWhen(trigger *Trigger) (*transform.When, error)

Types

type Clone added in v0.1.0

type Clone struct {
	Disable bool `yaml:"disable"`
	Depth   *int `yaml:"depth"`
}

type Conditions added in v0.1.0

type Conditions struct {
	Conditions core.Strings `yaml:"-"`
	Include    core.Strings `yaml:"include,omitempty"`
	Exclude    core.Strings `yaml:"exclude,omitempty"`
}

func (*Conditions) IsEmpty added in v0.1.0

func (c *Conditions) IsEmpty() bool

func (*Conditions) Transform added in v0.2.0

func (c *Conditions) Transform() *transform.Conditions

func (*Conditions) UnmarshalYAML added in v0.1.0

func (c *Conditions) UnmarshalYAML(unmarshal func(interface{}) error) error

type DronePipeline

type DronePipeline struct{}

func (DronePipeline) Convert

func (d DronePipeline) Convert(pipeline *Pipeline) (*transform.Pipeline, error)

func (DronePipeline) ConvertConditions added in v0.1.0

func (d DronePipeline) ConvertConditions(when *When) (*transform.When, error)

func (DronePipeline) ConvertEvents added in v0.1.0

func (d DronePipeline) ConvertEvents(events core.Strings) (*transform.Conditions, error)

func (DronePipeline) ConvertImage

func (d DronePipeline) ConvertImage(image string) string

func (DronePipeline) ConvertVolumes added in v0.1.0

func (d DronePipeline) ConvertVolumes(volumes []*Volume, refs []VolumeRef) ([]string, error)

func (DronePipeline) PostProcess added in v0.1.1

func (d DronePipeline) PostProcess(yaml []byte) ([]byte, error)

func (DronePipeline) Transform

func (d DronePipeline) Transform(sources []*transform.Source) ([]*transform.Pipeline, error)

type Pipeline

type Pipeline struct {
	Kind      string            `yaml:"kind"`
	Type      string            `yaml:"type"`
	Name      string            `yaml:"name"`
	Platform  *Platform         `yaml:"platform"`
	Workspace *Workspace        `yaml:"workspace"`
	Node      map[string]string `yaml:"node"`
	Clone     *Clone            `yaml:"clone"`
	Services  []*Service        `yaml:"services"`
	Steps     []*Step           `yaml:"steps"`
	Trigger   *Trigger          `yaml:"trigger"`
	DependsOn []string          `yaml:"depends_on"`
	Volumes   []*Volume         `yaml:"volumes"`
}

type Platform added in v0.1.0

type Platform struct {
	OS      string `yaml:"os"`
	Arch    string `yaml:"arch"`
	Version string `yaml:"version"`
}

type Service added in v0.1.0

type Service struct {
	Name        string             `yaml:"name"`
	Image       string             `yaml:"image"`
	Pull        string             `yaml:"pull"`
	Environment core.MapOrEnvArray `yaml:"environment"`
	Commands    []string           `yaml:"commands"`
	Entrypoint  []string           `yaml:"entrypoint"`
	Privileged  bool               `yaml:"privileged"`
	Volumes     []VolumeRef        `yaml:"volumes"`
	WorkingDir  string             `yaml:"working_dir"`
}

type Step

type Step struct {
	Name        string             `yaml:"name"`
	Image       string             `yaml:"image"`
	Pull        string             `yaml:"pull"`
	Environment core.MapOrEnvArray `yaml:"environment"`
	Settings    transform.Settings `yaml:"settings"`
	Commands    []string           `yaml:"commands"`
	DependsOn   []string           `yaml:"depends_on"`
	Detach      bool               `yaml:"detach"`
	Privileged  bool               `yaml:"privileged"`
	Failure     string             `yaml:"failure"`
	Volumes     []VolumeRef        `yaml:"volumes"`
	When        *When              `yaml:"when"`
}

type Trigger added in v0.1.0

type Trigger struct {
	Branch       *Conditions  `yaml:"branch"`
	Event        core.Strings `yaml:"event"`
	Refs         *Conditions  `yaml:"refs"`
	Repositories *Conditions  `yaml:"repo"`
	Status       core.Strings `yaml:"status"`
	Target       *Conditions  `yaml:"target"`
	Cron         *Conditions  `yaml:"cron"`
	Action       *Conditions  `yaml:"action"`
}

type UnsupportedEventError added in v0.1.0

type UnsupportedEventError struct {
	Event string
}

func (UnsupportedEventError) Error added in v0.1.0

func (e UnsupportedEventError) Error() string

type Volume added in v0.1.0

type Volume struct {
	Name string      `yaml:"name"`
	Host *VolumeHost `yaml:"host"`
	Temp *VolumeTemp `yaml:"temp"`
}

type VolumeHost added in v0.1.0

type VolumeHost struct {
	Path string `yaml:"path"`
}

type VolumeRef added in v0.1.0

type VolumeRef struct {
	Name string `yaml:"name"`
	Path string `yaml:"path"`
}

type VolumeTemp added in v0.1.0

type VolumeTemp struct {
	Medium string `yaml:"medium"`
}

type When added in v0.1.0

type When struct {
	Branch       *Conditions  `yaml:"branch"`
	Event        core.Strings `yaml:"event"`
	Refs         *Conditions  `yaml:"refs"`
	Repositories *Conditions  `yaml:"repo"`
	Instance     *Conditions  `yaml:"instance"`
	Status       core.Strings `yaml:"status"`
	Target       *Conditions  `yaml:"target"`
	Cron         *Conditions  `yaml:"cron"`
}

type Workspace added in v0.1.0

type Workspace struct {
	Path string `yaml:"path"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL