Documentation
¶
Index ¶
- type Constraint
- type List
- type Map
- type Path
- type When
- func (when *When) IncludesStatusFailure() bool
- func (when *When) IncludesStatusSuccess() bool
- func (when *When) IsEmpty() bool
- func (when *When) IsLocal() bool
- func (when *When) Match(metadata metadata.Metadata, global bool, env map[string]string) (bool, error)
- func (when *When) UnmarshalYAML(value *yaml.Node) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constraint ¶
type Constraint struct {
Ref List
Repo List
Instance List
Platform List
Branch List
Cron List
Status List
Matrix Map
Local yamlBaseTypes.BoolTrue
Path Path
Evaluate string `yaml:"evaluate,omitempty"`
Event yamlBaseTypes.StringOrSlice
}
type List ¶
List defines a runtime constraint for exclude & include string slices.
func (*List) Match ¶
Match returns true if the string matches the include patterns and does not match any of the exclude patterns.
func (*List) UnmarshalYAML ¶
UnmarshalYAML unmarshal the constraint.
type Map ¶
Map defines a runtime constraint for exclude & include map strings.
type Path ¶
type Path struct {
Include []string
Exclude []string
IgnoreMessage string `yaml:"ignore_message,omitempty"`
OnEmpty yamlBaseTypes.BoolTrue `yaml:"on_empty,omitempty"`
}
Path defines a runtime constrain for exclude & include paths.
func (*Path) Excludes ¶
Excludes returns true if all of the strings match any of the exclude patterns.
func (*Path) Match ¶
Match returns true if file paths in string slice matches the include and not exclude patterns or if commit message contains ignore message.
func (*Path) UnmarshalYAML ¶
UnmarshalYAML unmarshal the constraint.
type When ¶
type When struct {
// If true then read from a list of constraint
Constraints []Constraint
}
When defines a set of runtime constraints.
func (*When) IncludesStatusFailure ¶
func (*When) IncludesStatusSuccess ¶
func (*When) Match ¶
func (when *When) Match(metadata metadata.Metadata, global bool, env map[string]string) (bool, error)
Returns true if at least one of the internal constraints is true.