Documentation
¶
Index ¶
- type App
- type Build
- type BuildController
- type BuildManager
- func (b *BuildManager) BuildMaintenance() error
- func (b *BuildManager) CreateOrReturnStatusBuild(projectName string, sys string, commit string, deploy bool) (*Build, error)
- func (b *BuildManager) Deploy(build *Build)
- func (b *BuildManager) GetBuildByID(id string) (*Build, error)
- func (b *BuildManager) GetBuildsByProjects(projectName string) ([]Build, error)
- func (b *BuildManager) RetryBuild(build *Build)
- func (b *BuildManager) UpdateBuild(build *Build) error
- type DockerWorker
- type GerritManager
- type MailManager
- type Project
- type ProjectConfiguration
- type ProjectsController
- type ProjectsManager
- type ReviewManager
- type State
- type Worker
- type WorkerManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { ID bson.ObjectId `bson:"_id,omitempty"` Date time.Time StartDate time.Time LastUpdated time.Time ProjectToBuild Project TargetSys string State State Commit string UpdateWorkerDuration time.Duration Deploy bool GitCommitID string }
Build represent a build
func (*Build) CreateOutputTar ¶
CreateOutputTar the entire output folder
func (*Build) IsDeployable ¶
IsDeployable return if the build can be deployed
func (*Build) IsDownloadable ¶
IsDownloadable return true if downloadable
func (*Build) IsRetryable ¶
IsRetryable return true if we can retry a failed build
type BuildController ¶
type BuildController struct {
*revel.Controller
}
BuildController Controller
func (BuildController) Deploy ¶
func (c BuildController) Deploy() revel.Result
Deploy the built package
func (BuildController) Detail ¶
func (c BuildController) Detail() revel.Result
Detail of a build page
func (BuildController) Download ¶
func (c BuildController) Download() revel.Result
Download the build result
type BuildManager ¶
type BuildManager struct {
// contains filtered or unexported fields
}
BuildManager is the build manager
func (*BuildManager) BuildMaintenance ¶
func (b *BuildManager) BuildMaintenance() error
BuildMaintenance should be called in case build were not updated to there final state (e.g at start since no build should be in created, init or building state)
func (*BuildManager) CreateOrReturnStatusBuild ¶
func (b *BuildManager) CreateOrReturnStatusBuild(projectName string, sys string, commit string, deploy bool) (*Build, error)
CreateOrReturnStatusBuild create or return status of requested build
func (*BuildManager) GetBuildByID ¶
func (b *BuildManager) GetBuildByID(id string) (*Build, error)
GetBuildByID return a build by it's id
func (*BuildManager) GetBuildsByProjects ¶
func (b *BuildManager) GetBuildsByProjects(projectName string) ([]Build, error)
GetBuildsByProjects get list of projects builds
func (*BuildManager) RetryBuild ¶
func (b *BuildManager) RetryBuild(build *Build)
RetryBuild that failed
func (*BuildManager) UpdateBuild ¶
func (b *BuildManager) UpdateBuild(build *Build) error
UpdateBuild in DB
type DockerWorker ¶
type DockerWorker struct {
// contains filtered or unexported fields
}
DockerWorker Controller implementing Worker interface
type GerritManager ¶
type GerritManager struct {
// contains filtered or unexported fields
}
GerritManager for fetching changes
func (*GerritManager) GetOpenChanges ¶
func (g *GerritManager) GetOpenChanges() ([]string, error)
GetOpenChanges return open gerrit patchset for project TODO: Use the Mergable and title property ??
type MailManager ¶
type MailManager struct { }
MailManager is the mail manager
func (*MailManager) SendBuildFailedMail ¶
func (m *MailManager) SendBuildFailedMail(b Build)
SendBuildFailedMail send a mail in case of failed build
type Project ¶
type Project struct { Name string Configuration ProjectConfiguration ReviewManagerInstance ReviewManager `bson:"-"` }
Project struct
func (*Project) GetHeadCommitID ¶
GetHeadCommitID return the head commit id
type ProjectConfiguration ¶
type ProjectConfiguration struct { BuildType string BuildInstructions map[string][]string UpdateInstructions map[string][]string ReviewType string ReviewAddress string Package map[string]string ReloadProjectCmd []string AutoDeploySchedule map[string]string DeployScript string NotificationMailAdress []string }
ProjectConfiguration struct
type ProjectsController ¶
type ProjectsController struct {
*revel.Controller
}
ProjectsController struct
type ProjectsManager ¶
type ProjectsManager struct {
// contains filtered or unexported fields
}
ProjectsManager represent the project we want to compile
func (*ProjectsManager) GetProjectByName ¶
func (pm *ProjectsManager) GetProjectByName(name string) Project
GetProjectByName return a project by name
func (*ProjectsManager) GetProjectsList ¶
func (pm *ProjectsManager) GetProjectsList() []Project
GetProjectsList return list of projects
type ReviewManager ¶
ReviewManager interface
type WorkerManager ¶
type WorkerManager struct { }
WorkerManager singleton
func (*WorkerManager) Build ¶
func (w *WorkerManager) Build(build *Build) error
Build Launch a build Build queue is restricted by jobs.pool = 4 in app.conf (FIFO)