Documentation
¶
Index ¶
- Constants
- type AptStepBuilder
- type BuildStepOptions
- type CacheContext
- type CommandStepBuilder
- func (b *CommandStepBuilder) AddCache(name string)
- func (b *CommandStepBuilder) AddCommand(command plan.Command)
- func (b *CommandStepBuilder) AddCommands(commands []plan.Command)
- func (b *CommandStepBuilder) AddEnvVars(envVars map[string]string)
- func (b *CommandStepBuilder) AddPaths(paths []string)
- func (b *CommandStepBuilder) AddVariables(variables map[string]string)
- func (b *CommandStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
- func (b *CommandStepBuilder) DependOn(name string)
- func (b *CommandStepBuilder) Name() string
- type GenerateContext
- func (c *GenerateContext) AddCommonCachesToStep(step *plan.Step)
- func (c *GenerateContext) ApplyConfig(config *config.Config) error
- func (c *GenerateContext) EnterSubContext(subContext string) *GenerateContext
- func (c *GenerateContext) ExitSubContext() *GenerateContext
- func (c *GenerateContext) Generate() (*plan.BuildPlan, map[string]*resolver.ResolvedPackage, error)
- func (c *GenerateContext) GetMiseStepBuilder() *MiseStepBuilder
- func (c *GenerateContext) GetStepByName(name string) *StepBuilder
- func (c *GenerateContext) GetStepName(name string) string
- func (c *GenerateContext) NewAptStepBuilder(name string) *AptStepBuilder
- func (c *GenerateContext) NewCommandStep(name string) *CommandStepBuilder
- func (c *GenerateContext) NewImageStep(name string, resolveStepImage func(options *BuildStepOptions) string) *ImageStepBuilder
- func (c *GenerateContext) ResolvePackages() (map[string]*resolver.ResolvedPackage, error)
- type ImageStepBuilder
- func (b *ImageStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
- func (b *ImageStepBuilder) Default(name string, defaultVersion string) resolver.PackageRef
- func (b *ImageStepBuilder) Name() string
- func (b *ImageStepBuilder) Version(name resolver.PackageRef, version string, source string)
- type Metadata
- type MiseStepBuilder
- func (b *MiseStepBuilder) AddSupportingAptPackage(name string)
- func (b *MiseStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
- func (b *MiseStepBuilder) Default(name string, defaultVersion string) resolver.PackageRef
- func (b *MiseStepBuilder) GetSupportingMiseConfigFiles(path string) []string
- func (b *MiseStepBuilder) Name() string
- func (b *MiseStepBuilder) Version(name resolver.PackageRef, version string, source string)
- type StartContext
- type StepBuilder
Constants ¶
View Source
const ( APT_CACHE_KEY = "apt" MISE_CACHE_KEY = "mise" )
View Source
const ( MisePackageStepName = "packages:mise" BuilderBaseImage = "ghcr.io/railwayapp/railpack-builder-base:latest" )
View Source
const (
DefaultBaseImage = "ghcr.io/railwayapp/railpack-runtime-base:latest"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AptStepBuilder ¶
func (*AptStepBuilder) AddAptPackage ¶
func (b *AptStepBuilder) AddAptPackage(pkg string)
func (*AptStepBuilder) Build ¶
func (b *AptStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
func (*AptStepBuilder) Name ¶
func (b *AptStepBuilder) Name() string
type BuildStepOptions ¶
type BuildStepOptions struct {
ResolvedPackages map[string]*resolver.ResolvedPackage
Caches *CacheContext
}
func (*BuildStepOptions) NewAptInstallCommand ¶
func (o *BuildStepOptions) NewAptInstallCommand(pkgs []string) plan.Command
type CacheContext ¶
func NewCacheContext ¶
func NewCacheContext() *CacheContext
func (*CacheContext) AddCache ¶
func (c *CacheContext) AddCache(name string, directory string) string
func (*CacheContext) GetAptCaches ¶
func (c *CacheContext) GetAptCaches() []string
type CommandStepBuilder ¶
type CommandStepBuilder struct {
DisplayName string
DependsOn []string
Commands *[]plan.Command
Outputs *[]string
Assets map[string]string
Variables map[string]string
Caches []string
UseSecrets bool
}
func (*CommandStepBuilder) AddCache ¶ added in v0.0.9
func (b *CommandStepBuilder) AddCache(name string)
func (*CommandStepBuilder) AddCommand ¶
func (b *CommandStepBuilder) AddCommand(command plan.Command)
func (*CommandStepBuilder) AddCommands ¶
func (b *CommandStepBuilder) AddCommands(commands []plan.Command)
func (*CommandStepBuilder) AddEnvVars ¶
func (b *CommandStepBuilder) AddEnvVars(envVars map[string]string)
func (*CommandStepBuilder) AddPaths ¶
func (b *CommandStepBuilder) AddPaths(paths []string)
func (*CommandStepBuilder) AddVariables ¶ added in v0.0.9
func (b *CommandStepBuilder) AddVariables(variables map[string]string)
func (*CommandStepBuilder) Build ¶
func (b *CommandStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
func (*CommandStepBuilder) DependOn ¶
func (b *CommandStepBuilder) DependOn(name string)
func (*CommandStepBuilder) Name ¶
func (b *CommandStepBuilder) Name() string
type GenerateContext ¶
type GenerateContext struct {
App *a.App
Env *a.Environment
BaseImage string
Steps []StepBuilder
Start StartContext
Caches *CacheContext
Secrets []string
SubContexts []string
Metadata *Metadata
Resolver *resolver.Resolver
// contains filtered or unexported fields
}
func NewGenerateContext ¶
func NewGenerateContext(app *a.App, env *a.Environment) (*GenerateContext, error)
func (*GenerateContext) AddCommonCachesToStep ¶ added in v0.0.9
func (c *GenerateContext) AddCommonCachesToStep(step *plan.Step)
func (*GenerateContext) ApplyConfig ¶
func (c *GenerateContext) ApplyConfig(config *config.Config) error
func (*GenerateContext) EnterSubContext ¶
func (c *GenerateContext) EnterSubContext(subContext string) *GenerateContext
func (*GenerateContext) ExitSubContext ¶
func (c *GenerateContext) ExitSubContext() *GenerateContext
func (*GenerateContext) Generate ¶
func (c *GenerateContext) Generate() (*plan.BuildPlan, map[string]*resolver.ResolvedPackage, error)
Generate a build plan from the context
func (*GenerateContext) GetMiseStepBuilder ¶
func (c *GenerateContext) GetMiseStepBuilder() *MiseStepBuilder
func (*GenerateContext) GetStepByName ¶
func (c *GenerateContext) GetStepByName(name string) *StepBuilder
func (*GenerateContext) GetStepName ¶
func (c *GenerateContext) GetStepName(name string) string
func (*GenerateContext) NewAptStepBuilder ¶
func (c *GenerateContext) NewAptStepBuilder(name string) *AptStepBuilder
func (*GenerateContext) NewCommandStep ¶
func (c *GenerateContext) NewCommandStep(name string) *CommandStepBuilder
func (*GenerateContext) NewImageStep ¶
func (c *GenerateContext) NewImageStep(name string, resolveStepImage func(options *BuildStepOptions) string) *ImageStepBuilder
func (*GenerateContext) ResolvePackages ¶
func (c *GenerateContext) ResolvePackages() (map[string]*resolver.ResolvedPackage, error)
type ImageStepBuilder ¶
type ImageStepBuilder struct {
DisplayName string
Resolver *resolver.Resolver
Packages []*resolver.PackageRef
Outputs *[]string
ResolveStepImage func(options *BuildStepOptions) string
}
func (*ImageStepBuilder) Build ¶
func (b *ImageStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
func (*ImageStepBuilder) Default ¶
func (b *ImageStepBuilder) Default(name string, defaultVersion string) resolver.PackageRef
func (*ImageStepBuilder) Name ¶
func (b *ImageStepBuilder) Name() string
func (*ImageStepBuilder) Version ¶
func (b *ImageStepBuilder) Version(name resolver.PackageRef, version string, source string)
type Metadata ¶
func NewMetadata ¶
func NewMetadata() *Metadata
type MiseStepBuilder ¶
type MiseStepBuilder struct {
DisplayName string
Resolver *resolver.Resolver
SupportingAptPackages []string
MisePackages []*resolver.PackageRef
SupportingMiseFiles []string
Assets map[string]string
// DependsOn []string
Outputs *[]string
// contains filtered or unexported fields
}
func (*MiseStepBuilder) AddSupportingAptPackage ¶
func (b *MiseStepBuilder) AddSupportingAptPackage(name string)
func (*MiseStepBuilder) Build ¶
func (b *MiseStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
func (*MiseStepBuilder) Default ¶
func (b *MiseStepBuilder) Default(name string, defaultVersion string) resolver.PackageRef
func (*MiseStepBuilder) GetSupportingMiseConfigFiles ¶
func (b *MiseStepBuilder) GetSupportingMiseConfigFiles(path string) []string
func (*MiseStepBuilder) Name ¶
func (b *MiseStepBuilder) Name() string
func (*MiseStepBuilder) Version ¶
func (b *MiseStepBuilder) Version(name resolver.PackageRef, version string, source string)
type StartContext ¶
type StartContext struct {
BaseImage string
Command string
// contains filtered or unexported fields
}
func NewStartContext ¶
func NewStartContext() *StartContext
func (*StartContext) AddEnvVars ¶
func (s *StartContext) AddEnvVars(envVars map[string]string)
func (*StartContext) AddOutputs ¶
func (s *StartContext) AddOutputs(outputs []string)
func (*StartContext) AddPaths ¶
func (s *StartContext) AddPaths(paths []string)
type StepBuilder ¶
type StepBuilder interface {
Name() string
Build(options *BuildStepOptions) (*plan.Step, error)
}
Click to show internal directories.
Click to hide internal directories.