diff --git a/pkg/apis/pipeline/v1/pipeline_validation.go b/pkg/apis/pipeline/v1/pipeline_validation.go index 43e56d102f5..04806efb580 100644 --- a/pkg/apis/pipeline/v1/pipeline_validation.go +++ b/pkg/apis/pipeline/v1/pipeline_validation.go @@ -791,6 +791,9 @@ func validateMatrix(ctx context.Context, tasks []PipelineTask) (errs *apis.Field // since consuming a singular result produced by a matrix is currently not supported func findAndValidateResultRefsForMatrix(tasks []PipelineTask, taskMapping map[string]PipelineTask) (resultRefs []*ResultRef, errs *apis.FieldError) { for _, t := range tasks { + if !t.IsMatrixed() { + continue + } for _, p := range t.Params { if expressions, ok := p.GetVarSubstitutionExpressions(); ok { if LooksLikeContainsResultRefs(expressions) {