From 182051790e4fe53f02d7a4a378493ff315217e20 Mon Sep 17 00:00:00 2001 From: pat-s Date: Mon, 6 Jan 2025 09:44:47 +0100 Subject: [PATCH] pipelineName -> workflowName --- agent/runner.go | 6 +++--- pipeline/pipeline.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/agent/runner.go b/agent/runner.go index a0bb4c095..411c7d10c 100644 --- a/agent/runner.go +++ b/agent/runner.go @@ -72,7 +72,7 @@ func (r *Runner) Run(runnerCtx, shutdownCtx context.Context) error { //nolint:co repoName := extractRepositoryName(workflow.Config) // hack pipelineNumber := extractPipelineNumber(workflow.Config) // hack - pipelineName := extractPipelineName(workflow.Config) // hack + workflowName := extractWorkflowName(workflow.Config) // hack r.counter.Add( workflow.ID, @@ -150,7 +150,7 @@ func (r *Runner) Run(runnerCtx, shutdownCtx context.Context) error { //nolint:co "workflow_id": workflow.ID, "repo": repoName, "pipeline_number": pipelineNumber, - "pipeline_name": pipelineName, + "workflowName": workflowName, }), ).Run(runnerCtx) @@ -200,6 +200,6 @@ func extractPipelineNumber(config *backend.Config) string { return config.Stages[0].Steps[0].Environment["CI_PIPELINE_NUMBER"] } -func extractPipelineName(config *backend.Config) string { +func extractWorkflowName(config *backend.Config) string { return config.Stages[0].Steps[0].Environment["CI_WORKFLOW_NAME"] } diff --git a/pipeline/pipeline.go b/pipeline/pipeline.go index 5e4d1be91..3bbc2ea73 100644 --- a/pipeline/pipeline.go +++ b/pipeline/pipeline.go @@ -109,13 +109,13 @@ func (r *Runtime) Run(runnerCtx context.Context) error { if ctx.Err() != nil { ctx = GetShutdownCtx() } - if err := r.engine.DestroyWorkflow(ctx, r.spec, r.taskUUID, r.Description["pipeline_name"]); err != nil { + if err := r.engine.DestroyWorkflow(ctx, r.spec, r.taskUUID, r.Description["workflowName"]); err != nil { logger.Error().Err(err).Msg("could not destroy engine") } }() r.started = time.Now().Unix() - if err := r.engine.SetupWorkflow(runnerCtx, r.spec, r.taskUUID, r.Description["pipeline_name"]); err != nil { + if err := r.engine.SetupWorkflow(runnerCtx, r.spec, r.taskUUID, r.Description["workflowName"]); err != nil { return err } @@ -123,7 +123,7 @@ func (r *Runtime) Run(runnerCtx context.Context) error { select { case <-r.ctx.Done(): return ErrCancel - case err := <-r.execAll(stage.Steps, r.Description["pipeline_name"]): + case err := <-r.execAll(stage.Steps, r.Description["workflowName"]): if err != nil { r.err = err }