mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 06:13:24 +00:00
Enable golangci linter contextcheck (#3170)
Split out from https://github.com/woodpecker-ci/woodpecker/pull/2960
This commit is contained in:
@@ -133,12 +133,13 @@ func (r *Runner) Run(runnerCtx context.Context) error {
|
||||
state := rpc.State{}
|
||||
state.Started = time.Now().Unix()
|
||||
|
||||
err = r.client.Init(ctxmeta, work.ID, state)
|
||||
err = r.client.Init(runnerCtx, work.ID, state)
|
||||
if err != nil {
|
||||
logger.Error().Err(err).Msg("pipeline initialization failed")
|
||||
}
|
||||
|
||||
var uploads sync.WaitGroup
|
||||
//nolint:contextcheck
|
||||
err = pipeline.New(work.Config,
|
||||
pipeline.WithContext(workflowCtx),
|
||||
pipeline.WithTaskUUID(fmt.Sprint(work.ID)),
|
||||
@@ -188,7 +189,7 @@ func (r *Runner) Run(runnerCtx context.Context) error {
|
||||
Int("exit_code", state.ExitCode).
|
||||
Msg("updating pipeline status")
|
||||
|
||||
if err := r.client.Done(ctxmeta, work.ID, state); err != nil {
|
||||
if err := r.client.Done(runnerCtx, work.ID, state); err != nil {
|
||||
logger.Error().Err(err).Msg("updating pipeline status failed")
|
||||
} else {
|
||||
logger.Debug().Msg("updating pipeline status complete")
|
||||
|
Reference in New Issue
Block a user