Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrWrongConfig is returned when a target spec has missing attributes which are mandatory ErrWrongConfig = errors.New("wrong target configuration") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// ResourceConfig defines target input parameters
resource.ResourceConfig `yaml:",inline"`
// dependsonchange enables the mechanism to check if the dependant target(s) have made a change.
// If the dependant target(s) have not made a change the target will be skipped.
//
// default:
// false
DependsOnChange bool `yaml:",omitempty"`
// ! Deprecated - please use all lowercase `sourceid`
DeprecatedSourceID string `yaml:"sourceID,omitempty" jsonschema:"-"`
// disablesourceinput disables the mechanism to retrieve a default value from a source.
// For example, if true, source information like changelog will not be accessible for a github/pullrequest action.
//
// default:
// false
DisableSourceInput bool `yaml:",omitempty"`
// sourceid specifies where retrieving the default value.
//
// default:
// if only one source is defined, then sourceid is set to that sourceid.
SourceID string `yaml:",omitempty"`
// ! Deprecated - please use DependsOn with `condition#conditionid` keys
//
// conditionids specifies the list of conditions to be evaluated before running the target.
// if at least one condition is not met, the target will be skipped.
//
// default:
// by default, all conditions are evaluated.
DeprecatedConditionIDs []string `yaml:"conditionids,omitempty"`
// disableconditions disables the mechanism to evaluate all conditions before running the target.
//
// default:
// false
//
// remark:
// It's possible to only monitor specific conditions by setting disableconditions to true
// and using DependsOn with `condition#conditionid` keys
DisableConditions bool `yaml:"disableconditions,omitempty"`
}
Config defines target parameters
func (Config) JSONSchema ¶ added in v0.23.0
JSONSchema implements the json schema interface to generate the "target" jsonschema.
type Target ¶
type Target struct {
// Result store the condition result after a target run.
Result result.Target
// Config defines target input parameters
Config Config
// Commit defines if a target was executed in Commit mode
Commit bool
// Push defines if a target was executed in Push mode
Push bool
// Clean defines if a target was executed in Clean mode
Clean bool
// DryRun defines if a target was executed in DryRun mode
DryRun bool
// Scm stores scm information
Scm *scm.ScmHandler
}
Target defines which file needs to be updated based on source output
Click to show internal directories.
Click to hide internal directories.