error if cyclical pipeline dependency [ci skip]

This commit is contained in:
Brad Rydzewski 2019-04-19 17:27:24 -07:00
parent fb837e4df0
commit 12cb5676fb

View file

@ -276,6 +276,10 @@ func (t *triggerer) Trigger(ctx context.Context, repo *core.Repository, base *co
} }
} }
if dag.DetectCycles() {
return t.createBuildError(ctx, repo, base, "Error: Dependency cycle detected in Pipeline")
}
if len(matched) == 0 { if len(matched) == 0 {
logger.Infoln("trigger: skipping build, no matching pipelines") logger.Infoln("trigger: skipping build, no matching pipelines")
return nil, nil return nil, nil