Documentation ¶
Index ¶
- func Build(topDir, workerImg llb.State, specPath string, opts ...llb.ConstraintsOpt) llb.State
- func Dalec2SourcesLLB(worker llb.State, spec *dalec.Spec, sOpt dalec.SourceOpts, ...) ([]llb.State, error)
- func Dalec2SpecLLB(spec *dalec.Spec, in llb.State, targetKey, dir string, ...) (llb.State, error)
- func HandleBuildroot(wf WorkerFunc) gwclient.BuildFunc
- func HandleDebug(wf WorkerFunc) gwclient.BuildFunc
- func HandleSources(wf WorkerFunc) gwclient.BuildFunc
- func HandleSpec() gwclient.BuildFunc
- func SpecHandler(ctx context.Context, client gwclient.Client, spec *dalec.Spec, ...) (*gwclient.Result, error)
- func SpecToBuildrootLLB(worker llb.State, spec *dalec.Spec, sOpt dalec.SourceOpts, targetKey string, ...) (llb.State, error)
- func ValidateSpec(spec *dalec.Spec) (out error)
- func WriteSpec(spec *dalec.Spec, target string, w io.Writer) error
- type WorkerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
Builds an RPM and source RPM from a spec
`topDir` is the rpmbuild top directory which should contain the SOURCES and SPECS directories along with any other necessary files
`workerImg` is the image to use for the build It is expected to have rpmbuild and any other necessary build dependencies installed
`specPath` is the path to the spec file to build relative to `topDir`
func Dalec2SourcesLLB ¶
func Dalec2SpecLLB ¶
func HandleBuildroot ¶ added in v0.3.0
func HandleBuildroot(wf WorkerFunc) gwclient.BuildFunc
func HandleDebug ¶ added in v0.3.0
func HandleDebug(wf WorkerFunc) gwclient.BuildFunc
HandleDebug returns a build function that adds support for some debugging targets for RPM builds.
func HandleSources ¶
func HandleSources(wf WorkerFunc) gwclient.BuildFunc
func HandleSpec ¶ added in v0.3.0
func SpecHandler ¶
func SpecToBuildrootLLB ¶
func SpecToBuildrootLLB(worker llb.State, spec *dalec.Spec, sOpt dalec.SourceOpts, targetKey string, opts ...llb.ConstraintsOpt) (llb.State, error)
SpecToBuildrootLLB converts a dalec.Spec to an rpm buildroot
func ValidateSpec ¶ added in v0.2.0
ValidateSpec makes sure all the necessary fields are present in the spec to make rpmbuild work This validation is specific to rpmbuild.
Types ¶
type WorkerFunc ¶ added in v0.3.0
type WorkerFunc func(resolver llb.ImageMetaResolver, spec *dalec.Spec, targetKey string, opts ...llb.ConstraintsOpt) (llb.State, error)