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

@@ -44,3 +44,14 @@ const (
LogEntryMetadata
LogEntryProgress
)
// StepType identifies the type of step
type StepType string
const (
StepTypeClone StepType = "clone"
StepTypeService StepType = "service"
StepTypePlugin StepType = "plugin"
StepTypeCommands StepType = "commands"
StepTypeCache StepType = "cache"
)

View File

@@ -108,15 +108,16 @@ type (
// Step represents a process in the pipeline.
Step struct {
ID int64 `json:"id"`
PID int `json:"pid"`
PPID int `json:"ppid"`
Name string `json:"name"`
State string `json:"state"`
Error string `json:"error,omitempty"`
ExitCode int `json:"exit_code"`
Started int64 `json:"start_time,omitempty"`
Stopped int64 `json:"end_time,omitempty"`
ID int64 `json:"id"`
PID int `json:"pid"`
PPID int `json:"ppid"`
Name string `json:"name"`
State string `json:"state"`
Error string `json:"error,omitempty"`
ExitCode int `json:"exit_code"`
Started int64 `json:"start_time,omitempty"`
Stopped int64 `json:"end_time,omitempty"`
Type StepType `json:"type,omitempty"`
}
// Registry represents a docker registry with credentials.