Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/pipeline/chain/populate.rb')
-rw-r--r--lib/gitlab/ci/pipeline/chain/populate.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/gitlab/ci/pipeline/chain/populate.rb b/lib/gitlab/ci/pipeline/chain/populate.rb
index c59ef2ba6a4..f73addcd098 100644
--- a/lib/gitlab/ci/pipeline/chain/populate.rb
+++ b/lib/gitlab/ci/pipeline/chain/populate.rb
@@ -18,8 +18,15 @@ module Gitlab
pipeline.stages = @command.pipeline_seed.stages
if stage_names.empty?
- return error('Pipeline will not run for the selected trigger. ' \
- 'The rules configuration prevented any jobs from being added to the pipeline.')
+ if Feature.enabled?(:always_set_pipeline_failure_reason, @command.project)
+ drop_reason = :filtered_by_rules
+ end
+
+ return error(
+ 'Pipeline will not run for the selected trigger. ' \
+ 'The rules configuration prevented any jobs from being added to the pipeline.',
+ drop_reason: drop_reason
+ )
end
if pipeline.invalid?