Documentation ¶
Overview ¶
Package v1alpha1 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"` 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 Finalize ¶
type Finalize struct { From string `yaml:"from,omitempty"` To string `yaml:"to,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` }
Finalize is a set of COPY instructions to finalize the build.
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:"-"` Title string `yaml:"title"` Description string `yaml:"description,omitempty"` Licenses string `yaml:"licenses,omitempty"` Authors string `yaml:"authors,omitempty"` Documentation string `yaml:"documentation,omitempty"` Source string `yaml:"source,omitempty"` Variant Variant `yaml:"variant,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"` Finalize Finalize `yaml:"finalize,omitempty"` }
Pkg represents build instructions for a single package.
type Pkgfile ¶
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"` CachePath string `yaml:"cache,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.