Skip to content

Commit

Permalink
update pipelineloop operator to check break tasks with taskrun (kubef…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomcli authored Jan 6, 2022
1 parent 2a65c33 commit 77fcaaa
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,17 @@ func (c *Reconciler) updatePipelineRunStatus(logger *zap.SugaredLogger, run *v1a
}}
}
}
for _, taskRunStatus := range pr.Status.TaskRuns {
if strings.HasPrefix(taskRunStatus.PipelineTaskName, "pipelineloop-break-operation") {
// Mark run successful and stop the loop pipelinerun
run.Status.MarkRunSucceeded(pipelineloopv1alpha1.PipelineLoopRunReasonSucceeded.String(),
"PipelineRuns completed successfully with the conditions are met")
run.Status.Results = []runv1alpha1.RunResult{{
Name: "condition",
Value: "pass",
}}
}
}

status.PipelineRuns[pr.Name] = &pipelineloopv1alpha1.PipelineLoopPipelineRunStatus{
Iteration: iteration,
Expand Down

0 comments on commit 77fcaaa

Please sign in to comment.