From f211a780f39af0b37f4f575d573d02aa1804655c Mon Sep 17 00:00:00 2001 From: Elias Date: Mon, 15 Apr 2024 04:08:13 -0300 Subject: [PATCH] Handle ImagePullBackOff pod status (#3580) close: https://github.com/woodpecker-ci/woodpecker/issues/3555 Put the same logic from `waitStep` and call the function `isImagePullBackOffState` in the `tailStep` function. --------- Co-authored-by: elias.souza Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com> --- pipeline/backend/kubernetes/kubernetes.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pipeline/backend/kubernetes/kubernetes.go b/pipeline/backend/kubernetes/kubernetes.go index 3567100a6..3019bba7a 100644 --- a/pipeline/backend/kubernetes/kubernetes.go +++ b/pipeline/backend/kubernetes/kubernetes.go @@ -316,6 +316,9 @@ func (e *kube) TailStep(ctx context.Context, step *types.Step, taskUUID string) } if pod.Name == podName { + if isImagePullBackOffState(pod) { + up <- true + } switch pod.Status.Phase { case v1.PodRunning, v1.PodSucceeded, v1.PodFailed: up <- true