Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterKind(reg *registry.KindRegistry)
- type Definition
- type DefinitionLocks
- type DerivedStage
- type DerivedStageSet
- type NodeJSHandler
- func (h *NodeJSHandler) Build(ctx context.Context, buildOpts builddef.BuildOpts) (llb.State, *image.Image, error)
- func (h *NodeJSHandler) DebugConfig(buildOpts builddef.BuildOpts) (interface{}, error)
- func (h *NodeJSHandler) UpdateLocks(ctx context.Context, pkgSolvers pkgsolver.PackageSolversMap, ...) (builddef.Locks, error)
- func (h *NodeJSHandler) WithSolver(solver statesolver.StateSolver)
- type Stage
- type StageDefinition
- type StageLocks
Constants ¶
View Source
const WorkingDir = "/app"
Variables ¶
View Source
string ConfigFiles string PackageFiles string }{ BuildContext: "build-context", ConfigFiles: "config-files", PackageFiles: "package-files", }BuildContext
Functions ¶
func RegisterKind ¶
func RegisterKind(reg *registry.KindRegistry)
Types ¶
type Definition ¶
type Definition struct { BaseStage Stage `mapstructure:",squash"` BaseImage string `mapstructure:"base"` Version string `mapstructure:"version"` Alpine bool `mapstructure:"alpine"` Stages DerivedStageSet `mapstructure:"stages"` IsFrontend bool `mapstructure:"frontend"` SourceContext *builddef.Context `mapstructure:"source_context"` Locks DefinitionLocks `mapstructure:"-"` }
func NewKind ¶
func NewKind(genericDef *builddef.BuildDef) (Definition, error)
@TODO: rename into NewDefinition
func (Definition) Copy ¶
func (d Definition) Copy() Definition
func (Definition) IsValid ¶
func (d Definition) IsValid() error
func (Definition) Merge ¶
func (base Definition) Merge(overriding Definition) Definition
func (*Definition) ResolveStageDefinition ¶
func (def *Definition) ResolveStageDefinition( name string, withLocks bool, ) (StageDefinition, error)
type DefinitionLocks ¶
type DefinitionLocks struct { BaseImage string `mapstructure:"base"` OSRelease builddef.OSRelease `mapstructure:"osrelease"` Stages map[string]StageLocks `mapstructure:"stages"` SourceContext *builddef.Context `mapstructure:"source_context"` }
func (DefinitionLocks) RawLocks ¶
func (l DefinitionLocks) RawLocks() map[string]interface{}
@TODO: add a generic way to transform locks into rawlocks
type DerivedStage ¶
type DerivedStage struct { Stage `mapstructure:",squash"` DeriveFrom string `mapstructure:"from"` Dev *bool `mapstructure:"dev"` }
func (DerivedStage) Copy ¶
func (s DerivedStage) Copy() DerivedStage
func (DerivedStage) Merge ¶
func (s DerivedStage) Merge(overriding DerivedStage) DerivedStage
type DerivedStageSet ¶
type DerivedStageSet map[string]DerivedStage
func (DerivedStageSet) Copy ¶
func (set DerivedStageSet) Copy() DerivedStageSet
func (DerivedStageSet) Merge ¶
func (base DerivedStageSet) Merge(overriding DerivedStageSet) DerivedStageSet
type NodeJSHandler ¶
type NodeJSHandler struct {
// contains filtered or unexported fields
}
func (*NodeJSHandler) DebugConfig ¶
func (h *NodeJSHandler) DebugConfig( buildOpts builddef.BuildOpts, ) (interface{}, error)
func (*NodeJSHandler) UpdateLocks ¶
func (h *NodeJSHandler) UpdateLocks( ctx context.Context, pkgSolvers pkgsolver.PackageSolversMap, opts builddef.UpdateLocksOpts, ) (builddef.Locks, error)
func (*NodeJSHandler) WithSolver ¶
func (h *NodeJSHandler) WithSolver(solver statesolver.StateSolver)
type Stage ¶
type Stage struct { ExternalFiles []llbutils.ExternalFile `mapstructure:"external_files"` SystemPackages *builddef.VersionMap `mapstructure:"system_packages"` GlobalPackages *builddef.VersionMap `mapstructure:"global_packages"` BuildCommand *string `mapstructure:"build_command"` Command *[]string `mapstructure:"command"` ConfigFiles builddef.PathsMap `mapstructure:"config_files"` Sources []string `mapstructure:"sources"` StatefulDirs []string `mapstructure:"stateful_dirs"` Healthcheck *builddef.HealthcheckConfig `mapstructure:"healthcheck"` }
type StageDefinition ¶
type StageDefinition struct { Stage Name string Version string Dev *bool IsFrontend bool DefLocks DefinitionLocks StageLocks StageLocks // PackageManager is determined during the build process to let the // nodejs builder use the right package manager based on which lock file // is available (either package-lock.json or yarn.lock). PackageManager string }
StageDefinition is the final structure representing the complete definition of a stage. It's created by merging a stage with all its ancestors. It also contains the locked data for itself and the root definition locks. As such, all the data needed to build the LLB DAG for a stage are available from there.
type StageLocks ¶
func (StageLocks) RawLocks ¶
func (l StageLocks) RawLocks() map[string]interface{}
Click to show internal directories.
Click to hide internal directories.