mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-16 19:35:14 +00:00
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:
parent
b8763a8f34
commit
f211a780f3
1 changed files with 3 additions and 0 deletions
|
@ -316,6 +316,9 @@ func (e *kube) TailStep(ctx context.Context, step *types.Step, taskUUID string)
|
||||||
}
|
}
|
||||||
|
|
||||||
if pod.Name == podName {
|
if pod.Name == podName {
|
||||||
|
if isImagePullBackOffState(pod) {
|
||||||
|
up <- true
|
||||||
|
}
|
||||||
switch pod.Status.Phase {
|
switch pod.Status.Phase {
|
||||||
case v1.PodRunning, v1.PodSucceeded, v1.PodFailed:
|
case v1.PodRunning, v1.PodSucceeded, v1.PodFailed:
|
||||||
up <- true
|
up <- true
|
||||||
|
|
Loading…
Reference in a new issue