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.rb17
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/gitlab/ci/build/rules.rb b/lib/gitlab/ci/build/rules.rb
index a39afee194c..2d4f9cf635b 100644
--- a/lib/gitlab/ci/build/rules.rb
+++ b/lib/gitlab/ci/build/rules.rb
@@ -7,30 +7,17 @@ module Gitlab
include ::Gitlab::Utils::StrongMemoize
Result = Struct.new(:when, :start_in, :allow_failure, :variables) do
- def build_attributes(seed_attributes = {})
+ def build_attributes
{
when: self.when,
options: { start_in: start_in }.compact,
- allow_failure: allow_failure,
- yaml_variables: yaml_variables(seed_attributes[:yaml_variables])
+ allow_failure: allow_failure
}.compact
end
def pass?
self.when != 'never'
end
-
- private
-
- def yaml_variables(seed_variables)
- return unless variables && seed_variables
-
- indexed_seed_variables = seed_variables.deep_dup.index_by { |var| var[:key] }
-
- variables.each_with_object(indexed_seed_variables) do |var, hash|
- hash[var[0].to_s] = { key: var[0].to_s, value: var[1], public: true }
- end.values
- end
end
def initialize(rule_hashes, default_when:)