build

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package build provides the algorithm for building yb targets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, sys Sys, target *Phase) (err error)

Execute runs the given phase. It assumes that the phase's dependencies are already available in the biome.

func Setup

func Setup(ctx context.Context, sys Sys, phase *PhaseDeps) (_ biome.BiomeCloser, err error)

Setup arranges for the phase's dependencies to be available, returning a new biome that has the dependencies configured. It is the caller's responsibility to call Close on the returned biome.

Types

type Phase

type Phase struct {
	TargetName string
	Commands   []string
	Root       string
}

Phase is a sequence of commands to run to accomplish an outcome.

TODO(ch2285): This should be moved out of this package and into a separate loader package.

type PhaseDeps

type PhaseDeps struct {
	TargetName string
	Buildpacks []yb.BuildpackSpec
	Resources  map[string]*narwhal.ContainerDefinition

	// EnvironmentTemplate is the set of environment variables that should be set
	// in the biome. These variables may include substitutions for container IP
	// addresses in the form `{{ .Containers.IP "mycontainer" }}`.
	EnvironmentTemplate map[string]string
}

PhaseDeps defines the dependencies for a build target phase.

TODO(ch2285): This should be moved out of this package and into a separate loader package.

type Sys

type Sys = buildpack.Sys

Sys holds dependencies provided by the caller needed to run builds.

Jump to

Keyboard shortcuts

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