mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
feat: interpolate the step names (#1422)
* feat: interpolate the step names Step names could contain expressions refering to event data. Fixes #1353 * test: add missing mock data * fix: setup composite expression evaluator The RunContext does contain a cached ExpressionEvaluator. This should be the case the composite RunContext as well. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
parent
082dbde25c
commit
49b7141194
7 changed files with 19 additions and 4 deletions
|
@ -133,7 +133,7 @@ func newJobExecutor(info jobInfo, sf stepFactory, rc *RunContext) common.Executo
|
|||
|
||||
func useStepLogger(rc *RunContext, stepModel *model.Step, stage stepStage, executor common.Executor) common.Executor {
|
||||
return func(ctx context.Context) error {
|
||||
ctx = withStepLogger(ctx, stepModel.ID, stepModel.String(), stage.String())
|
||||
ctx = withStepLogger(ctx, stepModel.ID, rc.ExprEval.Interpolate(ctx, stepModel.String()), stage.String())
|
||||
|
||||
rawLogger := common.Logger(ctx).WithField("raw_output", true)
|
||||
logWriter := common.NewLineWriter(rc.commandHandler(ctx), func(s string) bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue