diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-03-30 16:32:21 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-05 10:21:51 +0200 |
commit | 84ee2ddbcd850d29ae852333c57e2e8381f5a535 (patch) | |
tree | 2ca70f7c2efa3c3828a9c4356bcc7d76c3872a67 /app | |
parent | d5d7bcf8b7404a436c577e2b112aa59dc2901378 (diff) | |
download | gitlab-ce-84ee2ddbcd850d29ae852333c57e2e8381f5a535.tar.gz |
Export LFS Objects when exporting a project
The LFS files will be included in the `lfs-objects` directory in the archive.
Diffstat (limited to 'app')
-rw-r--r-- | app/services/projects/import_export/export_service.rb | 6 | ||||
-rw-r--r-- | app/views/projects/_export.html.haml | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/services/projects/import_export/export_service.rb b/app/services/projects/import_export/export_service.rb index 402cddd3ec1..7bf0b90b491 100644 --- a/app/services/projects/import_export/export_service.rb +++ b/app/services/projects/import_export/export_service.rb @@ -28,7 +28,7 @@ module Projects end def save_services - [version_saver, avatar_saver, project_tree_saver, uploads_saver, repo_saver, wiki_repo_saver].all?(&:save) + [version_saver, avatar_saver, project_tree_saver, uploads_saver, repo_saver, wiki_repo_saver, lfs_saver].all?(&:save) end def version_saver @@ -55,6 +55,10 @@ module Projects Gitlab::ImportExport::WikiRepoSaver.new(project: project, shared: @shared) end + def lfs_saver + Gitlab::ImportExport::LfsSaver.new(project: project, shared: @shared) + end + def cleanup_and_notify_error Rails.logger.error("Import/Export - Project #{project.name} with ID: #{project.id} export error - #{@shared.errors.join(', ')}") diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml index 825bfd0707f..1e7d9444986 100644 --- a/app/views/projects/_export.html.haml +++ b/app/views/projects/_export.html.haml @@ -21,11 +21,11 @@ %li Project uploads %li Project configuration including web hooks and services %li Issues with comments, merge requests with diffs and comments, labels, milestones, snippets, and other project entities + %li LFS objects %p The following items will NOT be exported: %ul %li Job traces and artifacts - %li LFS objects %li Container registry images %li CI variables %li Any encrypted tokens |