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

Merge branch 'zj-improve-object-store-rake-task' into 'master'

Use proper logging for artifacts rake task

See merge request !2762
parent bc760627
---
title: Use a logger for the artifacts migration rake task
merge_request:
author:
type: changed
require 'logger'
desc "GitLab | Migrate files for artifacts to comply with new storage format" desc "GitLab | Migrate files for artifacts to comply with new storage format"
namespace :gitlab do namespace :gitlab do
namespace :artifacts do namespace :artifacts do
...@@ -11,9 +13,10 @@ namespace :gitlab do ...@@ -11,9 +13,10 @@ namespace :gitlab do
begin begin
build.artifacts_file.migrate!(ArtifactUploader::REMOTE_STORE) build.artifacts_file.migrate!(ArtifactUploader::REMOTE_STORE)
build.artifacts_metadata.migrate!(ArtifactUploader::REMOTE_STORE) build.artifacts_metadata.migrate!(ArtifactUploader::REMOTE_STORE)
print '.'
rescue logger.info("Transferred artifacts of #{build.id} of #{build.artifacts_size} to object storage")
print 'F' rescue => e
logger.error("Failed to transfer artifacts of #{build.id} with error: #{e.message}")
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