diff options
author | Jeff Stubler <brunsa2@gmail.com> | 2015-11-12 09:05:29 -0600 |
---|---|---|
committer | Jeff Stubler <brunsa2@gmail.com> | 2015-11-12 09:05:29 -0600 |
commit | 64ca9cf3e4a56a19f09160a91c5433d2ddb632cf (patch) | |
tree | f114ab02adb4815058fe7b84a1527ac5ed7a597e /lib/tasks/gitlab/backup.rake | |
parent | e0c64fac68b4b3acc48300956146b85e03b426ce (diff) | |
parent | 12b35c6fe85073d809a764d24b51937f63b9d098 (diff) | |
download | gitlab-ce-64ca9cf3e4a56a19f09160a91c5433d2ddb632cf.tar.gz |
Merge branch 'master' into diverging-branch-graphs
Diffstat (limited to 'lib/tasks/gitlab/backup.rake')
-rw-r--r-- | lib/tasks/gitlab/backup.rake | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/backup.rake b/lib/tasks/gitlab/backup.rake index f20c7f71ba5..3c46bcea40e 100644 --- a/lib/tasks/gitlab/backup.rake +++ b/lib/tasks/gitlab/backup.rake @@ -12,6 +12,7 @@ namespace :gitlab do Rake::Task["gitlab:backup:repo:create"].invoke Rake::Task["gitlab:backup:uploads:create"].invoke Rake::Task["gitlab:backup:builds:create"].invoke + Rake::Task["gitlab:backup:artifacts:create"].invoke backup = Backup::Manager.new backup.pack @@ -32,6 +33,7 @@ namespace :gitlab do Rake::Task["gitlab:backup:repo:restore"].invoke unless backup.skipped?("repositories") Rake::Task["gitlab:backup:uploads:restore"].invoke unless backup.skipped?("uploads") Rake::Task["gitlab:backup:builds:restore"].invoke unless backup.skipped?("builds") + Rake::Task["gitlab:backup:artifacts:restore"].invoke unless backup.skipped?("artifacts") Rake::Task["gitlab:shell:setup"].invoke backup.cleanup @@ -113,6 +115,25 @@ namespace :gitlab do end end + namespace :artifacts do + task create: :environment do + $progress.puts "Dumping artifacts ... ".blue + + if ENV["SKIP"] && ENV["SKIP"].include?("artifacts") + $progress.puts "[SKIPPED]".cyan + else + Backup::Artifacts.new.dump + $progress.puts "done".green + end + end + + task restore: :environment do + $progress.puts "Restoring artifacts ... ".blue + Backup::Artifacts.new.restore + $progress.puts "done".green + end + end + def configure_cron_mode if ENV['CRON'] # We need an object we can say 'puts' and 'print' to; let's use a |