controllers

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builds

type Builds struct {
	// contains filtered or unexported fields
}

Builds --

func NewBuilds

func NewBuilds(db *gorm.DB, pc *Pipelines, notifyPipeline chan *models.Pipeline) *Builds

NewBuilds --

func (*Builds) BuildDependencies

func (c *Builds) BuildDependencies(build *models.Build) runnerCommon.Dependencies

BuildDependencies --

func (*Builds) BuildsForPipelineAndStage

func (c *Builds) BuildsForPipelineAndStage(pipelineID, stageIdx int64) []*models.Build

BuildsForPipelineAndStage --

func (*Builds) CreateFromPipeline

func (c *Builds) CreateFromPipeline(pipeline *models.Pipeline) error

CreateFromPipeline --

func (*Builds) DoUpdateState

func (c *Builds) DoUpdateState(build *models.Build, state string, failureReason *string) (*models.Build, error)

DoUpdateState --

func (*Builds) Enqueue

func (c *Builds) Enqueue(build *models.Build, lastStageState string, hadPreviousFailure bool)

Enqueue --

func (*Builds) ForRunner

func (c *Builds) ForRunner(runner *models.Runner) (*models.Build, error)

ForRunner --

func (*Builds) MapDependency

func (c *Builds) MapDependency(builds []models.Build) runnerCommon.Dependencies

MapDependency --

func (*Builds) NamedDependencies

func (c *Builds) NamedDependencies(build *models.Build, name string) runnerCommon.Dependencies

NamedDependencies --

func (*Builds) StartBuild

func (c *Builds) StartBuild(build *models.Build, runner *models.Runner) (*models.Build, error)

StartBuild --

func (*Builds) TransitionState

func (c *Builds) TransitionState(build *models.Build, state *string, failureReason *string, pipelineNotify bool) (*models.Build, error)

TransitionState --

func (*Builds) UpdateState

func (c *Builds) UpdateState(build *models.Build, state string, failureReason *string) (*models.Build, error)

UpdateState --

type LastState

type LastState struct {
	State        string
	AllowFailure bool
	IsLastStage  bool
}

LastState --

type MatrixBuild

type MatrixBuild struct {
	Name string
	Job  string
	Env  map[string]string
}

MatrixBuild --

type PipelineStats

type PipelineStats struct {
	Failed          int64
	Successful      int64
	Canceled        int64
	AllowedFailures int64
	OnFailure       int64
	Manual          int64
	Skipped         int64
}

PipelineStats --

type Pipelines

type Pipelines struct {
	// contains filtered or unexported fields
}

Pipelines --

func NewPipelines

func NewPipelines(db *gorm.DB) *Pipelines

NewPipelines --

func (*Pipelines) BuildsByState

func (p *Pipelines) BuildsByState(pipelineID int64) (*PipelineStats, error)

BuildsByState returns stats based on build states

func (*Pipelines) Cancel

func (p *Pipelines) Cancel(pipelineID int64) error

Cancel --

func (*Pipelines) DoCancel

func (p *Pipelines) DoCancel(pipelineID int64) error

DoCancel --

func (*Pipelines) Failed

func (p *Pipelines) Failed(pipelineID int64) error

Failed marks and handles the failure of a pipline

func (*Pipelines) Run

func (p *Pipelines) Run(pipeline *models.Pipeline) error

Run --

func (*Pipelines) Success

func (p *Pipelines) Success(pipelineID int64) error

Success marks and handles the success of a pipeline

func (*Pipelines) Update

func (p *Pipelines) Update(pipeline *models.Pipeline, updates map[string]interface{}) error

Update --

func (*Pipelines) UpdateState

func (p *Pipelines) UpdateState(pipelineID int64) error

UpdateState --

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL