diff --git a/internal/services/gateway/api/run.go b/internal/services/gateway/api/run.go index 37a90d9..e6a866a 100644 --- a/internal/services/gateway/api/run.go +++ b/internal/services/gateway/api/run.go @@ -110,17 +110,32 @@ func createRunTaskResponse(rt *rstypes.RunTask, rct *rstypes.RunConfigTask) *gwa EndTime: rt.Steps[i].EndTime, } rcts := rct.Steps[i] + rts := rt.Steps[i] switch rcts := rcts.(type) { case *rstypes.RunStep: + s.Type = "run" s.Name = rcts.Name s.Command = rcts.Command + + shell := rcts.Shell + if shell == "" { + shell = rct.Shell + } + s.Shell = shell + + s.ExitStatus = rts.ExitStatus + case *rstypes.SaveToWorkspaceStep: + s.Type = "save_to_workspace" s.Name = "save to workspace" case *rstypes.RestoreWorkspaceStep: + s.Type = "restore_workspace" s.Name = "restore workspace" case *rstypes.SaveCacheStep: + s.Type = "save_cache" s.Name = "save cache" case *rstypes.RestoreCacheStep: + s.Type = "restore_cache" s.Name = "restore cache" } diff --git a/services/gateway/api/types/run.go b/services/gateway/api/types/run.go index bf36181..0996f51 100644 --- a/services/gateway/api/types/run.go +++ b/services/gateway/api/types/run.go @@ -97,8 +97,12 @@ type RunTaskResponseSetupStep struct { type RunTaskResponseStep struct { Phase rstypes.ExecutorTaskPhase `json:"phase"` + Type string `json:"type"` Name string `json:"name"` Command string `json:"command"` + Shell string `json:"shell"` + + ExitStatus *int `json:"exit_status"` StartTime *time.Time `json:"start_time"` EndTime *time.Time `json:"end_time"`