Documentation ¶
Index ¶
Constants ¶
const ( // This is the key name that we use to store the sha of the script we // download in the layer metadata, which is used to determine if the conda // layer can be resued on during a rebuild. DepKey = "dependency-sha" )
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build( dependencyManager DependencyManager, runner Runner, sbomGenerator SBOMGenerator, logger scribe.Emitter, clock chronos.Clock, ) packit.BuildFunc
Build will return a packit.BuildFunc that will be invoked during the build phase of the buildpack lifecycle.
Build will find the right miniconda dependency to download, download it into a layer, run the miniconda script to install conda into a separate layer and generate Bill-of-Materials. It also makes use of the checksum of the dependency to reuse the layer when possible.
func Detect ¶
func Detect() packit.DetectFunc
Detect will return a packit.DetectFunc that will be invoked during the detect phase of the buildpack lifecycle.
Detection always passes, and will contribute a Build Plan that provides conda.
func GetEnvOrDefault ¶ added in v0.10.0
Types ¶
type DependencyManager ¶
type DependencyManager interface { Resolve(path, id, version, stack string) (postal.Dependency, error) Deliver(dependency postal.Dependency, cnbPath, destinationPath, platformPath string) error GenerateBillOfMaterials(dependencies ...postal.Dependency) []packit.BOMEntry }
DependencyManager defines the interface for picking the best matching dependency and installing it.
type Executable ¶
Executable defines the interface for invoking an executable.
type Runner ¶
Runner defines the interface for invoking the miniconda script downloaded as a dependency.
type SBOMGenerator ¶ added in v0.4.0
type ScriptRunner ¶
type ScriptRunner struct {
// contains filtered or unexported fields
}
ScriptRunner implements the Runner interface
func NewScriptRunner ¶
func NewScriptRunner(executable Executable) ScriptRunner
NewScriptRunner creates an instance of the ScriptRunner given an Executable that runs `bash`.
func (ScriptRunner) Run ¶
func (s ScriptRunner) Run(runPath, condaLayerPath string) error
Run invokes the miniconda script located in the given runPath, which installs conda into the a layer path designated by condaLayerPath.