build

package
Version: v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultUserEnvFile represents the default file where the user environment variables are saved
	DefaultUserEnvFile = ".heronci.env"
)

Variables

This section is empty.

Functions

func GetDockerfileWriterFunc

func GetDockerfileWriterFunc(
	userOptions *config.UserOptions,
	buildID cidocker.BuildID,
	buildOS buildos.BuildOS,
	myBaton *baton.Baton) ciutil.OnWriterFunc

GetDockerfileWriterFunc creates a writer function to write to a dockerfile

func GetEnvFileWriterFunc

func GetEnvFileWriterFunc(userOptions *config.UserOptions, myBaton *baton.Baton) ciutil.OnWriterFunc

GetEnvFileWriterFunc returns a WriterFunc to write env files

func GetImageBuildOptions

func GetImageBuildOptions(myConfig *config.Config, tag string) *types.ImageBuildOptions

GetImageBuildOptions retrieves the image build options for the build cycle

func NewPipeline

func NewPipeline(createDockerClientFunc cidocker.CreateDockerClientFunc) pipelines.Pipeline

NewPipeline creates a new docker based build platform

func OnBuildDir

func OnBuildDir(myConfig *config.Config, buildID cidocker.BuildID, buildOS buildos.BuildOS, localBaton *baton.Baton) ciutil.OnDirFunc

OnBuildDir creates files in the buildRoot

func SourceEnvVariables

func SourceEnvVariables(buildOS buildos.BuildOS, envFile string) ciutil.OnWriterFunc

SourceEnvVariables sources for environment variables from a given file

func WriteAllCommands

func WriteAllCommands(userOptions *config.UserOptions, superUser string, buildUser string) ciutil.OnWriterFunc

WriteAllCommands writes both the super user commands and the build user commands as well

func WriteBaseImage

func WriteBaseImage(buildID cidocker.BuildID) ciutil.OnWriterFunc

WriteBaseImage writes the 'FROM' clause in the same

func WriteCommands

func WriteCommands(commands []string, user string) ciutil.OnWriterFunc

WriteCommands concatenates the commands and writes them as a single RUN command after switching to the user specified

func WriteComments

func WriteComments() ciutil.OnWriterFunc

WriteComments initially in the dockerfile

func WriteEnvVariables

func WriteEnvVariables(variables []config.EnvVariable) ciutil.OnWriterFunc

WriteEnvVariables writes the user environment variables

func WriteSystemEnvVariables

func WriteSystemEnvVariables(myBaton *baton.Baton) ciutil.OnWriterFunc

WriteSystemEnvVariables writes the system environment variables

func WriteUser

func WriteUser(user string) ciutil.OnWriterFunc

WriteUser writes the USER clause in the Dockerfile

func WriteWorkingDir

func WriteWorkingDir(baseDirectory string, projectRoot string) ciutil.OnWriterFunc

Types

type Pipeline

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

Pipeline represents a docker based build platform

func (*Pipeline) GetNames

func (pipeline *Pipeline) GetNames() (key string, longName string)

GetNames returns the names of the pipelines . Returns a tuple , a key and a long descriptive name

func (*Pipeline) Run

func (pipeline *Pipeline) Run(config *config.Config, buildID cidocker.BuildID, buildOS buildos.BuildOS, myBaton *baton.Baton) pipelines.PipelineRunReturnFunc

Run builds the commands inside a given container

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL