Skip to content
Snippets Groups Projects
Unverified Commit 36607078 authored by Z.J. van de Weg's avatar Z.J. van de Weg Committed by Kamil Trzcinski
Browse files

Remove tar support for gitlab pages

parent 1c7f1052
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -38,8 +38,8 @@ module Projects
rescue => e
error(e.message)
ensure
job.erase_artifacts! unless job.has_expiring_artifacts?
FileUtils.rm_rf(artifacts) if Gitlab.config.artifacts.object_store.enabled
job.erase_artifacts! unless job.has_expiring_artifacts?
FileUtils.rm_rf(artifacts) if Gitlab.config.artifacts.object_store.enabled
end
 
private
Loading
Loading
@@ -69,24 +69,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 'unsupported artifacts format'
end
end
 
def extract_tar_archive!(temp_path)
results = Open3.pipeline(%W(gunzip -c #{artifacts}),
%W(dd bs=#{BLOCK_SIZE} count=#{blocks}),
%W(tar -x -C #{temp_path} #{SITE_PATH}),
err: '/dev/null')
raise 'pages failed to extract' unless results.compact.all?(&:success?)
end
def extract_zip_archive!(temp_path)
raise 'missing artifacts metadata' unless job.artifacts_metadata?
 
Loading
Loading
Loading
Loading
@@ -39,6 +39,6 @@ module ObjectStoreable
end
 
def use_object_store?
@storage_options.object_stor.enabled
@storage_options.object_store.enabled
end
end
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