Skip to content

Commit e46c966

Browse files
committed
fix: re build stage failed for 1st attempt
1 parent 93cfce6 commit e46c966

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ci-runner/helper/buildxK8sClient.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ func (k8s *buildxK8sClient) getBuilderPods(ctx context.Context, deploymentName s
250250
podNames := make([]podStatus, 0, len(podList.Items))
251251
for i := range podList.Items {
252252
pod := &podList.Items[i]
253+
if pod.Status.Phase == corev1.PodSucceeded || pod.Status.Phase == corev1.PodFailed ||
254+
pod.DeletionTimestamp != nil {
255+
log.Println(util.DEVTRON, fmt.Sprintf("ignoring pod %q as it is not in running state, phase: %q", pod.Name, pod.Status.Phase))
256+
continue
257+
}
258+
// register the running pod only
253259
podNames = append(podNames, podStatus{
254260
name: pod.Name,
255261
phase: pod.Status.Phase,

0 commit comments

Comments
 (0)