Skip to content
Snippets Groups Projects
Commit f5e3d93c authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Check which folders and archives should be packed before passing to tar command.

parent 3b1f68e4
No related branches found
No related tags found
1 merge request!1824Check which folders and archives should be packed before passing to tar command.
Pipeline #
Loading
@@ -150,17 +150,15 @@ module Backup
Loading
@@ -150,17 +150,15 @@ module Backup
private private
   
def backup_contents def backup_contents
folders_to_backup + ["uploads.tar.gz", "builds.tar.gz", "artifacts.tar.gz", "backup_information.yml"] folders_to_backup + archives_to_backup + ["backup_information.yml"]
end end
   
def folders_to_backup def archives_to_backup
folders = %w{repositories db} %w{uploads builds artifacts}.map{ |name| (name + ".tar.gz") unless skipped?(name) }.compact
end
if ENV["SKIP"]
return folders.reject{ |folder| ENV["SKIP"].include?(folder) }
end
   
folders def folders_to_backup
%w{repositories db}.map{ |name| name unless skipped?(name) }.compact
end end
   
def settings def settings
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment