Documentation
¶
Index ¶
- func IsSkipCommitMessage(event metadata.Event, commitMessage string) bool
- type Constraint
- type Dependency
- type DependsOn
- type List
- type Map
- type Path
- type When
- func (when *When) IncludesStatusFailure(metadata metadata.Metadata, global bool, env map[string]string) bool
- func (when *When) IncludesStatusSuccess(metadata metadata.Metadata, global bool, env map[string]string) bool
- func (when *When) IsEmpty() bool
- func (when *When) IsLocal() bool
- func (when When) MarshalYAML() (any, error)
- 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 ¶
Types ¶
type Constraint ¶
type Constraint struct {
Ref List `yaml:"ref,omitempty"`
Repo List `yaml:"repo,omitempty"`
Instance List `yaml:"instance,omitempty"`
Platform List `yaml:"platform,omitempty"`
Branch List `yaml:"branch,omitempty"`
Cron List `yaml:"cron,omitempty"`
Status yaml_base_types.StringOrSlice `yaml:"status,omitempty"`
Matrix Map `yaml:"matrix,omitempty"`
Local optional.Option[bool] `yaml:"local,omitempty"`
Path Path `yaml:"path,omitempty"`
Evaluate string `yaml:"evaluate,omitempty"`
Event yaml_base_types.StringOrSlice `yaml:"event,omitempty"`
}
type Dependency ¶ added in v3.15.0
Dependency represents a single dependency with an optional flag. When optional is true, the dependency is silently dropped if the referenced step or workflow is not present in the pipeline.
type DependsOn ¶ added in v3.15.0
type DependsOn []Dependency
DependsOn represents a list of dependencies that can be unmarshalled from:
- a string: "step-a"
- a string array: ["step-a", "step-b"]
- an object array: [{name: "step-a", optional: true}]
- a mixed array: ["step-a", {name: "step-b", optional: true}]
func (DependsOn) IsZero ¶ added in v3.15.0
IsZero treats only a nil DependsOn as empty for omitempty purposes. A non-nil empty slice means depends_on was present in the YAML, which the step compiler reads as DAG mode (vs nil = sequential).
func (DependsOn) MarshalYAML ¶ added in v3.15.0
MarshalYAML emits a single string for one required dep, a string array for many, an object array if any dep is optional, and an empty array for a non-nil empty slice (the step DAG-mode signal — see IsZero).
func (DependsOn) OptionalNames ¶ added in v3.15.0
OptionalNames returns names of optional dependencies.
func (DependsOn) RequiredNames ¶ added in v3.15.0
RequiredNames returns names of non-optional dependencies.
type List ¶
List defines a runtime constraint for exclude & include string slices.
func (List) MarshalYAML ¶ added in v3.12.0
MarshalYAML implements custom Yaml marshaling.
type Map ¶
type Map struct {
Include map[string]string `yaml:"include,omitempty"`
Exclude map[string]string `yaml:"exclude,omitempty"`
}
Map defines a runtime constraint for exclude & include map strings.
func (Map) MarshalYAML ¶ added in v3.12.0
MarshalYAML implements custom Yaml marshaling.
type Path ¶
type Path struct {
Include []string `yaml:"include,omitempty"`
Exclude []string `yaml:"exclude,omitempty"`
IgnoreMessage string `yaml:"ignore_message,omitempty"`
OnEmpty optional.Option[bool] `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) MarshalYAML ¶ added in v3.12.0
MarshalYAML implements custom Yaml marshaling.
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) MarshalYAML ¶ added in v3.12.0
MarshalYAML implements custom Yaml marshaling.