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')
-rw-r--r--lib/gitlab/ci/pipeline/seed/build.rb12
-rw-r--r--lib/gitlab/ci/pipeline/seed/environment.rb2
-rw-r--r--lib/gitlab/ci/pipeline/seed/stage.rb2
3 files changed, 12 insertions, 4 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)
diff --git a/lib/gitlab/ci/pipeline/seed/environment.rb b/lib/gitlab/ci/pipeline/seed/environment.rb
index c8795840e5f..6bcc71a808b 100644
--- a/lib/gitlab/ci/pipeline/seed/environment.rb
+++ b/lib/gitlab/ci/pipeline/seed/environment.rb
@@ -30,7 +30,7 @@ module Gitlab
end
def deployment_tier
- job.environment_deployment_tier
+ job.environment_tier_from_options
end
def expanded_environment_name
diff --git a/lib/gitlab/ci/pipeline/seed/stage.rb b/lib/gitlab/ci/pipeline/seed/stage.rb
index bc56fe9bef9..7cf6466cf4b 100644
--- a/lib/gitlab/ci/pipeline/seed/stage.rb
+++ b/lib/gitlab/ci/pipeline/seed/stage.rb
@@ -36,7 +36,7 @@ module Gitlab
def errors
strong_memoize(:errors) do
- seeds.flat_map(&:errors).compact
+ @builds.flat_map(&:errors).compact
end
end