feat: task can report step and final result

This commit is contained in:
fuxiaohei authored and Jason Song committed 2022-11-24 15:37:14 +08:00
1 parent 9be39b8cd4
commit 6030610c04
7 files changed
+219 -36

No files matched your search

+2 -5
View File
@@ -29,10 +29,7 @@ func (s *Runner) Run(ctx context.Context, stage *runnerv1.Stage) error {
WithField("runner.BuildID", stage.BuildId)
l.Info("start running pipeline")
// TODO: docker runner with stage data
// task.Run is blocking, so we need to use goroutine to run it in background
// return task metadata and status to the server
task := NewTask()
return task.Run(ctx)
// TODO: use ctx to transfer usage information
return startTask(stage.BuildId, ctx)
}