1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-11-23 21:44:44 +02:00

Document pipeline backend engine interface precisely (#5583)

This commit is contained in:
6543
2025-10-01 13:06:34 +02:00
committed by GitHub
parent 9edaa1e0c3
commit 2a97ae9bcd
2 changed files with 127 additions and 18 deletions

View File

@@ -248,14 +248,17 @@ func (e *docker) StartStep(ctx context.Context, step *backend.Step, taskUUID str
}
func (e *docker) WaitStep(ctx context.Context, step *backend.Step, taskUUID string) (*backend.State, error) {
log.Trace().Str("taskUUID", taskUUID).Msgf("wait for step %s", step.Name)
log := log.Logger.With().Str("taskUUID", taskUUID).Str("stepUUID", step.UUID).Logger()
log.Trace().Msgf("wait for step %s", step.Name)
containerName := toContainerName(step)
wait, errC := e.client.ContainerWait(ctx, containerName, "")
select {
case <-wait:
case <-errC:
case resp := <-wait:
log.Trace().Msgf("ContainerWait returned with resp: %v", resp)
case err := <-errC:
log.Trace().Msgf("ContainerWait returned with err: %v", err)
}
info, err := e.client.ContainerInspect(ctx, containerName)