Documentation
¶
Index ¶
- Variables
- func ContainerName(path string, context Context) string
- func ContainerPathPrefix(path string) string
- func ImageName(dockerfile []byte) string
- func Log(format string, a ...interface{})
- type Context
- func (c Context) Clone() Context
- func (c Context) GetAllImagesAndPlatforms(platform string) []ImageAndPlatform
- func (c Context) GetCombos() [][]string
- func (c Context) GetContext(names []string) (Context, error)
- func (c Context) Merge(source Context, withVariations bool) Context
- func (c Context) String() string
- type ContextFile
- type Contexts
- type DockerBuild
- type ImageAndPlatform
- type Variation
- type Variations
Constants ¶
This section is empty.
Variables ¶
var (
IsDryRun bool
)
var (
IsVerbose bool
)
Functions ¶
func ContainerName ¶
ContainerName returns the container name to use for given yey rc path and context
func ContainerPathPrefix ¶
Types ¶
type Context ¶
type Context struct { Name string `yaml:",omitempty"` Variations Variations `yaml:"variations"` Remove *bool Image string Build DockerBuild Env map[string]string Mounts map[string]string EntryPoint string `yaml:"entrypoint,omitempty"` Cmd []string Network string Platform string `yaml:"platform,omitempty"` DockerArgs []string `yaml:"dockerArgs,omitempty"` }
Context represents execution configuration for some docker container
func (Context) GetAllImagesAndPlatforms ¶ added in v0.5.1
func (c Context) GetAllImagesAndPlatforms(platform string) []ImageAndPlatform
GetAllImagesAndPlatforms returns the list of image names referenced in context recursively
func (Context) GetCombos ¶ added in v0.3.0
GetCombos returns the list of all possible context name combinations user can choose from
func (Context) GetContext ¶ added in v0.3.0
GetContext returns context resulting from merging contexts with given names from all variations
type ContextFile ¶
type ContextFile struct { Version int Parent string Path string `yaml:"-"` Context `yaml:",inline"` }
ContextFile represents yey's current config persisted to disk
type Contexts ¶
Contexts represents a combinaison of base and named contexts
func LoadContexts ¶
LoadContexts reads the context file and returns the contexts. It starts by reading from current working directory and resolves all parent context files.
type DockerBuild ¶
type ImageAndPlatform ¶ added in v0.5.1
type Variation ¶ added in v0.4.0
type Variations ¶ added in v0.4.0
type Variations []Variation
func (Variations) Clone ¶ added in v0.4.0
func (l Variations) Clone() Variations
Clone returns a deep-copy of this variation
func (Variations) GetByName ¶ added in v0.4.0
func (l Variations) GetByName(name string) (Variation, bool)
GetByName returns variation with given name and whether it was found
func (Variations) Merge ¶ added in v0.4.0
func (l Variations) Merge(source Variations) Variations
Merge creates a deep-copy of this variation and copies values from given source variation on top of it
func (*Variations) UnmarshalYAML ¶ added in v0.4.0
func (variations *Variations) UnmarshalYAML(n *yaml.Node) error