builder

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package builder implement local build process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder executes build steps specified via "build" field in the manifest.

func New

func New() (*Builder, error)

New initializes a builder, allocating a temp directory for it.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, m *manifest.Manifest) (*fileset.Set, error)

Build executes all local builds steps specified in the manifest.

The result of this process is a fileset.Set with m.ContextDir and outputs of all build steps. Note that Builder is oblivious of Dockerfile or any other docker specifics. It just executes local steps specified via "build" field in the manifest.

The returned fileset should not outlive Builder, since it may reference temporary files owned by Builder.

func (*Builder) Close

func (b *Builder) Close() error

Close removes all temporary files held by this Builder.

Closing the builder invalidates all outputs it ever produced, thus this should be done only after outputs are processed.

Idempotent.

Jump to

Keyboard shortcuts

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