Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // BuilderLog is used to log messages of the builder module BuilderLog *log.Entry // ServiceLog is used to log messages of the web-service module ServiceLog *log.Entry )
var DefaultConfig = `` /* 192-byte string literal not displayed */
DefaultConfig contains the default server configuration in YAML format.
Functions ¶
func GenerateTmpDirName ¶
func GenerateTmpDirName() string
GenerateTmpDirName will generate a 10-character random string to be used as a temp dir in the workspace directory.
Types ¶
type Config ¶
type Config struct { Port int `yaml:"port"` // The port the service will use BasePath string `yaml:"base_path"` // The base path for the hooks RecipesFilePath string `yaml:"recipes_file_path"` WorkspacePath string `yaml:"workspace_path"` BuilderHostname string `yaml:"builder_hostname"` TaskQueueSize int `yaml:"task_queue_size"` CleanupBuilds bool `yaml:"cleanup_builds"` }
The Config stores the current server configuration. There are default values for each property but it's meant to be customized through a YAML file.
func LoadConfig ¶
func LoadConfig() *Config
LoadConfig reads the configuration file and stores the data in related struct
type Recipe ¶
type Recipe struct { Repository Repository `yaml:"repository"` Command string `yaml:"command"` }
Recipe has a repo that is used to checkout the code and a command used to build it.
func (Recipe) IsHostedIn ¶
IsHostedIn checks if the repo resides (hosted) on a specific git service by checking the URL.
type Recipes ¶
Recipes is the container struct for all the available recipes to the system
func GetRecipes ¶
func GetRecipes() *Recipes
GetRecipes provides the current recipes configuration object
func LoadRecipes ¶
func LoadRecipes() *Recipes
LoadRecipes reads the recipes file and stores the config in the related data structure
type Repository ¶
type Repository struct { Name string `yaml:"name"` Branch string `yaml:"branch"` URL string `yaml:"url"` SSH *struct { KeyFile string `yaml:"keyfile"` // The environment variable that contains // the password PasswdEnv *string `yaml:"passenv"` } `yaml:"ssh"` VCS string `yaml:"vcs"` }
Repository represents a code repo used in the building process