Skip to content

Commit 1877a63

Browse files
chmouelShivam Mukhade
authored andcommitted
When we have an error don't fail straight out
When we made the fix for timeout (which include any errors) we would exit straight away which would cause issues. We are now just logging and let the flow continue to report. Make sure we are not cleaning up pipeline with failures. Signed-off-by: Chmouel Boudjnah <[email protected]>
1 parent 1630e6c commit 1877a63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/pipelineascode/pipelineascode.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ func Run(ctx context.Context, cs *params.Run, providerintf provider.Interface, k
164164
cs.Clients.Log.Infof("Waiting for PipelineRun %s/%s to Succeed in a maximum time of %s minutes",
165165
pr.Namespace, pr.Name, formatting.HumanDuration(cs.Info.Pac.DefaultPipelineRunTimeout))
166166
if err := k8int.WaitForPipelineRunSucceed(ctx, cs.Clients.Tekton.TektonV1beta1(), pr, cs.Info.Pac.DefaultPipelineRunTimeout); err != nil {
167-
return fmt.Errorf("pipelinerun %s in namespace %s has failed: %w", pipelineRun.GetGenerateName(), repo.GetNamespace(), err)
167+
cs.Clients.Log.Errorf("pipelinerun has failed: %s", err.Error())
168168
}
169169

170-
// Do cleanups
170+
// Cleanup old succeeded pipelineruns
171171
if keepMaxPipeline, ok := config["max-keep-runs"]; ok {
172172
max, err := strconv.Atoi(keepMaxPipeline)
173173
if err != nil {

0 commit comments

Comments
 (0)