Skip to content

Commit

Permalink
fix(worker): use exported variables in further step
Browse files Browse the repository at this point in the history
without cds.build if not worker export

Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
  • Loading branch information
yesnault committed Jan 21, 2020
1 parent 251a06d commit 6316a18
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions engine/worker/internal/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (w *CurrentWorker) runJob(ctx context.Context, a *sdk.Action, jobID int64,

for _, newVariable := range stepResult.NewVariables {
// append the new variable from a step to the following steps
w.currentJob.params = append(w.currentJob.params, newVariable.ToParameter("cds.build"))
w.currentJob.params = append(w.currentJob.params, newVariable.ToParameter(""))
// Propagate new variables from step result to jobs result
w.currentJob.newVariables = append(w.currentJob.newVariables, newVariable)
}
Expand Down Expand Up @@ -283,9 +283,7 @@ func (w *CurrentWorker) runSteps(ctx context.Context, steps []sdk.Action, a sdk.

for _, newVariable := range r.NewVariables {
// append the new variable from a chile to the following children
w.currentJob.params = append(w.currentJob.params, newVariable.ToParameter("cds.build"))
// Propagate new variables from child result to action
r.NewVariables = append(r.NewVariables, newVariable)
w.currentJob.params = append(w.currentJob.params, newVariable.ToParameter(""))
}
}

Expand Down

0 comments on commit 6316a18

Please sign in to comment.