Documentation
¶
Index ¶
- func ConvertEventConditions(cond constraint.List, w *types.Workflow) ([]string, []error)
- func New() transform.Transformer
- func TriggerToGlobalWhen(trigger *Trigger) (constraint.When, []error)
- type Clone
- type Conditions
- type DronePipeline
- func (d DronePipeline) Convert(pipeline *Pipeline) (*types.Workflow, []error)
- func (d DronePipeline) ConvertConditions(when *When, w *types.Workflow) (constraint.When, []error)
- func (d DronePipeline) ConvertImage(image string) string
- func (d DronePipeline) ConvertVolumes(volumes []*Volume, refs []VolumeRef) ([]*types.Volume, []error)
- func (d DronePipeline) PostProcess(yaml []byte) ([]byte, error)
- func (d DronePipeline) Transform(sources []*transform.Source) ([]transform.Destination, error)
- type Pipeline
- type Platform
- type Service
- type Setting
- type Settings
- type Step
- type Trigger
- type UnsupportedEventError
- type Volume
- type VolumeHost
- type VolumeRef
- type VolumeTemp
- type When
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertEventConditions ¶ added in v1.0.0
ConvertEventConditions converts a Drone *Conditions for the event field into a Woodpecker constraint.List, mapping event names along the way.
func New ¶
func New() transform.Transformer
func TriggerToGlobalWhen ¶ added in v0.2.0
func TriggerToGlobalWhen(trigger *Trigger) (constraint.When, []error)
Types ¶
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() constraint.List
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) (*types.Workflow, []error)
func (DronePipeline) ConvertConditions ¶ added in v0.1.0
func (d DronePipeline) ConvertConditions(when *When, w *types.Workflow) (constraint.When, []error)
func (DronePipeline) ConvertImage ¶
func (d DronePipeline) ConvertImage(image string) string
func (DronePipeline) ConvertVolumes ¶ added in v0.1.0
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.Destination, 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 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 Settings ¶ added in v0.3.0
type Settings []Setting
func (Settings) MarshalYAML ¶ added in v0.3.0
func (*Settings) UnmarshalYAML ¶ added in v0.3.0
type Step ¶
type Step struct {
Name string `yaml:"name"`
Image string `yaml:"image"`
Pull string `yaml:"pull"`
Environment core.MapOrEnvArray `yaml:"environment"`
Settings 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"`
User string `yaml:"user"`
}
type Trigger ¶ added in v0.1.0
type Trigger struct {
Branch *Conditions `yaml:"branch"`
Event *Conditions `yaml:"event"`
Ref *Conditions `yaml:"ref"`
Repositories *Conditions `yaml:"repo"`
Status core.Strings `yaml:"status"`
Target *Conditions `yaml:"target"`
Cron *Conditions `yaml:"cron"`
Action *Conditions `yaml:"action"`
Paths *Conditions `yaml:"paths"`
}
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
func (UnsupportedEventError) Is ¶ added in v1.0.0
func (e UnsupportedEventError) Is(target error) bool
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 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 *Conditions `yaml:"event"`
Ref *Conditions `yaml:"ref"`
Repositories *Conditions `yaml:"repo"`
Instance *Conditions `yaml:"instance"`
Status core.Strings `yaml:"status"`
Target *Conditions `yaml:"target"`
Cron *Conditions `yaml:"cron"`
}
Click to show internal directories.
Click to hide internal directories.