Documentation ¶
Overview ¶
Package cnbp2llb provides a BuildKit-based platform for running Cloud Native Buildpacks. See https://github.com/buildpacks/spec/blob/main/platform.md
Index ¶
- Constants
- func Analyze(ctx context.Context, build cib.Service, env llb.State, detected llb.State, ...) llb.State
- func Build(ctx context.Context, build cib.Service, restored llb.State) llb.State
- func BuildEnvironment(ctx context.Context, build cib.Service, platform *specs.Platform, ...) (state llb.State, err error)
- func Detect(ctx context.Context, build cib.Service, env llb.State) llb.State
- func Export(ctx context.Context, build cib.Service, built llb.State, cache llb.RunOption) (ref client.Reference, img *dockerfile2llb.Image, err error)
- func Restore(ctx context.Context, build cib.Service, analyzed llb.State, ...) llb.State
Constants ¶
const AppDir = "/workspace"
AppDir specifies the default value for the path to application directory. See https://github.com/buildpacks/spec/blob/main/platform.md#inputs
const CacheDir = "/cache"
CacheDir specifies the default path to the cache directory. This value isn't defined by the spec, but is commonly used in platform implementations.
const GroupPath = "group.toml"
GroupPath specifies the default value for the output group definition. See https://github.com/buildpacks/spec/blob/main/platform.md#inputs
const LauncherPath = "/cnb/lifecycle/launcher"
LauncherPath specifies the path to launcher executable. See https://github.com/buildpacks/spec/blob/main/platform.md#inputs-4
const LayersDir = "/layers"
LayersDir specifies the default value for the path to layers directory. See https://github.com/buildpacks/spec/blob/main/platform.md#inputs
const MetadataPath = "config/metadata.toml"
MetadataPath specifies the path for the build metadata. See https://github.com/buildpacks/spec/blob/main/platform.md#outputs-4
const PlanPath = "plan.toml"
PlanPath specifies the default value for the output resolved build plan. See https://github.com/buildpacks/spec/blob/main/platform.md#inputs
const PlatformAPI = "0.5"
PlatformAPI specifies the version of API that this platform supports. See https://github.com/buildpacks/spec/blob/main/platform.md#platform-api-compatibility
const PlatformDir = "/platform"
PlatformDir specifies the default value for the path to platform directory. See https://github.com/buildpacks/spec/blob/main/platform.md#inputs
const StackPath = "/cnb/stack.toml"
StackPath specifies the default value for the path to stack file. See https://github.com/buildpacks/spec/blob/main/platform.md#inputs-4
Variables ¶
This section is empty.
Functions ¶
func Analyze ¶
func Analyze(ctx context.Context, build cib.Service, env llb.State, detected llb.State, cache llb.RunOption) llb.State
Analyze if there're any artefacts to reuse from the previous build.
func Build ¶
Build the project with the provided parameters. Transforms application source code into runnable artifacts that can be packaged into a container.
func BuildEnvironment ¶
func BuildEnvironment(ctx context.Context, build cib.Service, platform *specs.Platform, builder string) (state llb.State, err error)
BuildEnvironment sets up the build environment by loading the builder image, source code and setting appropriate environment variables.
func Detect ¶
Detect if given builder supports the project. Finds an ordered group of buildpacks to use during the build phase.
func Export ¶
func Export(ctx context.Context, build cib.Service, built llb.State, cache llb.RunOption) (ref client.Reference, img *dockerfile2llb.Image, err error)
Export the produced layers into an OCI image. Unlike other high-level functions in this package, we have to manage the export manually (without lifecycle) to fit in with the BuildKit model of the world.
Types ¶
This section is empty.