Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildOpt ¶
type BuildOpt func(*buildOpts) error
BuildOpt modifies build behaviour
func WithCacheRef ¶
WithCacheRef makes dazzle use a cache ref other than the target ref
func WithChunkedWithoutHash ¶
WithChunkedWithoutHash disables the hash prefix for the chunked image tag
func WithNoCache ¶
WithNoCache disables the buildkit build cache
func WithPlainOutput ¶
WithPlainOutput forces plain build output
func WithResolver ¶
WithResolver makes the builder use a custom resolver
type BuildSession ¶
type BuildSession struct { Client *client.Client Dest reference.Named // contains filtered or unexported fields }
BuildSession records all state of a build
func NewSession ¶
NewSession starts a new build session
func (*BuildSession) DownloadBaseInfo ¶
func (s *BuildSession) DownloadBaseInfo(ctx context.Context, p *Project) (err error)
DownloadBaseInfo downloads the base image info
func (*BuildSession) PrintBuildInfo ¶
func (s *BuildSession) PrintBuildInfo()
PrintBuildInfo logs information about the built chunks
type ChunkCombination ¶
type ChunkCombination struct { Name string `yaml:"name"` Ref []string `yaml:"ref"` Chunks []string `yaml:"chunks"` }
ChunkCombination combines several chunks to a new image
type ChunkConfig ¶
type ChunkConfig struct {
Variants []ChunkVariant `yaml:"variants"`
}
ChunkConfig configures a chunk
type ChunkImageType ¶
type ChunkImageType string
ChunkImageType describes the chunk build artifact type
const ( // ImageTypeTest is an image built for testing ImageTypeTest ChunkImageType = "test" // ImageTypeFull is the full chunk image ImageTypeFull ChunkImageType = "full" // ImageTypeChunked is the chunk image with the base layers removed ImageTypeChunked ChunkImageType = "chunked" // ImageTypeChunkedNoHash is the chunk image with the base layers removed and no hash in the name ImageTypeChunkedNoHash ChunkImageType = "chunked-wohash" )
type ChunkVariant ¶
type ChunkVariant struct { Name string `yaml:"name"` Args map[string]string `yaml:"args,omitempty"` Dockerfile string `yaml:"dockerfile,omitempty"` }
ChunkVariant is a variant of a chunk
type CombinerOpt ¶
type CombinerOpt func(*combinerOpts) error
CombinerOpt configrues the combiner
func WithTests ¶
func WithTests(cl *client.Client) CombinerOpt
WithTests enable tests after image combination
type EnvVarCombination ¶
type EnvVarCombination struct { Name string `yaml:"name"` Action EnvVarCombinationAction `yaml:"action"` }
EnvVarCombination describes how env vars are combined
type EnvVarCombinationAction ¶
type EnvVarCombinationAction string
EnvVarCombinationAction defines mode by which an env var is combined
const ( // EnvVarCombineMerge means values are appended with : EnvVarCombineMerge EnvVarCombinationAction = "merge" // EnvVarCombineMergeUnique is like EnvVarCombineMerge but with unique values only EnvVarCombineMergeUnique EnvVarCombinationAction = "merge-unique" // EnvVarCombineUseLast means the last value wins EnvVarCombineUseLast EnvVarCombinationAction = "use-last" // EnvVarCombineUseFirst means the first value wins EnvVarCombineUseFirst EnvVarCombinationAction = "use-first" )
type LoadFromDirOpts ¶
LoadFromDirOpts configures LoadFromDir
type Project ¶
type Project struct { Base ProjectChunk Chunks []ProjectChunk Config ProjectConfig }
Project is a dazzle build project
func LoadFromDir ¶
func LoadFromDir(contextBase string, opts LoadFromDirOpts) (*Project, error)
LoadFromDir loads a dazzle project from disk
type ProjectChunk ¶
type ProjectChunk struct { Name string Dockerfile []byte ContextPath string Tests []*test.Spec Args map[string]string // contains filtered or unexported fields }
ProjectChunk represents a layer chunk in a project
func (*ProjectChunk) Hash ¶
func (p *ProjectChunk) Hash(out io.Writer, sess *BuildSession) (string, error)
PrintManifest prints the manifest to writer ... this is intended for debugging only
func (*ProjectChunk) ImageName ¶
func (p *ProjectChunk) ImageName(tpe ChunkImageType, sess *BuildSession) (reference.NamedTagged, error)
ImageName produces a chunk image name
func (*ProjectChunk) PrintManifest ¶
func (p *ProjectChunk) PrintManifest(out io.Writer, sess *BuildSession) error
PrintManifest prints the manifest to writer ... this is intended for debugging only
type ProjectConfig ¶
type ProjectConfig struct { Combiner struct { Combinations []ChunkCombination `yaml:"combinations"` EnvVars []EnvVarCombination `yaml:"envvars,omitempty"` } `yaml:"combiner"` ChunkIgnore []string `yaml:"ignore,omitempty"` // contains filtered or unexported fields }
ProjectConfig is the structure of a project's dazzle.yaml
func LoadProjectConfig ¶
func LoadProjectConfig(dir fs.FS) (*ProjectConfig, error)
LoadProjectConfig loads a dazzle project config file from disk
func (*ProjectConfig) Write ¶
func (pc *ProjectConfig) Write(dir string) error
Write writes this config as YAML to a file
type Registry ¶
type Registry interface { Push(ctx context.Context, ref reference.Named, opts storeInRegistryOptions) (absref reference.Digested, err error) Pull(ctx context.Context, ref reference.Reference, cfg interface{}) (manifest *ociv1.Manifest, absref reference.Digested, err error) }
Registry provides container registry services
func NewResolverRegistry ¶
type StoredTestResult ¶
type StoredTestResult struct {
Passed bool `json:"passed"`
}