diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-14 10:51:56 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-14 10:51:56 +0100 |
commit | a761d293662e48efca9c0607f0624ba8eec1b634 (patch) | |
tree | 5d9e67c5f4da0f08b661a41fc28ef3d9b68b6652 /lib | |
parent | c70146839009397b3a1a9ab9bd1108db3cb70c04 (diff) | |
download | gitlab-ce-a761d293662e48efca9c0607f0624ba8eec1b634.tar.gz |
Change name of method for setting CI config entries
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/config/entry/cache.rb | 6 | ||||
-rw-r--r-- | lib/gitlab/ci/config/entry/configurable.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/config/entry/global.rb | 16 | ||||
-rw-r--r-- | lib/gitlab/ci/config/entry/job.rb | 26 |
4 files changed, 26 insertions, 26 deletions
diff --git a/lib/gitlab/ci/config/entry/cache.rb b/lib/gitlab/ci/config/entry/cache.rb index 544e0953b17..7653cab668b 100644 --- a/lib/gitlab/ci/config/entry/cache.rb +++ b/lib/gitlab/ci/config/entry/cache.rb @@ -14,13 +14,13 @@ module Gitlab validates :config, allowed_keys: ALLOWED_KEYS end - node :key, Entry::Key, + entry :key, Entry::Key, description: 'Cache key used to define a cache affinity.' - node :untracked, Entry::Boolean, + entry :untracked, Entry::Boolean, description: 'Cache all untracked files.' - node :paths, Entry::Paths, + entry :paths, Entry::Paths, description: 'Specify which paths should be cached across builds.' end end diff --git a/lib/gitlab/ci/config/entry/configurable.rb b/lib/gitlab/ci/config/entry/configurable.rb index b6c7b05e369..0f438faeda2 100644 --- a/lib/gitlab/ci/config/entry/configurable.rb +++ b/lib/gitlab/ci/config/entry/configurable.rb @@ -48,8 +48,8 @@ module Gitlab private # rubocop:disable Lint/UselessAccessModifier - def node(key, node, metadata) - factory = Entry::Factory.new(node) + def entry(key, entry, metadata) + factory = Entry::Factory.new(entry) .with(description: metadata[:description]) (@nodes ||= {}).merge!(key.to_sym => factory) diff --git a/lib/gitlab/ci/config/entry/global.rb b/lib/gitlab/ci/config/entry/global.rb index cdf314a4b37..a4ec8f0ff2f 100644 --- a/lib/gitlab/ci/config/entry/global.rb +++ b/lib/gitlab/ci/config/entry/global.rb @@ -9,28 +9,28 @@ module Gitlab class Global < Node include Configurable - node :before_script, Entry::Script, + entry :before_script, Entry::Script, description: 'Script that will be executed before each job.' - node :image, Entry::Image, + entry :image, Entry::Image, description: 'Docker image that will be used to execute jobs.' - node :services, Entry::Services, + entry :services, Entry::Services, description: 'Docker images that will be linked to the container.' - node :after_script, Entry::Script, + entry :after_script, Entry::Script, description: 'Script that will be executed after each job.' - node :variables, Entry::Variables, + entry :variables, Entry::Variables, description: 'Environment variables that will be used.' - node :stages, Entry::Stages, + entry :stages, Entry::Stages, description: 'Configuration of stages for this pipeline.' - node :types, Entry::Stages, + entry :types, Entry::Stages, description: 'Deprecated: stages for this pipeline.' - node :cache, Entry::Cache, + entry :cache, Entry::Cache, description: 'Configure caching between build jobs.' helpers :before_script, :image, :services, :after_script, diff --git a/lib/gitlab/ci/config/entry/job.rb b/lib/gitlab/ci/config/entry/job.rb index b4e69a04706..ab4ef333629 100644 --- a/lib/gitlab/ci/config/entry/job.rb +++ b/lib/gitlab/ci/config/entry/job.rb @@ -34,43 +34,43 @@ module Gitlab end end - node :before_script, Entry::Script, + entry :before_script, Entry::Script, description: 'Global before script overridden in this job.' - node :script, Entry::Commands, + entry :script, Entry::Commands, description: 'Commands that will be executed in this job.' - node :stage, Entry::Stage, + entry :stage, Entry::Stage, description: 'Pipeline stage this job will be executed into.' - node :type, Entry::Stage, + entry :type, Entry::Stage, description: 'Deprecated: stage this job will be executed into.' - node :after_script, Entry::Script, + entry :after_script, Entry::Script, description: 'Commands that will be executed when finishing job.' - node :cache, Entry::Cache, + entry :cache, Entry::Cache, description: 'Cache definition for this job.' - node :image, Entry::Image, + entry :image, Entry::Image, description: 'Image that will be used to execute this job.' - node :services, Entry::Services, + entry :services, Entry::Services, description: 'Services that will be used to execute this job.' - node :only, Entry::Trigger, + entry :only, Entry::Trigger, description: 'Refs policy this job will be executed for.' - node :except, Entry::Trigger, + entry :except, Entry::Trigger, description: 'Refs policy this job will be executed for.' - node :variables, Entry::Variables, + entry :variables, Entry::Variables, description: 'Environment variables available for this job.' - node :artifacts, Entry::Artifacts, + entry :artifacts, Entry::Artifacts, description: 'Artifacts configuration for this job.' - node :environment, Entry::Environment, + entry :environment, Entry::Environment, description: 'Environment configuration for this job.' helpers :before_script, :script, :stage, :type, :after_script, |