Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadAndRenderSteps ¶
func LoadAndRenderSteps(template *Template, opts *BaseRenderOptions) (string, error)
LoadAndRenderSteps loads a template file and renders it according to an optional values file, --set values, and base render options.
Types ¶
type BaseRenderOptions ¶
type BaseRenderOptions struct { // Path to the steps file. Required. StepsFile string // Path to a values file. Optional. ValuesFile string // Override values. Optional. TemplateValues []string // ID is the build ID. Required. ID string // Commit is the commit used when running the build. Optional. Commit string // Repository is the repository used when running the build. Optional. Repository string // Branch is the branch used when running the build. Optional. Branch string // TriggeredBy is the reason the build was triggered. Required. TriggeredBy string // GitTag is a Git tag. Optional. GitTag string // Registry is the ACR being used. Optional. Registry string // Date is the date of the Build. Required. Date time.Time }
BaseRenderOptions represents additional information for the composition of the final rendering.
type Config ¶
Config represents configuration values.
func LoadConfig ¶
LoadConfig creates a Config from the specified path.
func (*Config) GetRawValue ¶
GetRawValue returns the Config's value as a string.
func (*Config) IsValidConfig ¶
IsValidConfig determines whether or not the Config is valid.
type Template ¶
Template represents a template.
func LoadTemplate ¶
LoadTemplate loads a Template from the specified path.
type Values ¶
type Values map[string]interface{}
Values represents a map of build values.
func Deserialize ¶
Deserialize will convert the specified bytes to a Values object.
func DeserializeFromFile ¶
DeserializeFromFile will parse the specified file name and convert it to a Values object.
func OverrideValues ¶
OverrideValues overrides the first config with the second.
func OverrideValuesWithBuildInfo ¶
func OverrideValuesWithBuildInfo(c1 *Config, c2 *Config, options *BaseRenderOptions) (Values, error)
OverrideValuesWithBuildInfo overrides the specified config's values and provides a default set of values.
func (Values) ToYAMLString ¶
ToYAMLString encodes the Values object into a YAML string.