build

package
v0.5.61 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const TypeBuild string = "build"

TypeBuild builds containers and other resources

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	// embedded type holding name, etc
	types.ResourceMetadata `hcl:",remain"`

	Container BuildContainer `hcl:"container,block" json:"container"`

	// Outputs allow files or directories to be copied from the container
	Outputs []Output `hcl:"output,block" json:"outputs"`

	Registries []container.Image `hcl:"registry,block" json:"registries"` // Optional registry to push the image to

	// Image is the full local reference of the built image
	Image string `hcl:"image,optional" json:"image"`

	// Checksum is calculated from the Context files
	BuildChecksum string `hcl:"build_checksum,optional" json:"build_checksum,omitempty"`
}

func (*Build) Process

func (b *Build) Process() error

type BuildContainer

type BuildContainer struct {
	DockerFile string            `hcl:"dockerfile,optional" json:"dockerfile,omitempty"` // Location of build file inside build context defaults to ./Dockerfile
	Context    string            `hcl:"context" json:"context"`                          // Path to build context
	Ignore     []string          `hcl:"ignore,optional" json:"ignore,omitempty"`         // Files to ignore in the build context, this is the same as .dockerignore
	Args       map[string]string `hcl:"args,optional" json:"args,omitempty"`             // Build args to pass  to the container
}

type Output added in v0.5.40

type Output struct {
	Source      string `hcl:"source" json:"source"`           // Source file or directory in container
	Destination string `hcl:"destination" json:"destination"` // Destination for copied file or directory
}

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Null is a noop provider

func (*Provider) Changed

func (b *Provider) Changed() (bool, error)

func (*Provider) Create

func (b *Provider) Create() error

func (*Provider) Destroy

func (b *Provider) Destroy() error

func (*Provider) Init

func (b *Provider) Init(cfg htypes.Resource, l sdk.Logger) error

NewBuild creates a null noop provider

func (*Provider) Lookup

func (b *Provider) Lookup() ([]string, error)

func (*Provider) Refresh

func (b *Provider) Refresh() error

type Registry added in v0.5.60

type Registry struct {
}

Jump to

Keyboard shortcuts

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