summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-15 12:07:49 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-15 12:07:49 +0000
commit86944cb975cbcdac9d68966454cc9859e4469af1 (patch)
treee2ccaa188ef64c4caaf75119c5c503cf0a879fcd
parentd5e16807136445884fd7cc5f71f9f039f823b5d8 (diff)
downloadgitlab-ce-86944cb975cbcdac9d68966454cc9859e4469af1.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--doc/ci/yaml/README.md1
-rw-r--r--lib/gitlab/ci/config/entry/default.rb9
-rw-r--r--lib/gitlab/ci/config/entry/job.rb8
-rw-r--r--spec/lib/gitlab/ci/config/entry/default_spec.rb2
4 files changed, 12 insertions, 8 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index f0f72875ee5..cbfda209a89 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -137,6 +137,7 @@ The following job parameters can be defined inside a `default:` block:
- [`after_script`](#before_script-and-after_script)
- [`tags`](#tags)
- [`cache`](#cache)
+- [`artifacts`](#artifacts)
- [`retry`](#retry)
- [`timeout`](#timeout)
- [`interruptible`](#interruptible)
diff --git a/lib/gitlab/ci/config/entry/default.rb b/lib/gitlab/ci/config/entry/default.rb
index 8714885efc5..88db17a75da 100644
--- a/lib/gitlab/ci/config/entry/default.rb
+++ b/lib/gitlab/ci/config/entry/default.rb
@@ -15,7 +15,7 @@ module Gitlab
ALLOWED_KEYS = %i[before_script image services
after_script cache interruptible
- timeout retry tags].freeze
+ timeout retry tags artifacts].freeze
validations do
validates :config, allowed_keys: ALLOWED_KEYS
@@ -57,8 +57,11 @@ module Gitlab
description: 'Set the default tags.',
inherit: false
- helpers :before_script, :image, :services, :after_script, :cache, :interruptible,
- :timeout, :retry, :tags
+ entry :artifacts, Entry::Artifacts,
+ description: 'Default artifacts.',
+ inherit: false
+
+ helpers :before_script, :image, :services, :after_script, :cache
private
diff --git a/lib/gitlab/ci/config/entry/job.rb b/lib/gitlab/ci/config/entry/job.rb
index 860ceae2ab8..c2ed448ff91 100644
--- a/lib/gitlab/ci/config/entry/job.rb
+++ b/lib/gitlab/ci/config/entry/job.rb
@@ -114,6 +114,10 @@ module Gitlab
description: 'Set the tags.',
inherit: true
+ entry :artifacts, Entry::Artifacts,
+ description: 'Artifacts configuration for this job.',
+ inherit: true
+
entry :only, Entry::Policy,
description: 'Refs policy this job will be executed for.',
default: Entry::Policy::DEFAULT_ONLY,
@@ -139,10 +143,6 @@ module Gitlab
description: 'Environment variables available for this job.',
inherit: false
- entry :artifacts, Entry::Artifacts,
- description: 'Artifacts configuration for this job.',
- inherit: false
-
entry :environment, Entry::Environment,
description: 'Environment configuration for this job.',
inherit: false
diff --git a/spec/lib/gitlab/ci/config/entry/default_spec.rb b/spec/lib/gitlab/ci/config/entry/default_spec.rb
index 391d594bc02..23c62bbf92a 100644
--- a/spec/lib/gitlab/ci/config/entry/default_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/default_spec.rb
@@ -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 tags artifacts])
end
end
end