cnbp2llb

package
v0.0.0-...-8df84b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

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

View Source
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

View Source
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.

View Source
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

View Source
const LauncherPath = "/cnb/lifecycle/launcher"

LauncherPath specifies the path to launcher executable. See https://github.com/buildpacks/spec/blob/main/platform.md#inputs-4

View Source
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

View Source
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

View Source
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

View Source
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

View Source
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

View Source
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

func Build(ctx context.Context, build cib.Service, restored llb.State) llb.State

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

func Detect(ctx context.Context, build cib.Service, env llb.State) llb.State

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.

func Restore

func Restore(ctx context.Context, build cib.Service, analyzed llb.State, cache llb.RunOption) llb.State

Restore desired cached artefacts from the previous build.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL