Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pkg/pipeline/CiHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1640,23 +1640,24 @@ func (impl *CiHandlerImpl) UpdateCiWorkflowStatusFailure(timeoutForFailureCiBuil
for _, ciWorkflow := range ciWorkflows {
var isExt bool
var env *repository3.Environment
var restConfig *rest.Config
if ciWorkflow.Namespace != DefaultCiWorkflowNamespace {
isExt = true
env, err = impl.envRepository.FindById(ciWorkflow.EnvironmentId)
if err != nil {
impl.Logger.Errorw("could not fetch stage env", "err", err)
return err
}
restConfig, err = impl.getRestConfig(ciWorkflow)
if err != nil {
return err
}
}

isEligibleToMarkFailed := false
isPodDeleted := false
if time.Since(ciWorkflow.StartedOn) > (time.Minute * time.Duration(timeoutForFailureCiBuild)) {

restConfig, err := impl.getRestConfig(ciWorkflow)
if err != nil {
return err
}
//check weather pod is exists or not, if exits check its status
wf, err := impl.workflowService.GetWorkflowStatus(ciWorkflow.ExecutorType, ciWorkflow.Name, ciWorkflow.Namespace, restConfig)
if err != nil {
Expand Down