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/build/context/build.rb')
-rw-r--r--lib/gitlab/ci/build/context/build.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gitlab/ci/build/context/build.rb b/lib/gitlab/ci/build/context/build.rb
index 81efbdb297b..48b138b0258 100644
--- a/lib/gitlab/ci/build/context/build.rb
+++ b/lib/gitlab/ci/build/context/build.rb
@@ -30,8 +30,16 @@ module Gitlab
::Ci::Build.new(build_attributes)
end
+ # Assigning tags and needs is slow and they are not needed for rules
+ # evaluation since we don't use them to compute the variables at this point.
def build_attributes
- attributes.merge(pipeline_attributes, ci_stage_attributes)
+ if pipeline.reduced_build_attributes_list_for_rules?
+ attributes
+ .except(:tag_list, :needs_attributes)
+ .merge!(pipeline_attributes, ci_stage_attributes)
+ else
+ attributes.merge(pipeline_attributes, ci_stage_attributes)
+ end
end
def ci_stage_attributes