Merge branch 'zj-improve-object-store-rake-task' into 'master'
Use proper logging for artifacts rake task See merge request !2762
This commit is contained in:
parent
bc76062774
commit
d7448f161f
2 changed files with 11 additions and 3 deletions
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Use a logger for the artifacts migration rake task
|
||||
merge_request:
|
||||
author:
|
||||
type: changed
|
|
@ -1,3 +1,5 @@
|
|||
require 'logger'
|
||||
|
||||
desc "GitLab | Migrate files for artifacts to comply with new storage format"
|
||||
namespace :gitlab do
|
||||
namespace :artifacts do
|
||||
|
@ -11,9 +13,10 @@ namespace :gitlab do
|
|||
begin
|
||||
build.artifacts_file.migrate!(ArtifactUploader::REMOTE_STORE)
|
||||
build.artifacts_metadata.migrate!(ArtifactUploader::REMOTE_STORE)
|
||||
print '.'
|
||||
rescue
|
||||
print 'F'
|
||||
|
||||
logger.info("Transferred artifacts of #{build.id} of #{build.artifacts_size} to object storage")
|
||||
rescue => e
|
||||
logger.error("Failed to transfer artifacts of #{build.id} with error: #{e.message}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue