Let pipeline-compiler export step types (#1958)

This commit is contained in:
6543
2023-07-11 15:53:05 +02:00
committed by GitHub
parent fe7eb64bf9
commit b54f6ebad6
13 changed files with 100 additions and 32 deletions

View File

@@ -47,6 +47,7 @@ type Step struct {
ExitCode int `json:"exit_code" xorm:"step_exit_code"`
Started int64 `json:"start_time,omitempty" xorm:"step_started"`
Stopped int64 `json:"end_time,omitempty" xorm:"step_stopped"`
Type StepType `json:"type,omitempty" xorm:"step_type"`
} // @name Step
type UpdateStepStore interface {
@@ -67,3 +68,14 @@ func (p *Step) Running() bool {
func (p *Step) Failing() bool {
return p.Failure == FailureFail && (p.State == StatusError || p.State == StatusKilled || p.State == StatusFailure)
}
// StepType identifies the type of step
type StepType string // @name StepType
const (
StepTypeClone StepType = "clone"
StepTypeService StepType = "service"
StepTypePlugin StepType = "plugin"
StepTypeCommands StepType = "commands"
StepTypeCache StepType = "cache"
)