Documentation
¶
Index ¶
Constants ¶
const DefaultContainerImage = "yourbase/yb_ubuntu:18.04"
DefaultContainerImage is the Docker image used when none is specified.
const DefaultExecEnvironment = "default"
DefaultExecEnvironment is the name of the execution environment variable set that should be used when no options are given to yb exec.
const DefaultTarget = "default"
DefaultTarget is the name of the target that should be built when no arguments are given to yb build.
const PackageConfigFilename = ".yourbase.yml"
PackageConfigFilename is the name of the file at the base of a package directory containing the package's configuration.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildpackSpec ¶
type BuildpackSpec string
BuildpackSpec is a buildpack specifier, consisting of a name and a version.
func ParseBuildpackSpec ¶
func ParseBuildpackSpec(s string) (BuildpackSpec, error)
ParseBuildpackSpec validates a buildpack specifier string.
func (BuildpackSpec) Name ¶
func (spec BuildpackSpec) Name() string
func (BuildpackSpec) Version ¶
func (spec BuildpackSpec) Version() string
type EnvTemplate ¶ added in v0.6.0
type EnvTemplate string
EnvTemplate is an expression for an environment variable value. It's mostly a literal string, but may include substitutions for container IP addresses in the form `{{ .Containers.IP "mycontainer" }}`.
type Package ¶
type Package struct { // Name is the name of the package directory. Name string // Path is the absolute path to the package directory. Path string // Targets is the set of targets in the package, keyed by target name. Targets map[string]*Target // ExecEnvironments is the set of targets representing the exec phase // in the configuration, keyed by environment name. ExecEnvironments map[string]*Target }
Package is a parsed build configuration (from .yourbase.yml).
func LoadPackage ¶
LoadPackage loads the package for the given .yourbase.yml file.
type ResourceDefinition ¶ added in v0.6.0
type ResourceDefinition struct { narwhal.ContainerDefinition HealthCheckTimeout time.Duration }
type Target ¶ added in v0.6.0
type Target struct { Name string Package *Package Deps map[*Target]struct{} Tags map[string]string // Container specifies the container environment that should be used to run // the commands in if container execution is requested. It will never be nil. Container *narwhal.ContainerDefinition // UseContainer indicates whether this target requires executing the commands // inside a container. UseContainer bool Commands []string RunDir string Env map[string]EnvTemplate Buildpacks map[string]BuildpackSpec Resources map[string]*ResourceDefinition }
A Target is a buildable unit.
func BuildOrder ¶ added in v0.6.0
BuildOrder returns a topological sort of the targets needed to build the given target(s). If a single argument is passed, then the last element in the returned slice is always the argument.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
internal
|
|
biome
Package biome provides an API for interacting with build environments.
|
Package biome provides an API for interacting with build environments. |
biome/replay
Package replay provides a biome that records all events to an underlying biome and then allows replaying those command invocations later.
|
Package replay provides a biome that records all events to an underlying biome and then allows replaying those command invocations later. |
build
Package build provides the algorithm for building yb targets.
|
Package build provides the algorithm for building yb targets. |
ybdata
Package ybdata locates directories the user has designated or conventionally uses for storing different types of data.
|
Package ybdata locates directories the user has designated or conventionally uses for storing different types of data. |