build

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 8 Imported by: 333

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateConfigFromLabels added in v1.0.1

func GenerateConfigFromLabels(config *api.Config, metadata *docker.PullResult) error

GenerateConfigFromLabels generates the S2I Config struct from the Docker image labels.

Types

type Builder

type Builder interface {
	Build(*api.Config) (*api.Result, error)
}

Builder is the interface that provides basic methods all implementation should have. Build method executes the build based on Request and returns the Result.

type Cleaner

type Cleaner interface {
	Cleanup(*api.Config)
}

Cleaner provides the Cleanup method for builders that need to cleanup temporary containers or directories after build execution finish.

func NewDefaultCleaner added in v1.0.9

func NewDefaultCleaner(fs fs.FileSystem, docker docker.Docker) Cleaner

NewDefaultCleaner creates a new instance of the default Cleaner implementation

type DefaultCleaner

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

DefaultCleaner provides a cleaner for most STI build use-cases. It cleans the temporary directories created by STI build and it also cleans the temporary Docker images produced by LayeredBuild

func (*DefaultCleaner) Cleanup

func (c *DefaultCleaner) Cleanup(config *api.Config)

Cleanup removes the temporary directories where the sources were stored for build.

type Downloader

type Downloader interface {
	Download(*api.Config) (*git.SourceInfo, error)
}

Downloader provides methods for downloading the application source code

type Ignorer added in v1.0.2

type Ignorer interface {
	Ignore(*api.Config) error
}

Ignorer provides ignore file processing on source tree NOTE: raised to this level for possible future extensions to support say both .gitignore and .dockerignore level functionality ( currently do .dockerignore)

type IncrementalBuilder

type IncrementalBuilder interface {
	Exists(*api.Config) bool
	Save(*api.Config) error
}

IncrementalBuilder provides methods that is used for builders that implements the 'incremental' build workflow. The Exists method checks if the artifacts from the previous build exists and if they can be used in the current build. The Save method stores the artifacts for the next build.

type LayeredDockerBuilder

type LayeredDockerBuilder interface {
	Builder
}

LayeredDockerBuilder represents a minimal Docker builder interface that is used to execute the layered Docker build with the application source.

type Overrides added in v1.0.3

type Overrides struct {
	Downloader Downloader
}

Overrides are interfaces that may be passed into build strategies to alter the behavior of a strategy.

type Preparer

type Preparer interface {
	Prepare(*api.Config) error
}

Preparer provides the Prepare method for builders that need to prepare source code before it gets passed to the build.

type ScriptsHandler

type ScriptsHandler interface {
	Execute(string, string, *api.Config) error
}

ScriptsHandler provides an interface for executing the scripts

type SourceHandler

type SourceHandler interface {
	Downloader
	Preparer
	Ignorer
}

SourceHandler is a wrapper for STI strategy Downloader and Preparer which allows to use Download and Prepare functions from the STI strategy.

Directories

Path Synopsis
sti

Jump to

Keyboard shortcuts

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