Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrOSNotSupported indicates that the given OS is not supported yet ErrOSNotSupported = errors.New("OS Not supported") )
Functions ¶
This section is empty.
Types ¶
type BuildSettings ¶
type BuildSettings struct { // BuildDirectory represents the base directory in which the build happens BuildDirectory string // CPUSetCPUs represents the CPUs in which this execution must happen. Eg: 0-3,0,1. // More Example: https://docs.docker.com/engine/reference/run/#cpuset-constraint CPUSetCPUs string // https://docs.docker.com/engine/reference/run/#cpu-share-constraint CPUShares int64 }
BuildSettings represents the settings necessary for build environment
func NewBuildSettings ¶
func NewBuildSettings() *BuildSettings
NewBuildSettings creates a new environment
type Config ¶
type Config struct { UserOptions *UserOptions Settings *BuildSettings UserProfile *UserProfile }
Config is an abstraction of config needed by CI build environment
type EnvVariable ¶
EnvVariable represents a single environment variable
func NewEnvVariable ¶
func NewEnvVariable(key string, value string) *EnvVariable
NewEnvVariable creates a new environment variable given the key and values
type UserOptions ¶
type UserOptions struct { // BaseImage represents the base docker image for building this BaseImage string //BaseBuildDirectory represents the directory under which build happens BaseBuildDirectory string //Env represents the Environment variables as specified by the user Env []EnvVariable // RootCommands represents the list of commands as executed by root RootCommands []string // Commands represents the name of the commands as executed the BuildUser Commands []string // ArchiveDirectories represents the list of directories that needs to be archived for faster compilation ArchiveDirectories []string // BuildUserPresent represents the flag to check if the build user is already present , as a hint to speed up the build BuildUserPresent bool }
UserOptions represents the options as given by the user directly
func NewUserOptions ¶
func NewUserOptions() *UserOptions
NewUserOptions creates a set of new UserOptions
type UserProfile ¶ added in v0.4.5
type UserProfile struct { // Memory represents the memory that can be allocated to this container Memory int64 // NumCPU represents the number of CPU allotted to this user NumCPU int64 }
UserProfile represents the profile of the user on that platform including their preference
func NewUserProfile ¶ added in v0.4.5
func NewUserProfile() *UserProfile
NewUserProfile creates a new UserProfile
Click to show internal directories.
Click to hide internal directories.