Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-04-06 16:38:13 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-04-06 16:38:13 +0300
commit788941616b8f65069db0e4a2c07bbebb4739b2ee (patch)
tree0893e9cd086f7b2a9e3e3bc2d6af1dcad9ccdc5b /app/services
parent0ac833899efd7965ff25627ead378fa30f51db50 (diff)
parent86758aa134b08f561a89c5a3c067b952bdb61b28 (diff)
Merge branch 'remove-pages-tar-support' into 'master'
Remove support for legacy tar.gz pages artifacts See merge request gitlab-org/gitlab-ce!18090
Diffstat (limited to 'app/services')
-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?