Skip to content

Commit

Permalink
fix(exec): make sure to call StreamBuild (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3r authored Aug 1, 2022
1 parent 0588d20 commit c475ef4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion action/pipeline/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ func (c *Config) Exec(client compiler.Engine) error {
}

// create a background context
ctx := context.Background()
ctx, done := context.WithCancel(context.Background())
defer done()

defer func() {
// destroy the build with the executor
Expand All @@ -140,6 +141,17 @@ func (c *Config) Exec(client compiler.Engine) error {
return fmt.Errorf("unable to plan build: %w", err)
}

// log/event streaming
go func() {
logrus.Debug("streaming build logs")
// start process to handle StreamRequests
// from Steps and Services
err = _executor.StreamBuild(ctx)
if err != nil {
logrus.Errorf("unable to stream build logs: %v", err)
}
}()

// assemble the build with the executor
err = _executor.AssembleBuild(ctx)
if err != nil {
Expand Down

0 comments on commit c475ef4

Please sign in to comment.