summaryrefslogtreecommitdiff
path: root/app/services/projects
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-03-29 19:37:00 +0200
committerJacob Vosmaer <jacob@gitlab.com>2018-04-03 17:31:22 +0200
commit6c55a9d8f29a4d934dab2c3294c319bb8592fe2b (patch)
tree9fbeff0fcfdc4956c1acb84bb3af59675c785544 /app/services/projects
parent4131c39a0bc41dbddabb2e110316e5048c907aa4 (diff)
downloadgitlab-ce-6c55a9d8f29a4d934dab2c3294c319bb8592fe2b.tar.gz
Remove support for legacy tar.gz pages artifacts
Diffstat (limited to 'app/services/projects')
-rw-r--r--app/services/projects/update_pages_service.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/app/services/projects/update_pages_service.rb b/app/services/projects/update_pages_service.rb
index 7e228d1833d..de77f6bf585 100644
--- a/app/services/projects/update_pages_service.rb
+++ b/app/services/projects/update_pages_service.rb
@@ -74,25 +74,13 @@ module Projects
end
def extract_archive!(temp_path)
- if artifacts.ends_with?('.tar.gz') || artifacts.ends_with?('.tgz')
- extract_tar_archive!(temp_path)
- elsif artifacts.ends_with?('.zip')
+ if artifacts.ends_with?('.zip')
extract_zip_archive!(temp_path)
else
raise InvaildStateError, 'unsupported artifacts format'
end
end
- def extract_tar_archive!(temp_path)
- build.artifacts_file.use_file do |artifacts_path|
- results = Open3.pipeline(%W(gunzip -c #{artifacts_path}),
- %W(dd bs=#{BLOCK_SIZE} count=#{blocks}),
- %W(tar -x -C #{temp_path} #{SITE_PATH}),
- err: '/dev/null')
- raise FailedToExtractError, 'pages failed to extract' unless results.compact.all?(&:success?)
- end
- end
-
def extract_zip_archive!(temp_path)
raise InvaildStateError, 'missing artifacts metadata' unless build.artifacts_metadata?