diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2018-03-29 20:37:00 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2018-04-03 18:31:22 +0300 |
commit | 6c55a9d8f29a4d934dab2c3294c319bb8592fe2b (patch) | |
tree | 9fbeff0fcfdc4956c1acb84bb3af59675c785544 /app/services | |
parent | 4131c39a0bc41dbddabb2e110316e5048c907aa4 (diff) |
Remove support for legacy tar.gz pages artifacts
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/projects/update_pages_service.rb | 14 |
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? |