diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-29 09:05:14 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-29 09:05:14 +0200 |
commit | 7c511c2f55f3e181983253d8b3ae74cd84e6844c (patch) | |
tree | 7adb9ed8a7cddf24cee1e08b5db06f24c0253934 /lib | |
parent | 2846f95d2a6a7418fb655f6588037bd3173fe77f (diff) | |
download | gitlab-ce-7c511c2f55f3e181983253d8b3ae74cd84e6844c.tar.gz |
Make it possible to set parent in CI config node
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/config/node/entry.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/config/node/factory.rb | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab/ci/config/node/entry.rb b/lib/gitlab/ci/config/node/entry.rb index 08d8020f8e7..f22dac44836 100644 --- a/lib/gitlab/ci/config/node/entry.rb +++ b/lib/gitlab/ci/config/node/entry.rb @@ -8,9 +8,9 @@ module Gitlab class Entry class InvalidError < StandardError; end - attr_reader :config - attr_accessor :description attr_writer :key + attr_reader :config + attr_accessor :parent, :description def initialize(config) @config = config diff --git a/lib/gitlab/ci/config/node/factory.rb b/lib/gitlab/ci/config/node/factory.rb index 39b5784af25..85e28f345fe 100644 --- a/lib/gitlab/ci/config/node/factory.rb +++ b/lib/gitlab/ci/config/node/factory.rb @@ -32,8 +32,9 @@ module Gitlab end node.new(value).tap do |entry| - entry.description = @attributes[:description] entry.key = @attributes[:key] + entry.parent = @attributes[:parent] + entry.description = @attributes[:description] end end end |