Documentation ¶
Index ¶
Constants ¶
View Source
const TEMPDIR string = "/tmp/"
Variables ¶
This section is empty.
Functions ¶
func StartRunner ¶
Types ¶
type CIConfig ¶
type CIConfig struct { Name string `yaml:"name"` ImageName string `yaml:"image"` Env map[string]string `yaml:"env,omitempty"` Steps []struct { Name string `yaml:"name"` Dependencies []string `yaml:"dependencies,omitempty"` Cmd string `yaml:"command"` } `yaml:"steps"` }
CI configuration to be read from the file system on the cloned repository. For now it's queit simple: - A name - An image for the container to be used - Some environments variables - A list of steps to execute
- A name of the step
- Dependencies needed by the execution to be installed
- The command to execute
func LoadCIConfigFromFile ¶
type Commit ¶
type Commit struct { Id string `json:"id"` Timestamp time.Time `json:"timestamp"` Language string `json:"language"` Repository Repository `json:"repository"` }
func (*Commit) GetRepositoryName ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(commitQueue string, interval time.Duration, runners []RunnerProxy) *Dispatcher
func (*Dispatcher) Consume ¶
func (d *Dispatcher) Consume() error
type HeartBeatRequest ¶
type HeartBeatRequest struct{}
type HeartBeatResponse ¶
type HeartBeatResponse struct {
Alive bool
}
type HostingService ¶
type HostingService string
const ( GitHub HostingService = "github" BitBucket HostingService = "bitbucket" GitLab = "gitlab" )
type Repository ¶
type Repository struct { HostingService HostingService `json:"hosting_service"` Name string `json:"name"` Branch string `json:"branch"` }
func (Repository) CloneCommand ¶
func (r Repository) CloneCommand(path string) (string, error)
type Runner ¶
type Runner struct{}
func (*Runner) HeartBeat ¶
func (r *Runner) HeartBeat(req HeartBeatRequest, res *HeartBeatResponse) error
func (*Runner) RunCommitJob ¶
func (r *Runner) RunCommitJob(req RunnerRequest, res *RunnerResponse) error
type RunnerProxy ¶
func NewRunnerProxy ¶
func NewRunnerProxy(addr string) *RunnerProxy
func (RunnerProxy) String ¶
func (p RunnerProxy) String() string
type RunnerRequest ¶
type RunnerRequest struct {
CommitJob Commit
}
type RunnerResponse ¶
type RunnerResponse struct {
Response string
}
Click to show internal directories.
Click to hide internal directories.