phase

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Handles triggering phases and checking their status.

Index

Constants

View Source
const (
	// Jobs are allowed 5 minutes grace time to report they have started
	MaxJobStartDelay = time.Minute * 5

	// Jobs must complete within 30 minutes of when they have started
	MaxJobRuntime = time.Minute * 30
)

Variables

This section is empty.

Functions

func AllJobsComplete

func AllJobsComplete(phaseType types.PhaseType, completedJobs []string) bool

func IsComplete

func IsComplete(phaseType types.PhaseType, completedJobs []string, extraChecks ...Completeable) bool

Types

type Completeable

type Completeable interface {
	IsComplete() bool
}

type PhaseServiceMock

type PhaseServiceMock struct {
	StartMock func(
		phaseType types.PhaseType, trainID,
		deliveryPhaseID, verificationPhaseID, deployPhaseID uint64, branch, sha string,
		buildUser *types.User) error
}

func (*PhaseServiceMock) Start

func (m *PhaseServiceMock) Start(
	phaseType types.PhaseType,
	trainID, deliveryPhaseID, verificationPhaseID, deployPhaseID uint64,
	branch, sha string,
	buildUser *types.User) error

type Service

type Service interface {
	Start(phaseType types.PhaseType, trainID,
		deliveryPhaseID, verificationPhaseID, deployPhaseID uint64, branch, sha string,
		buildUser *types.User) error
}

func GetService

func GetService() Service

Jump to

Keyboard shortcuts

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