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 task file. TaskFile string // Base64 encoded task file. Base64EncodedTaskFile string // Path to a values file. ValuesFile string // Base64 encoded values file. Base64EncodedValuesFile string // Override values. TemplateValues []string // ID is a unique identifier for the run. ID string // Commit is the SHA the run was triggered against. Commit string // Repository is the repository the run was triggered against. Repository string // Branch is the branch the run was triggered against. Branch string // TriggeredBy is the reason the run was triggered. TriggeredBy string // GitTag is the git tag the run was triggered against. GitTag string // Registry is the container registry being used. Registry string // Date is the UTC date of the run. Date time.Time SharedVolume string // OS is the GOOS. OS string // Architecture is the GOARCH. Architecture string }
BaseRenderOptions represents additional information for the composition of the final rendering.
type Config ¶
Config represents configuration values.
func DecodeConfig ¶ added in v1.0.5
DecodeConfig loads a Config from a Base64 encoded string.
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 DecodeTemplate ¶ added in v1.0.5
DecodeTemplate loads a Template from a Base64 encoded string.
func LoadTemplate ¶
LoadTemplate loads a Template from the specified path.
func NewTemplate ¶ added in v1.0.7
NewTemplate creates a new template with the specified name and data. It will strip out any commented lines from data, i.e. lines beginning with #.
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, opts *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.