compilerspec

package
v0.29.3-geaaru Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: GPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyField

type CopyField struct {
	Package     *pkg.DefaultPackage `json:"package" yaml:"package"`
	Image       string              `json:"image" yaml:"image"`
	Source      string              `json:"source" yaml:"source"`
	Destination string              `json:"destination" yaml:"destination"`
}

type LuetCompilationSpec

type LuetCompilationSpec struct {
	Steps           []string                  `json:"steps" yaml:"steps"` // Are run inside a container and the result layer diff is saved
	Env             []string                  `json:"env" yaml:"env"`
	Prelude         []string                  `json:"prelude" yaml:"prelude"` // Are run inside the image which will be our builder
	Image           string                    `json:"image" yaml:"image"`
	Seed            string                    `json:"seed" yaml:"seed"`
	Package         *pkg.DefaultPackage       `json:"package" yaml:"package"`
	SourceAssertion solver.PackagesAssertions `json:"-" yaml:"-"`
	PackageDir      string                    `json:"package_dir" yaml:"package_dir"`

	Retrieve []string `json:"retrieve" yaml:"retrieve"`

	OutputPath string   `json:"-" yaml:"-"` // Where the build processfiles go
	Unpack     bool     `json:"unpack" yaml:"unpack"`
	Includes   []string `json:"includes" yaml:"includes"`
	Excludes   []string `json:"excludes" yaml:"excludes"`

	BuildOptions *options.Compiler `json:"build_options" yaml:"build_options"`

	Copy []CopyField `json:"copy" yaml:"copy"`

	RequiresFinalImages bool `json:"requires_final_images" yaml:"requires_final_images"`
}

func NewLuetCompilationSpec

func NewLuetCompilationSpec(b []byte, p pkg.Package) (*LuetCompilationSpec, error)

func (*LuetCompilationSpec) BuildSteps

func (cs *LuetCompilationSpec) BuildSteps() []string

func (*LuetCompilationSpec) CopyRetrieves

func (cs *LuetCompilationSpec) CopyRetrieves(dest string) error

func (*LuetCompilationSpec) EmptyPackage

func (cs *LuetCompilationSpec) EmptyPackage() bool

func (*LuetCompilationSpec) GetExcludes

func (cs *LuetCompilationSpec) GetExcludes() []string

func (*LuetCompilationSpec) GetImage

func (cs *LuetCompilationSpec) GetImage() string

func (*LuetCompilationSpec) GetIncludes

func (cs *LuetCompilationSpec) GetIncludes() []string

func (*LuetCompilationSpec) GetOutputPath

func (cs *LuetCompilationSpec) GetOutputPath() string

func (*LuetCompilationSpec) GetPackage

func (cs *LuetCompilationSpec) GetPackage() pkg.Package

func (*LuetCompilationSpec) GetPackageDir

func (cs *LuetCompilationSpec) GetPackageDir() string

func (*LuetCompilationSpec) GetPreBuildSteps

func (cs *LuetCompilationSpec) GetPreBuildSteps() []string

func (*LuetCompilationSpec) GetRetrieve

func (cs *LuetCompilationSpec) GetRetrieve() []string

func (*LuetCompilationSpec) GetSeedImage

func (cs *LuetCompilationSpec) GetSeedImage() string

func (*LuetCompilationSpec) GetSourceAssertion

func (cs *LuetCompilationSpec) GetSourceAssertion() solver.PackagesAssertions

func (*LuetCompilationSpec) HasImageSource

func (cs *LuetCompilationSpec) HasImageSource() bool

HasImageSource returns true when the compilation spec has an image source. a compilation spec has an image source when it depends on other packages or have a source image explictly supplied

func (*LuetCompilationSpec) Hash

func (cs *LuetCompilationSpec) Hash() (string, error)

func (*LuetCompilationSpec) ImageUnpack

func (cs *LuetCompilationSpec) ImageUnpack() bool

func (*LuetCompilationSpec) IsVirtual

func (cs *LuetCompilationSpec) IsVirtual() bool

IsVirtual returns true if the spec is virtual. A spec is virtual if the package is empty, and it has no image source to unpack from.

func (*LuetCompilationSpec) Rel

func (p *LuetCompilationSpec) Rel(s string) string

func (*LuetCompilationSpec) RenderBuildImage

func (cs *LuetCompilationSpec) RenderBuildImage() (string, error)

RenderBuildImage renders the dockerfile of the image used as a pre-build step

func (*LuetCompilationSpec) RenderStepImage

func (cs *LuetCompilationSpec) RenderStepImage(image string) (string, error)

RenderStepImage renders the dockerfile used for the image used for building the package

func (*LuetCompilationSpec) SetBuildOptions

func (cs *LuetCompilationSpec) SetBuildOptions(b options.Compiler)

func (*LuetCompilationSpec) SetImage

func (cs *LuetCompilationSpec) SetImage(s string)

func (*LuetCompilationSpec) SetOutputPath

func (cs *LuetCompilationSpec) SetOutputPath(s string)

func (*LuetCompilationSpec) SetPackageDir

func (cs *LuetCompilationSpec) SetPackageDir(s string)

func (*LuetCompilationSpec) SetSeedImage

func (cs *LuetCompilationSpec) SetSeedImage(s string)

func (*LuetCompilationSpec) SetSourceAssertion

func (cs *LuetCompilationSpec) SetSourceAssertion(as solver.PackagesAssertions)

func (*LuetCompilationSpec) UnpackedPackage

func (cs *LuetCompilationSpec) UnpackedPackage() bool

func (*LuetCompilationSpec) WriteBuildImageDefinition

func (cs *LuetCompilationSpec) WriteBuildImageDefinition(path string) error

func (*LuetCompilationSpec) WriteStepImageDefinition

func (cs *LuetCompilationSpec) WriteStepImageDefinition(fromimage, path string) error

type LuetCompilationspecs

type LuetCompilationspecs []LuetCompilationSpec

func NewLuetCompilationspecs

func NewLuetCompilationspecs(s ...*LuetCompilationSpec) *LuetCompilationspecs

func (*LuetCompilationspecs) Add

func (*LuetCompilationspecs) All

func (specs *LuetCompilationspecs) All() []*LuetCompilationSpec

func (LuetCompilationspecs) Len

func (specs LuetCompilationspecs) Len() int

func (*LuetCompilationspecs) Remove

func (*LuetCompilationspecs) Unique

func (specs *LuetCompilationspecs) Unique() *LuetCompilationspecs

type Signature

type Signature struct {
	Image               string
	Steps               []string
	PackageDir          string
	Prelude             []string
	Seed                string
	Env                 []string
	Retrieve            []string
	Unpack              bool
	Includes            []string
	Excludes            []string
	Copy                []CopyField
	Requires            pkg.DefaultPackages
	RequiresFinalImages bool
}

Signature is a portion of the spec that yields a signature for the hash

Jump to

Keyboard shortcuts

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