Documentation ¶
Overview ¶
Package yaml provides the defined yaml types for Vela.
Usage:
import "github.com/go-vela/types/yaml"
Index ¶
- type Build
- type Metadata
- type Origin
- type Rules
- type Ruleset
- type Secret
- type SecretSlice
- type Service
- type ServiceSlice
- type Stage
- type StageSlice
- type Step
- type StepSecret
- type StepSecretSlice
- type StepSlice
- type StepTemplate
- type Template
- type TemplateSlice
- type Ulimit
- type UlimitSlice
- type Volume
- type VolumeSlice
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { Version string `` /* 222-byte string literal not displayed */ Metadata Metadata `` /* 172-byte string literal not displayed */ Worker Worker `` /* 147-byte string literal not displayed */ Secrets SecretSlice `` /* 177-byte string literal not displayed */ Services ServiceSlice `` /* 200-byte string literal not displayed */ Stages StageSlice `` /* 207-byte string literal not displayed */ Steps StepSlice `` /* 206-byte string literal not displayed */ Templates TemplateSlice `` /* 191-byte string literal not displayed */ }
Build is the yaml representation of a build for a pipeline. nolint:lll // jsonschema will cause long lines
type Metadata ¶
type Metadata struct {
Template bool `` /* 193-byte string literal not displayed */
}
Metadata is the yaml representation of the metadata block for a pipeline. nolint:lll // jsonschema will cause long lines
func (*Metadata) ToPipeline ¶
ToPipeline converts the Metadata type to a pipeline Metadata type.
type Origin ¶ added in v0.5.0
type Origin struct { Environment raw.StringSliceMap `` /* 158-byte string literal not displayed */ Image string `` /* 165-byte string literal not displayed */ Name string `` /* 131-byte string literal not displayed */ Parameters map[string]interface{} `` /* 158-byte string literal not displayed */ Secrets StepSecretSlice `` /* 164-byte string literal not displayed */ Pull string `` /* 238-byte string literal not displayed */ Ruleset Ruleset `` /* 154-byte string literal not displayed */ }
Origin is the yaml representation of a method for looking up secrets with a secret plugin.
func (*Origin) ToPipeline ¶ added in v0.5.0
ToPipeline converts the Origin type to a pipeline Container type.
type Rules ¶
type Rules struct { Branch []string `` /* 215-byte string literal not displayed */ Comment []string `` /* 225-byte string literal not displayed */ Event []string `` /* 211-byte string literal not displayed */ Path []string `` /* 226-byte string literal not displayed */ Repo []string `` /* 204-byte string literal not displayed */ Status []string `` /* 245-byte string literal not displayed */ Tag []string `` /* 215-byte string literal not displayed */ Target []string `` /* 225-byte string literal not displayed */ }
Rules is the yaml representation of the ruletypes from a ruleset block for a step in a pipeline.
func (*Rules) ToPipeline ¶
ToPipeline converts the Rules type to a pipeline Rules type.
func (*Rules) UnmarshalYAML ¶
UnmarshalYAML implements the Unmarshaler interface for the Rules type.
type Ruleset ¶
type Ruleset struct { If Rules `` /* 196-byte string literal not displayed */ Unless Rules `` /* 207-byte string literal not displayed */ Matcher string `` /* 175-byte string literal not displayed */ Operator string `` /* 255-byte string literal not displayed */ Continue bool `` /* 236-byte string literal not displayed */ }
Ruleset is the yaml representation of a ruleset block for a step in a pipeline.
func (*Ruleset) ToPipeline ¶
ToPipeline converts the Ruleset type to a pipeline Ruleset type.
func (*Ruleset) UnmarshalYAML ¶
UnmarshalYAML implements the Unmarshaler interface for the Ruleset type.
type Secret ¶
type Secret struct { Name string `` /* 206-byte string literal not displayed */ Key string `` /* 201-byte string literal not displayed */ Engine string `` /* 233-byte string literal not displayed */ Type string `` /* 235-byte string literal not displayed */ Origin Origin `` /* 213-byte string literal not displayed */ }
Secret is the yaml representation of a secret from the secrets block for a pipeline.
type SecretSlice ¶
type SecretSlice []*Secret
SecretSlice is the yaml representation of the secrets block for a pipeline.
func (*SecretSlice) ToPipeline ¶
func (s *SecretSlice) ToPipeline() *pipeline.SecretSlice
ToPipeline converts the SecretSlice type to a pipeline SecretSlice type.
func (*SecretSlice) UnmarshalYAML ¶
func (s *SecretSlice) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the Unmarshaler interface for the SecretSlice type.
type Service ¶
type Service struct { Image string `` /* 223-byte string literal not displayed */ Name string `` /* 220-byte string literal not displayed */ Entrypoint raw.StringSlice `` /* 205-byte string literal not displayed */ Environment raw.StringSliceMap `` /* 217-byte string literal not displayed */ Ports raw.StringSlice `` /* 209-byte string literal not displayed */ Pull string `` /* 290-byte string literal not displayed */ }
Service is the yaml representation of a Service in a pipeline. nolint:lll // jsonschema will cause long lines
type ServiceSlice ¶
type ServiceSlice []*Service
ServiceSlice is the yaml representation of the Services block for a pipeline.
func (*ServiceSlice) ToPipeline ¶
func (s *ServiceSlice) ToPipeline() *pipeline.ContainerSlice
ToPipeline converts the ServiceSlice type to a pipeline ContainerSlice type.
func (*ServiceSlice) UnmarshalYAML ¶
func (s *ServiceSlice) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the Unmarshaler interface for the ServiceSlice type.
type Stage ¶
type Stage struct { Name string `` /* 200-byte string literal not displayed */ Needs raw.StringSlice `` /* 204-byte string literal not displayed */ Steps StepSlice `` /* 203-byte string literal not displayed */ }
Stage is the yaml representation of a stage in a pipeline. nolint:lll // jsonschema will cause long lines
type StageSlice ¶
type StageSlice []*Stage
StageSlice is the yaml representation of the stages block for a pipeline.
func (*StageSlice) ToPipeline ¶
func (s *StageSlice) ToPipeline() *pipeline.StageSlice
ToPipeline converts the StageSlice type to a pipeline StageSlice type.
func (*StageSlice) UnmarshalYAML ¶
func (s *StageSlice) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the Unmarshaler interface for the StageSlice type.
type Step ¶
type Step struct { Commands raw.StringSlice `` /* 208-byte string literal not displayed */ Detach bool `` /* 202-byte string literal not displayed */ Entrypoint raw.StringSlice `` /* 201-byte string literal not displayed */ Environment raw.StringSliceMap `` /* 233-byte string literal not displayed */ Image string `` /* 238-byte string literal not displayed */ Name string `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"required,minLength=1,description=Unique name for the step."` Parameters map[string]interface{} `` /* 204-byte string literal not displayed */ Privileged bool `` /* 201-byte string literal not displayed */ Pull string `` /* 287-byte string literal not displayed */ Ruleset Ruleset `` /* 206-byte string literal not displayed */ Secrets StepSecretSlice `` /* 215-byte string literal not displayed */ Template StepTemplate `` /* 224-byte string literal not displayed */ Ulimits UlimitSlice `` /* 141-byte string literal not displayed */ Volumes VolumeSlice `` /* 135-byte string literal not displayed */ }
Step is the yaml representation of a step from the steps block for a pipeline. nolint:lll // jsonschema will cause long lines
type StepSecret ¶
type StepSecret struct { Source string `yaml:"source,omitempty"` Target string `yaml:"target,omitempty"` }
StepSecret is the yaml representation of a secret from a secrets block for a step in a pipeline.
type StepSecretSlice ¶
type StepSecretSlice []*StepSecret
StepSecretSlice is the yaml representation of the secrets block for a step in a pipeline.
func (*StepSecretSlice) ToPipeline ¶
func (s *StepSecretSlice) ToPipeline() *pipeline.StepSecretSlice
ToPipeline converts the StepSecretSlice type to a pipeline StepSecretSlice type.
func (*StepSecretSlice) UnmarshalYAML ¶
func (s *StepSecretSlice) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the Unmarshaler interface for the StepSecretSlice type.
type StepSlice ¶
type StepSlice []*Step
StepSlice is the yaml representation of the steps block for a pipeline.
func (*StepSlice) ToPipeline ¶
func (s *StepSlice) ToPipeline() *pipeline.ContainerSlice
ToPipeline converts the StepSlice type to a pipeline ContainerSlice type.
func (*StepSlice) UnmarshalYAML ¶
UnmarshalYAML implements the Unmarshaler interface for the StepSlice type.
type StepTemplate ¶
type StepTemplate struct { Name string `` /* 209-byte string literal not displayed */ Variables map[string]interface{} `` /* 190-byte string literal not displayed */ }
StepTemplate is the yaml representation of the template block for a step in a pipeline.
type Template ¶
type Template struct { Name string `` /* 200-byte string literal not displayed */ Source string `` /* 207-byte string literal not displayed */ Type string `` /* 224-byte string literal not displayed */ }
Template is the yaml representation of a template from the templates block for a pipeline.
type TemplateSlice ¶
type TemplateSlice []*Template
TemplateSlice is the yaml representation of the templates block for a pipeline.
func (*TemplateSlice) UnmarshalYAML ¶
func (t *TemplateSlice) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the Unmarshaler interface for the TemplateSlice type.
type Ulimit ¶
type Ulimit struct { Name string `` /* 144-byte string literal not displayed */ Soft int64 `yaml:"soft,omitempty" json:"soft,omitempty" jsonschema:"description=Set the soft limit.\nReference: coming soon"` Hard int64 `yaml:"hard,omitempty" json:"hard,omitempty" jsonschema:"description=Set the hard limit.\nReference: coming soon"` }
Ulimit is the yaml representation of a ulimit from the ulimits block for a step in a pipeline. nolint:lll // jsonschema will cause long lines
type UlimitSlice ¶
type UlimitSlice []*Ulimit
UlimitSlice is the yaml representation of the ulimits block for a step in a pipeline.
func (*UlimitSlice) ToPipeline ¶
func (u *UlimitSlice) ToPipeline() *pipeline.UlimitSlice
ToPipeline converts the UlimitSlice type to a pipeline UlimitSlice type.
func (*UlimitSlice) UnmarshalYAML ¶
func (u *UlimitSlice) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the Unmarshaler interface for the UlimitSlice type.
type Volume ¶
type Volume struct { Source string `` /* 162-byte string literal not displayed */ Destination string `` /* 189-byte string literal not displayed */ AccessMode string `` /* 161-byte string literal not displayed */ }
Volume is the yaml representation of a volume from a volumes block for a step in a pipeline. nolint:lll // jsonschema will cause long lines
type VolumeSlice ¶
type VolumeSlice []*Volume
VolumeSlice is the yaml representation of the volumes block for a step in a pipeline.
func (*VolumeSlice) ToPipeline ¶
func (v *VolumeSlice) ToPipeline() *pipeline.VolumeSlice
ToPipeline converts the VolumeSlice type to a pipeline VolumeSlice type.
func (*VolumeSlice) UnmarshalYAML ¶
func (v *VolumeSlice) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the Unmarshaler interface for the VolumeSlice type.
type Worker ¶ added in v0.2.0
type Worker struct { Flavor string `` /* 154-byte string literal not displayed */ Platform string `` /* 167-byte string literal not displayed */ }
Worker is the yaml representation of a worker from a worker block in a pipeline. nolint:lll // jsonschema will cause long lines
func (*Worker) ToPipeline ¶ added in v0.2.0
ToPipeline converts the Worker type to a pipeline Worker type.