diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-01-26 20:00:29 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-02-06 09:50:08 +0300 |
commit | 5f6d826165aa975735cd543dba2b91999c115545 (patch) | |
tree | e1f2de2c8106a420e75c26302dbe340bcaf4bc8c /lib | |
parent | 002f314f320c5731681297225fff5b528de88ed2 (diff) |
Add CreateArtifactsTraceWorker
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/runner.rb | 11 | ||||
-rw-r--r-- | lib/gitlab/ci/trace.rb | 12 |
2 files changed, 7 insertions, 16 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb index bab9d263e8d..1f80646a2ea 100644 --- a/lib/api/runner.rb +++ b/lib/api/runner.rb @@ -120,16 +120,7 @@ module API put '/:id' do job = authenticate_job! - if params[:trace] - # Overwrite live-trace by full-trace - job.trace.set(params[:trace]) - - # Move full-trace to JobArtifactUploader#default_path - job.build_job_artifacts_trace( - project: job.project, - file_type: :trace, - file: UploadedFile.new(job.trace.current_path, 'trace.log')) - end + job.trace.set(params[:trace]) if params[:trace] Gitlab::Metrics.add_event(:update_build, project: job.project.full_path) diff --git a/lib/gitlab/ci/trace.rb b/lib/gitlab/ci/trace.rb index 307e3bf1c8f..27f5869770e 100644 --- a/lib/gitlab/ci/trace.rb +++ b/lib/gitlab/ci/trace.rb @@ -101,12 +101,6 @@ module Gitlab job.erase_old_trace! end - def current_path - @current_path ||= paths.find do |trace_path| - File.exist?(trace_path) - end - end - private def ensure_path @@ -122,6 +116,12 @@ module Gitlab end end + def current_path + @current_path ||= paths.find do |trace_path| + File.exist?(trace_path) + end + end + ## # This method doesn't include the latest path, which is JobArtifactUploader#default_path, # Because, in EE, traces can be moved to ObjectStorage, so checking paths in Filestorage doesn't make sense. |