Skip to content
Snippets Groups Projects
Commit b6739632 authored by Bob Van Landuyt :neckbeard:'s avatar Bob Van Landuyt :neckbeard: :sunglasses:
Browse files

Revert "Merge branch 'tags-dependencies-in-default' into 'master'"

This reverts commit 3bdc7844
parent 3bdc7844
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -135,7 +135,6 @@ The following job parameters can be defined inside a `default:` block:
- [`services`](#services)
- [`before_script`](#before_script-and-after_script)
- [`after_script`](#before_script-and-after_script)
- [`tags`](#tags)
- [`cache`](#cache)
- [`retry`](#retry)
- [`timeout`](#timeout)
Loading
Loading
Loading
Loading
@@ -13,8 +13,7 @@ describe EE::Gitlab::Ci::Config::Entry::Bridge do
# that we know that we don't want to inherit
# as they do not have sense in context of Bridge
let(:ignored_inheritable_columns) do
%i[before_script after_script image services cache interruptible timeout
retry tags]
%i[before_script after_script image services cache interruptible timeout retry]
end
end
 
Loading
Loading
# frozen_string_literal: true
module Gitlab
module Ci
class Config
module Entry
##
# Entry that represents the interrutible value.
#
class Boolean < ::Gitlab::Config::Entry::Node
include ::Gitlab::Config::Entry::Validatable
validations do
validates :config, boolean: true
end
end
end
end
end
end
Loading
Loading
@@ -15,7 +15,7 @@ module Gitlab
 
ALLOWED_KEYS = %i[before_script image services
after_script cache interruptible
timeout retry tags].freeze
timeout retry].freeze
 
validations do
validates :config, allowed_keys: ALLOWED_KEYS
Loading
Loading
@@ -41,7 +41,7 @@ module Gitlab
description: 'Configure caching between build jobs.',
inherit: true
 
entry :interruptible, ::Gitlab::Config::Entry::Boolean,
entry :interruptible, Entry::Boolean,
description: 'Set jobs interruptible default value.',
inherit: false
 
Loading
Loading
@@ -53,12 +53,7 @@ module Gitlab
description: 'Set retry default value.',
inherit: false
 
entry :tags, ::Gitlab::Config::Entry::ArrayOfStrings,
description: 'Set the default tags.',
inherit: false
helpers :before_script, :image, :services, :after_script, :cache, :interruptible,
:timeout, :retry, :tags
helpers :before_script, :image, :services, :after_script, :cache, :interruptible, :timeout, :retry
 
private
 
Loading
Loading
Loading
Loading
@@ -36,6 +36,7 @@ module Gitlab
if: :has_rules?
 
with_options allow_nil: true do
validates :tags, array_of_strings: true
validates :allow_failure, boolean: true
validates :parallel, numericality: { only_integer: true,
greater_than_or_equal_to: 2,
Loading
Loading
@@ -96,7 +97,7 @@ module Gitlab
description: 'Services that will be used to execute this job.',
inherit: true
 
entry :interruptible, ::Gitlab::Config::Entry::Boolean,
entry :interruptible, Entry::Boolean,
description: 'Set jobs interruptible value.',
inherit: true
 
Loading
Loading
@@ -108,10 +109,6 @@ module Gitlab
description: 'Retry configuration for this job.',
inherit: true
 
entry :tags, ::Gitlab::Config::Entry::ArrayOfStrings,
description: 'Set the tags.',
inherit: true
entry :only, Entry::Policy,
description: 'Refs policy this job will be executed for.',
default: Entry::Policy::DEFAULT_ONLY,
Loading
Loading
# frozen_string_literal: true
module Gitlab
module Config
module Entry
##
# Entry that represents a array of strings value.
#
class ArrayOfStrings < Node
include Validatable
validations do
validates :config, array_of_strings: true
end
end
end
end
end
Loading
Loading
@@ -27,7 +27,7 @@ describe Gitlab::Ci::Config::Entry::Default do
expect(described_class.nodes.keys)
.to match_array(%i[before_script image services
after_script cache interruptible
timeout retry tags])
timeout retry])
end
end
end
Loading
Loading
Loading
Loading
@@ -24,7 +24,7 @@ describe Gitlab::Ci::Config::Entry::Job do
let(:result) do
%i[before_script script stage type after_script cache
image services only except rules needs variables artifacts
environment coverage retry interruptible timeout tags]
environment coverage retry interruptible timeout]
end
 
it { is_expected.to match_array result }
Loading
Loading
Loading
Loading
@@ -1849,7 +1849,7 @@ module Gitlab
config = YAML.dump({ rspec: { script: "test", tags: "mysql" } })
expect do
Gitlab::Ci::YamlProcessor.new(config)
end.to raise_error(Gitlab::Ci::YamlProcessor::ValidationError, "jobs:rspec:tags config should be an array of strings")
end.to raise_error(Gitlab::Ci::YamlProcessor::ValidationError, "jobs:rspec tags should be an array of strings")
end
 
it "returns errors if before_script parameter is invalid" do
Loading
Loading
@@ -2197,7 +2197,7 @@ module Gitlab
context "when the tags parameter is invalid" do
let(:content) { YAML.dump({ rspec: { script: "test", tags: "mysql" } }) }
 
it { is_expected.to eq "jobs:rspec:tags config should be an array of strings" }
it { is_expected.to eq "jobs:rspec tags should be an array of strings" }
end
 
context "when YAML content is empty" do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment