Documentation ¶
Overview ¶
Package v1alpha2 contains type definitions for `pkg.yaml`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct { Image string `yaml:"image,omitempty"` Stage string `yaml:"stage,omitempty"` From string `yaml:"from,omitempty"` To string `yaml:"to,omitempty"` Platform string `yaml:"platform,omitempty"` Runtime bool `yaml:"runtime,omitempty"` }
Dependency on another image or stage.
func (*Dependency) Dest ¶
func (d *Dependency) Dest() string
Dest returns copy destination (to base).
func (*Dependency) IsInternal ¶
func (d *Dependency) IsInternal() bool
IsInternal checks whether dependency is internal to some stage.
func (*Dependency) Src ¶
func (d *Dependency) Src() string
Src returns copy source (from dependency).
type Environment ¶
Environment is a set of environment variables to be set in the step.
type Instruction ¶
type Instruction string
Instruction is a single shell command.
func (Instruction) Script ¶
func (ins Instruction) Script() string
Script formats Instruction for /bin/sh -c execution.
type Pkg ¶
type Pkg struct { Context types.Variables `yaml:"-"` Name string `yaml:"name,omitempty"` Shell Shell `yaml:"shell,omitempty"` BaseDir string `yaml:"-"` FileName string `yaml:"-"` Install Install `yaml:"install,omitempty"` Dependencies Dependencies `yaml:"dependencies,omitempty"` Steps Steps `yaml:"steps,omitempty"` Finalize []Finalize `yaml:"finalize,omitempty"` Variant Variant `yaml:"variant,omitempty"` }
Pkg represents build instructions for a single package.
type Pkgfile ¶
type Pkgfile struct { Vars types.Variables `yaml:"vars,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` Format string `yaml:"format"` }
Pkgfile describes structure of 'Pkgfile'.
func NewPkgfile ¶
NewPkgfile loads Pkgfile from `[]byte` contents.
type Source ¶
type Source struct { URL string `yaml:"url,omitempty"` Destination string `yaml:"destination,omitempty"` SHA256 string `yaml:"sha256,omitempty"` SHA512 string `yaml:"sha512,omitempty"` }
Source describe build source to be downloaded.
func (*Source) ToSHA512Sum ¶
ToSHA512Sum returns in format of line expected by 'sha512sum'.
type Step ¶
type Step struct { Env Environment `yaml:"env,omitempty"` CachePaths []string `yaml:"cachePaths,omitempty"` TmpDir string `yaml:"-"` Sources Sources `yaml:"sources,omitempty"` Prepare Instructions `yaml:"prepare,omitempty"` Build Instructions `yaml:"build,omitempty"` Install Instructions `yaml:"install,omitempty"` Test Instructions `yaml:"test,omitempty"` }
Step describes a single build step.
Steps are executed sequentially, each step runs in its own empty temporary directory.
type Variant ¶
type Variant int
Variant is a kind of base build image.
func (Variant) MarshalYAML ¶
MarshalYAML implements yaml.Marshaller interface.
func (*Variant) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaller interface.