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 <elias.souza@quintoandar.com.br>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
This commit is contained in:
Elias 2024-04-15 04:08:13 -03:00 committed by GitHub
parent b8763a8f34
commit f211a780f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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