From 12cb5676fb0c3437dd270a15f6a2ad5ab4d588c2 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 19 Apr 2019 17:27:24 -0700 Subject: [PATCH] error if cyclical pipeline dependency [ci skip] --- trigger/trigger.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trigger/trigger.go b/trigger/trigger.go index 3d0767c6..9d7fd214 100644 --- a/trigger/trigger.go +++ b/trigger/trigger.go @@ -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 { logger.Infoln("trigger: skipping build, no matching pipelines") return nil, nil