提交 a80a01e8 编写于 作者: G Grzegorz Bizon

Add comment for deprecated CI config `types` entry

上级 e9b42067
......@@ -17,9 +17,7 @@ module Ci
def initialize(config, path = nil)
@ci_config = Gitlab::Ci::Config.new(config)
@config = @ci_config.to_hash
@path = path
@config, @path = @ci_config.to_hash, path
unless @ci_config.valid?
raise ValidationError, @ci_config.errors.first
......
......@@ -50,7 +50,7 @@ module Gitlab
compose_jobs!
end
def compose_stages!
def compose_jobs!
factory = Node::Factory.new(Node::Jobs)
factory.value(@config.except(*nodes.keys))
factory.with(key: :jobs, parent: self, global: self)
......@@ -59,7 +59,14 @@ module Gitlab
@entries[:jobs] = factory.create!
end
def compose_jobs!
def compose_stages!
##
# Deprecated `:types` key workaround - if types are defined and
# stages are not defined we use types definition as stages.
#
# Otherwise we use stages in favor of types, and remove types from
# processing.
#
if types_defined? && !stages_defined?
@entries[:stages] = @entries[:types]
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册