Documentation ¶
Index ¶
Constants ¶
View Source
const ( JobStageTest = "test" JobStageDeploy = "deploy" )
Job stage constants
Variables ¶
This section is empty.
Functions ¶
func GenerateGlobalEnv ¶
GenerateGlobalEnv generates global env variables.
Types ¶
type BranchesConfig ¶
BranchesConfig defines structure for branches config in .abstruse.yml file.
type ConfigParser ¶
type ConfigParser struct { Raw string Branch string Parsed RepoConfig Env []string Mount []string }
ConfigParser defines repository configuration parser.
func NewConfigParser ¶
func NewConfigParser(raw, branch string, env []string, mount []string) ConfigParser
NewConfigParser returns new config parser instance.
func (*ConfigParser) Parse ¶
func (c *ConfigParser) Parse() ([]*JobConfig, error)
Parse parses raw config.
func (*ConfigParser) ShouldBuild ¶
func (c *ConfigParser) ShouldBuild() bool
ShouldBuild checks if build should be triggered considering the test and ignore branches configuration.
type JobConfig ¶
type JobConfig struct { Image string `json:"image"` Env []string `json:"env"` Mount string `json:"mount"` Stage string `json:"stage"` Title string `json:"title"` Commands *api.CommandList `json:"commands"` Cache []string `json:"cache"` }
JobConfig represents generated job configuration.
type MatrixConfig ¶
MatrixConfig defines structure for matrix job config in .abstruse.yml file.
type RepoConfig ¶
type RepoConfig struct { Image string `yaml:"image"` Branches BranchesConfig `yaml:"branches"` Matrix []MatrixConfig `yaml:"matrix"` BeforeInstall []string `yaml:"before_install"` Install []string `yaml:"install"` BeforeScript []string `yaml:"before_script"` Script []string `yaml:"script"` AfterSuccess []string `yaml:"after_success"` AfterFailure []string `yaml:"after_failure"` BeforeDeploy []string `yaml:"before_deploy"` Deploy []string `yaml:"deploy"` AfterDeploy []string `yaml:"after_deploy"` AfterScript []string `yaml:"after_script"` Cache []string `yaml:"cache"` }
RepoConfig defines structure for .abstruse.yml configuration files.
Click to show internal directories.
Click to hide internal directories.