mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-04-14 07:44:12 +00:00
pipelineName -> workflowName
This commit is contained in:
parent
5a0c941d34
commit
182051790e
2 changed files with 6 additions and 6 deletions
|
@ -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"]
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue