restore support for auto-unpack on artifact download
cos someone forgot that was a thing.master
parent
72ca952e6c
commit
997222adb8
|
|
@ -202,14 +202,22 @@ def unpack_artifacts(path_to_artifacts_directory, config):
|
||||||
print(f"An error occurred while creating unpack_folder folder from {build_type_dir} and {os_folder}: {e}")
|
print(f"An error occurred while creating unpack_folder folder from {build_type_dir} and {os_folder}: {e}")
|
||||||
continue
|
continue
|
||||||
print(f"unpacking {filename} to {unpack_folder}")
|
print(f"unpacking {filename} to {unpack_folder}")
|
||||||
try:
|
if os.path.isfile(file):
|
||||||
unzip_file(file, unpack_folder)
|
# this is an actual zip file
|
||||||
except zipfile.BadZipFile:
|
try:
|
||||||
print(f"Skipping {file} as it is not a valid zip file")
|
unzip_file(file, unpack_folder)
|
||||||
continue
|
except zipfile.BadZipFile:
|
||||||
except Exception as e:
|
print(f"Skipping {file} as it is not a valid zip file")
|
||||||
print(f"An error occurred while unpacking {file}: {e} , skipping file {filename}")
|
continue
|
||||||
continue
|
except Exception as e:
|
||||||
|
print(f"An error occurred while unpacking {file}: {e} , skipping file {filename}")
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
# Create the destination folder if it doesn't exist
|
||||||
|
# if not os.path.exists(unpack_folder):
|
||||||
|
# os.makedirs(unpack_folder)
|
||||||
|
# Copy the contents of the source folder to the destination folder recursively
|
||||||
|
shutil.copytree(file, unpack_folder, dirs_exist_ok=True)
|
||||||
|
|
||||||
if build_type not in build_types_found:
|
if build_type not in build_types_found:
|
||||||
build_types_found[build_type] = {
|
build_types_found[build_type] = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue