diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-01-25 16:46:38 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-02-06 09:50:07 +0300 |
commit | 8a89efd87a137634381a93c45c05e587eb207b94 (patch) | |
tree | f87cb6129b47b273abaf1f825e79f3a9d2b85d82 /lib/gitlab/ci | |
parent | 63a9d582aa88d774af5eff124b693df6271ae7bc (diff) |
Remove unnecessary changes
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/trace.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/gitlab/ci/trace.rb b/lib/gitlab/ci/trace.rb index a6827d7a38a..d7d4b02b516 100644 --- a/lib/gitlab/ci/trace.rb +++ b/lib/gitlab/ci/trace.rb @@ -84,6 +84,8 @@ module Gitlab end def erase! + job.job_artifacts_trace&.destory + paths.each do |trace_path| FileUtils.rm(trace_path, force: true) end @@ -106,6 +108,14 @@ module Gitlab end end + def current_path + @current_path ||= paths.find do |trace_path| + File.exist?(trace_path) + end + end + + ## + # This doesn't include the latest path JobArtifactUploader#default_path. def paths [ default_path, @@ -113,12 +123,6 @@ module Gitlab ].compact end - def current_path - @current_path ||= paths.find do |trace_path| - File.exist?(trace_path) - end - end - def default_directory File.join( Settings.gitlab_ci.builds_path, |