Commit f51fece8 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'ci-default-artifacts' into 'master'

Adds 'artifacts' keyword in defaults

See merge request gitlab-org/gitlab!21592
parents 0027a7aa 0ca9e2e1
...@@ -137,6 +137,7 @@ The following job parameters can be defined inside a `default:` block: ...@@ -137,6 +137,7 @@ The following job parameters can be defined inside a `default:` block:
- [`after_script`](#before_script-and-after_script) - [`after_script`](#before_script-and-after_script)
- [`tags`](#tags) - [`tags`](#tags)
- [`cache`](#cache) - [`cache`](#cache)
- [`artifacts`](#artifacts)
- [`retry`](#retry) - [`retry`](#retry)
- [`timeout`](#timeout) - [`timeout`](#timeout)
- [`interruptible`](#interruptible) - [`interruptible`](#interruptible)
......
...@@ -14,7 +14,7 @@ describe EE::Gitlab::Ci::Config::Entry::Bridge do ...@@ -14,7 +14,7 @@ describe EE::Gitlab::Ci::Config::Entry::Bridge do
# as they do not have sense in context of Bridge # as they do not have sense in context of Bridge
let(:ignored_inheritable_columns) do let(:ignored_inheritable_columns) do
%i[before_script after_script image services cache interruptible timeout %i[before_script after_script image services cache interruptible timeout
retry tags] retry tags artifacts]
end end
end end
......
...@@ -15,7 +15,7 @@ module Gitlab ...@@ -15,7 +15,7 @@ module Gitlab
ALLOWED_KEYS = %i[before_script image services ALLOWED_KEYS = %i[before_script image services
after_script cache interruptible after_script cache interruptible
timeout retry tags].freeze timeout retry tags artifacts].freeze
validations do validations do
validates :config, allowed_keys: ALLOWED_KEYS validates :config, allowed_keys: ALLOWED_KEYS
...@@ -57,8 +57,11 @@ module Gitlab ...@@ -57,8 +57,11 @@ module Gitlab
description: 'Set the default tags.', description: 'Set the default tags.',
inherit: false inherit: false
helpers :before_script, :image, :services, :after_script, :cache, :interruptible, entry :artifacts, Entry::Artifacts,
:timeout, :retry, :tags description: 'Default artifacts.',
inherit: false
helpers :before_script, :image, :services, :after_script, :cache
private private
......
...@@ -114,6 +114,10 @@ module Gitlab ...@@ -114,6 +114,10 @@ module Gitlab
description: 'Set the tags.', description: 'Set the tags.',
inherit: true inherit: true
entry :artifacts, Entry::Artifacts,
description: 'Artifacts configuration for this job.',
inherit: true
entry :only, Entry::Policy, entry :only, Entry::Policy,
description: 'Refs policy this job will be executed for.', description: 'Refs policy this job will be executed for.',
default: Entry::Policy::DEFAULT_ONLY, default: Entry::Policy::DEFAULT_ONLY,
...@@ -139,10 +143,6 @@ module Gitlab ...@@ -139,10 +143,6 @@ module Gitlab
description: 'Environment variables available for this job.', description: 'Environment variables available for this job.',
inherit: false inherit: false
entry :artifacts, Entry::Artifacts,
description: 'Artifacts configuration for this job.',
inherit: false
entry :environment, Entry::Environment, entry :environment, Entry::Environment,
description: 'Environment configuration for this job.', description: 'Environment configuration for this job.',
inherit: false inherit: false
......
...@@ -27,7 +27,7 @@ describe Gitlab::Ci::Config::Entry::Default do ...@@ -27,7 +27,7 @@ describe Gitlab::Ci::Config::Entry::Default do
expect(described_class.nodes.keys) expect(described_class.nodes.keys)
.to match_array(%i[before_script image services .to match_array(%i[before_script image services
after_script cache interruptible after_script cache interruptible
timeout retry tags]) timeout retry tags artifacts])
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment