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/seed/build.rb')
-rw-r--r--lib/gitlab/ci/pipeline/seed/build.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/gitlab/ci/pipeline/seed/build.rb b/lib/gitlab/ci/pipeline/seed/build.rb
index 901208f325a..93106b96af2 100644
--- a/lib/gitlab/ci/pipeline/seed/build.rb
+++ b/lib/gitlab/ci/pipeline/seed/build.rb
@@ -54,9 +54,11 @@ module Gitlab
end
def errors
- return unless included?
-
strong_memoize(:errors) do
+ # We check rules errors before checking "included?" because rules affects its inclusion status.
+ next rules_errors if rules_errors
+ next unless included?
+
[needs_errors, variable_expansion_errors].compact.flatten
end
end
@@ -168,6 +170,12 @@ module Gitlab
end
end
+ def rules_errors
+ strong_memoize(:rules_errors) do
+ ["Failed to parse rule for #{name}: #{rules_result.errors.join(', ')}"] if rules_result.errors.present?
+ end
+ end
+
def evaluate_context
strong_memoize(:evaluate_context) do
Gitlab::Ci::Build::Context::Build.new(@pipeline, @seed_attributes)