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/rules.rb')
-rw-r--r--lib/gitlab/ci/build/rules.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/gitlab/ci/build/rules.rb b/lib/gitlab/ci/build/rules.rb
index 17b9f30db33..8b503290e6e 100644
--- a/lib/gitlab/ci/build/rules.rb
+++ b/lib/gitlab/ci/build/rules.rb
@@ -32,18 +32,13 @@ module Gitlab
if @rule_list.nil?
Result.new(when: @default_when)
elsif matched_rule = match_rule(pipeline, context)
- result = Result.new(
+ Result.new(
when: matched_rule.attributes[:when] || @default_when,
start_in: matched_rule.attributes[:start_in],
allow_failure: matched_rule.attributes[:allow_failure],
- variables: matched_rule.attributes[:variables]
+ variables: matched_rule.attributes[:variables],
+ needs: matched_rule.attributes[:needs]
)
-
- if Feature.enabled?(:introduce_rules_with_needs, pipeline.project)
- result.needs = matched_rule.attributes[:needs]
- end
-
- result
else
Result.new(when: 'never')
end