core

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extrapolate

func Extrapolate(tpl string, values map[string]string) map[string]string

Extrapolate renders a template and reads it to a map

func Generate

func Generate(name string, data, out *[]byte, values map[string]string)

Generate renders the given values template

func LoadFile

func LoadFile(vals string) []byte

LoadFile reads a file

func LoadVals

func LoadVals(vals string, data []byte) map[string]string

LoadVals reads key:value mappings

func MergeVals

func MergeVals(prev map[string]string, next map[string]string)

MergeVals overwrites one map on top of another

Types

type Depends

type Depends map[string]*sync.WaitGroup

Depends implements a mapped waitgroup for dependencies

func (Depends) Complete

func (d Depends) Complete(stages ...string)

Complete given waitgroups

func (Depends) Wait

func (d Depends) Wait(stages ...string)

Wait on given waitgroups

type Jobs

type Jobs struct {
	Before []string `yaml:"before"`
	After  []string `yaml:"after"`
}

Jobs represent any shell scripts

type Pipeline

type Pipeline struct {
	Derive string            `yaml:"derive"`
	Stages map[string]*Stage `yaml:"stages"`
	Values map[string]string `yaml:"values"`
}

Pipeline represents the complete workflow.

func (Pipeline) BuildDepends

func (p Pipeline) BuildDepends(reverse bool) *Depends

BuildDepends generates a dependency map

type Stage

type Stage struct {
	helm.Chart `yaml:",inline"`
	Abandon    bool     `yaml:"abandon"`   // install only
	Values     string   `yaml:"values"`    // env specific values
	Requires   []string `yaml:"requires"`  // env requirements
	Depends    []string `yaml:"depends"`   // dependencies
	Jobs       Jobs     `yaml:"jobs"`      // bash jobs
	Templates  []string `yaml:"templates"` // templates
}

Stage represents a single part of the deployment pipeline

func (*Stage) Create

func (stage *Stage) Create(conn *helm.Bridge, key string, main map[string]string, verbose bool, deps *Depends) error

Create deploys the chart once its dependencies have been met

func (*Stage) Destroy

func (stage *Stage) Destroy(conn *helm.Bridge, key string, values map[string]string, verbose bool, deps *Depends) error

Destroy deletes the chart once its dependencies have been met

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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