diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-23 18:17:07 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-23 22:18:39 +0300 |
commit | 12bd78103153fce845eed1566918083b52e814df (patch) | |
tree | 1cf329a537518503b54cde6edcc78f00a23bae65 /lib/tasks | |
parent | 3c18a4f8aaf88dcea8c22995814057d1885c654c (diff) |
Fix backups if registry is disabled
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/backup.rake | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/tasks/gitlab/backup.rake b/lib/tasks/gitlab/backup.rake index d97d974ec20..596eaca6d0d 100644 --- a/lib/tasks/gitlab/backup.rake +++ b/lib/tasks/gitlab/backup.rake @@ -179,18 +179,26 @@ namespace :gitlab do task create: :environment do $progress.puts "Dumping container registry images ... ".blue - if ENV["SKIP"] && ENV["SKIP"].include?("registry") - $progress.puts "[SKIPPED]".cyan + if Gitlab.config.registry.enabled + if ENV["SKIP"] && ENV["SKIP"].include?("registry") + $progress.puts "[SKIPPED]".cyan + else + Backup::Registry.new.dump + $progress.puts "done".green + end else - Backup::Registry.new.dump - $progress.puts "done".green + $progress.puts "[DISABLED]".cyan end end task restore: :environment do $progress.puts "Restoring container registry images ... ".blue - Backup::Registry.new.restore - $progress.puts "done".green + if Gitlab.config.registry.enabled + Backup::Registry.new.restore + $progress.puts "done".green + else + $progress.puts "[DISABLED]".cyan + end end end |