target

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	resource.ResourceConfig `yaml:",inline"`
	// PipelineID references a unique pipeline run allowing to group targets
	PipelineID string
	// ReportTitle contains the updatecli reports title for sources and conditions run
	ReportTitle string
	// ReportBody contains the updatecli reports body for sources and conditions run
	ReportBody string
	// ! Deprecated - please use all lowercase `sourceid`
	// sourceid specifies where retrieving the default value
	DeprecatedSourceID string `yaml:"sourceID"`
	// sourceid specifies where retrieving the default value
	SourceID string
}

Config defines target parameters

func (Config) JSONSchema added in v0.23.0

func (Config) JSONSchema() *jschema.Schema

JSONSchema implements the json schema interface to generate the "target" jsonschema.

func (*Config) Validate added in v0.23.0

func (c *Config) Validate() error

type Options

type Options struct {
	Commit bool
	Push   bool
	Clean  bool
	DryRun bool
}

Options hold target parameters

type Target

type Target struct {
	// Result store the condition result after a target run.
	Result string
	Config Config
	Commit bool
	Push   bool
	Clean  bool
	DryRun bool
	Scm    *scm.ScmHandler
}

Target defines which file needs to be updated based on source output

func (*Target) Check

func (t *Target) Check() (bool, error)

Check verifies if mandatory Targets parameters are provided and return false if not.

func (*Target) Run

func (t *Target) Run(source string, o *Options) (err error)

Run applies a specific target configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL