Commit 14ed058c authored by Nico's avatar Nico
Browse files

use extract_zip function

parent 2b36648f
......@@ -74,15 +74,7 @@ for job in pipeline_jobs:
for chunk in artifact_request.iter_content(chunk_size=1024*1024):
artifact_temp.write(chunk)
with zipfile.ZipFile(artifact_temp) as artifact_zip:
version = find_version_from_archive(artifact_zip.infolist())
if not os.path.exists(version):
print(version)
artifact_zip.extractall("gluon/output/")
os.rename("gluon/output", version)
if args.pipeline_id_file:
with open(args.pipeline_id_file, "w") as pipeline_id_file:
pipeline_id_file.write(str(pipeline_id))
else:
print(f"'{version}' already exists")
sys.exit(1)
extract_zip(artifact_temp)
if args.pipeline_id_file:
with open(args.pipeline_id_file, "w") as pipeline_id_file:
pipeline_id_file.write(str(pipeline_id))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment