Documentation
¶
Index ¶
- Constants
- func RuncBinaryExists(ctx context.Context) error
- func Scope() (force.Group, error)
- type Arg
- type BuildAction
- type Builder
- func (b *Builder) Credentials(ctx context.Context, req *auth.CredentialsRequest) (*auth.CredentialsResponse, error)
- func (b *Builder) Eval(ectx force.ExecutionContext, iface interface{}) (interface{}, error)
- func (b *Builder) Prune(ectx force.ExecutionContext) (interface{}, error)
- func (b *Builder) Push(ectx force.ExecutionContext, iface interface{}) (interface{}, error)
- func (b *Builder) Register(server *grpc.Server)
- func (b *Builder) Session(ctx force.ExecutionContext, img Image) (*session.Session, session.Dialer, error)
- type Config
- type Image
- type Namespace
- type NewBuild
- type NewPrune
- type NewPush
- type PruneAction
- type PushAction
- type Secret
- type Setup
Constants ¶
const ( // Key is a name of the github plugin variable Key = Namespace("builder") KeySetup = "Setup" KeyBuild = "Build" KeyPush = "Push" KeyPrune = "Prune" )
const ( // NativeBackend defines the native backend. NativeBackend = "native" // OverlayFSBackend defines the overlayfs backend. OverlayFSBackend = "overlayfs" // RuncExecutor is a name of runc directory executor RuncExecutor = "runc" // SessionName is a default session name SessionName = "img" // FrontendDockerfile is a name of the buildkit frontend FrontendDockerfile = "dockerfile.v0" )
const ( // CurrentDir is a notation for current dir CurrentDir = "." // Dockerfile is a standard dockerfile name Dockerfile = "Dockerfile" )
Variables ¶
This section is empty.
Functions ¶
func RuncBinaryExists ¶
RuncBinaryExists checks if the runc binary exists. TODO(jessfraz): check if it's the right version as well.
Types ¶
type Arg ¶
type Arg struct {
// Key is a build argument key
Key string
// Val is a build argument value
Val string
}
func (*Arg) CheckAndSetDefaults ¶
type BuildAction ¶
type BuildAction struct {
// contains filtered or unexported fields
}
BuildAction specifies biuldkit driven docker builds
func (*BuildAction) Eval ¶
func (b *BuildAction) Eval(ctx force.ExecutionContext) (interface{}, error)
Eval runs build process
func (*BuildAction) MarshalCode ¶
func (b *BuildAction) MarshalCode(ctx force.ExecutionContext) ([]byte, error)
MarshalCode marshals the action into code representation
func (*BuildAction) String ¶
func (b *BuildAction) String() string
func (*BuildAction) Type ¶
func (b *BuildAction) Type() interface{}
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a new container image builder
func (*Builder) Credentials ¶
func (b *Builder) Credentials(ctx context.Context, req *auth.CredentialsRequest) (*auth.CredentialsResponse, error)
func (*Builder) Eval ¶
func (b *Builder) Eval(ectx force.ExecutionContext, iface interface{}) (interface{}, error)
Eval runs build
func (*Builder) Prune ¶
func (b *Builder) Prune(ectx force.ExecutionContext) (interface{}, error)
Prune clears build cache
type Config ¶
type Config struct {
// Context is an execution context for the plugin setup
Context force.ExecutionContext `code:"-"`
// Group is a process group that this plugin sets up for
Group force.Group `code:"-"`
// GlobalContext is a base directory path for overlayfs other types
// of snapshotting
GlobalContext string
// Backend specifies build backend
Backend string
// SessionName is a default build session name
SessionName string
// Server is an optional registry server to login into
Server string
// Username is the registry username
Username string
// Secret is a registry secret
Secret string
// SecretFile is a path to registry secret file
SecretFile string
// Insecure turns off security for image pull/push
Insecure bool
}
Config specifies builder config
func (*Config) CheckAndSetDefaults ¶
CheckAndSetDefaults checks and sets default values
type Image ¶
type Image struct {
// Context is a path or URL to the bulid context
Context string
// Dockerfile is a path or the URL to the dockerfile
Dockerfile string
// Tag is a tag in the spec of image:tag (optional tag part)
Tag string
// NoCache turns off caching
NoCache bool
// Platforms is a list of target platforms
Platforms []string
// Target is the target build stage to build
Target string
// Secrets is a list of secrets
// mounted in the build container
Secrets []Secret
// Args is a list of the build arguments
Args []Arg
}
Image specifies docker image to build
func (*Image) CheckAndSetDefaults ¶
CheckAndSetDefaults checks and sets default values
type NewPrune ¶
type NewPrune struct {
}
NewPrune specifies prune action - cleaning up dangled leftovers from builds - images and tags, layers
type PruneAction ¶
type PruneAction struct {
// contains filtered or unexported fields
}
PruneAction prunes all leftover build layers and snapshots from the local storage
func (*PruneAction) Eval ¶
func (p *PruneAction) Eval(ctx force.ExecutionContext) (interface{}, error)
Eval runs prune action
func (*PruneAction) MarshalCode ¶
func (p *PruneAction) MarshalCode(ctx force.ExecutionContext) ([]byte, error)
MarshalCode marshals the action into code representation
func (*PruneAction) String ¶
func (p *PruneAction) String() string
func (*PruneAction) Type ¶
func (p *PruneAction) Type() interface{}
type PushAction ¶
type PushAction struct {
// contains filtered or unexported fields
}
PushAction returns new push actions
func (*PushAction) Eval ¶
func (p *PushAction) Eval(ctx force.ExecutionContext) (interface{}, error)
Eval pushes image to remote repository
func (*PushAction) MarshalCode ¶
func (p *PushAction) MarshalCode(ctx force.ExecutionContext) ([]byte, error)
MarshalCode marshals the action into code representation
func (*PushAction) String ¶
func (b *PushAction) String() string
func (*PushAction) Type ¶
func (p *PushAction) Type() interface{}
type Setup ¶
type Setup struct {
// contains filtered or unexported fields
}
Setup specifies builder plugins
func (*Setup) Eval ¶
func (n *Setup) Eval(ctx force.ExecutionContext) (interface{}, error)
Eval sets up plugin for the given process group
func (*Setup) MarshalCode ¶
func (n *Setup) MarshalCode(ctx force.ExecutionContext) ([]byte, error)
MarshalCode marshals plugin to code representation
func (*Setup) NewInstance ¶
NewInstance returns function creating new plugins based on configs