summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-07-04 10:41:41 +0900
committerShinya Maeda <shinya@gitlab.com>2018-07-04 10:41:41 +0900
commite90e171997e144d2a34c2066ecf5a450d1736f06 (patch)
tree5e038dedc3ad8f2536da5396567f7b609660e686
parent64977b82272452f3b9a50b7b5dc0194129526985 (diff)
downloadgitlab-ce-e90e171997e144d2a34c2066ecf5a450d1736f06.tar.gz
Revert the presenter of junit.xml
-rw-r--r--app/models/ci/build.rb25
-rw-r--r--lib/api/entities.rb2
-rw-r--r--lib/gitlab/ci/config/entry/artifacts.rb3
3 files changed, 3 insertions, 27 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index c24bf787272..a2a17853ecf 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -525,30 +525,7 @@ module Ci
end
def artifacts
- list = []
- list << artifacts_archive if options.dig(:artifacts, :paths)
- list << artifacts_reports if options.dig(:artifacts, :reports)
- list
- end
-
- def artifacts_archive
- options[:artifacts].merge(artifact_type: 'archive', artifact_format: 'zip')
- end
-
- def artifacts_reports
- reports = []
- reports << artifacts_junit if options.dig(:artifacts, :reports, :junit)
- reports
- end
-
- def artifacts_junit
- {
- name: 'junit.xml',
- paths: [options[:artifacts][:reports][:junit]],
- artifact_type: 'junit',
- artifact_format: 'gzip',
- expire_in: options.dig(:artifacts, :expire_in)
- }
+ [options[:artifacts]]
end
def cache
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 01f64792868..bb48a86fe9e 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -1213,7 +1213,7 @@ module API
end
class Artifacts < Grape::Entity
- expose :name, :untracked, :paths, :when, :artifact_type, :artifact_format, :expire_in
+ expose :name, :untracked, :paths, :when, :expire_in
end
class Cache < Grape::Entity
diff --git a/lib/gitlab/ci/config/entry/artifacts.rb b/lib/gitlab/ci/config/entry/artifacts.rb
index ee860a41d74..8275aacee9b 100644
--- a/lib/gitlab/ci/config/entry/artifacts.rb
+++ b/lib/gitlab/ci/config/entry/artifacts.rb
@@ -9,7 +9,7 @@ module Gitlab
include Validatable
include Attributable
- ALLOWED_KEYS = %i[name untracked paths reports when expire_in].freeze
+ ALLOWED_KEYS = %i[name untracked paths when expire_in].freeze
attributes ALLOWED_KEYS
@@ -21,7 +21,6 @@ module Gitlab
validates :name, type: String
validates :untracked, boolean: true
validates :paths, array_of_strings: true
- validates :reports, type: Hash # TODO: Validate
validates :when,
inclusion: { in: %w[on_success on_failure always],
message: 'should be on_success, on_failure ' \