v1

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvBuildExtraArgs = "BUILD_EXTRA_ARGS"
	EnvBuildArgPrefix = "BUILD_ARG_"
	// EnvBuildTags is a comma-separated list of
	// tags that should be added to the image. Tags
	// are only added on the trunk.
	EnvBuildTags = "BUILD_TAGS"
	// EnvBuildDockerfile dictates where Dockerfile-based recipes
	// should look for the Dockerfile
	EnvBuildDockerfile = "BUILD_DOCKERFILE"
	// EnvBuildGoImportPath dictates where Go-based recipes should
	// look for the main.go file
	EnvBuildGoImportPath = "BUILD_GO_IMPORTPATH"
	// EnvBuildImageParent dictates what the build tool should use as a base layer.
	// Some recipes (e.g. BuildKit) will ignore this.
	EnvBuildImageParent = "BUILD_IMAGE_PARENT"
	// EnvBuildSLSABuildType overrides the SLSA build type field.
	EnvBuildSLSABuildType = "BUILD_SLSA_BUILD_TYPE"

	// EnvBuildCacheEnabled dictates whether we should instruct build tools
	// to cache files. Disabling this may fix some problems at the cost of performance.
	EnvBuildCacheEnabled = "BUILD_CACHE_ENABLED"
	// EnvBuildCachePath describes the directory that
	// we should instruct build tools to store their temporary files.
	EnvBuildCachePath = "BUILD_CACHE_PATH"

	EnvDockerConfig = "DOCKER_CONFIG"
)
View Source
const (
	DefaultDockerfile = "Dockerfile"
	DefaultCacheName  = ".cache"
)

Variables

This section is empty.

Functions

func WriteDockerCFG

func WriteDockerCFG(ctx *BuildContext) error

Types

type BuildCache added in v1.3.0

type BuildCache struct {
	Enabled bool
	Path    string
}

type BuildContext

type BuildContext struct {
	Builder    string
	BuildID    string
	Root       string
	Context    string
	Image      ImageConfig
	Tags       []string
	FQTags     []string
	Dockerfile DockerfileConfig
	Go         GoConfig
	Repo       BuildRepo
	Cache      BuildCache
	StartTime  string
	Provider   string
	ConfigPath string
	ExtraArgs  []string
}

func (*BuildContext) Auth added in v1.5.1

func (c *BuildContext) Auth() ociutil.Auth

func (*BuildContext) DockerCFG

func (c *BuildContext) DockerCFG() string

func (*BuildContext) Normalise

func (c *BuildContext) Normalise()

type BuildRecipe

type BuildRecipe struct {
	DockerCFG bool              `yaml:"dockercfg,omitempty"`
	CD        bool              `yaml:"cd,omitempty"`
	Env       map[string]string `yaml:"env,omitempty"`
	Command   string            `yaml:"command"`
	Args      []string          `yaml:"args,omitempty"`
}

type BuildRepo added in v1.0.1

type BuildRepo struct {
	URL       string
	CommitSha string
	Ref       string
	Trunk     bool
}

type Dockerfile added in v1.4.2

type Dockerfile struct {
	Content DockerfileContent `yaml:"content"`
}

type DockerfileConfig

type DockerfileConfig struct {
	File string
	Args []string
}

type DockerfileContent added in v1.4.2

type DockerfileContent struct {
	Inline string `yaml:"inline,omitempty"`
	File   string `yaml:"file,omitempty"`
}

type GoConfig added in v1.2.1

type GoConfig struct {
	ImportPath string
}

type ImageConfig

type ImageConfig struct {
	Parent   string
	Base     string
	Name     string
	Registry string
	Username string
	Password string
}

type Recipes

type Recipes struct {
	Build       map[string]BuildRecipe `yaml:"build"`
	Dockerfiles map[string]Dockerfile  `yaml:"dockerfiles"`
}

func ReadConfiguration

func ReadConfiguration(path string, ctx *BuildContext) (*Recipes, error)

func ReadConfigurations added in v1.4.0

func ReadConfigurations(ctx *BuildContext, paths ...string) (*Recipes, error)

Jump to

Keyboard shortcuts

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