1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-06-24 21:25:23 +00:00

Fix artifact cleanup

This commit is contained in:
Michael Hollister 2024-10-21 13:51:00 -05:00
parent 736b0c9fdc
commit 977ac3328b

View file

@ -1,3 +1,4 @@
import glob
import os
import hashlib
import boto3
@ -63,8 +64,8 @@ def copy_artifacts_to_local_cache():
shutil.copytree('/artifacts', dst, dirs_exist_ok=True, ignore=shutil.ignore_patterns('*.w*'))
# Clean up old job artifacts
shutil.rmtree('/artifacts')
os.makedirs('/artifacts', exist_ok=True)
for file in glob.glob(os.path.join('/artifacts', '*')):
os.remove(file)
return version
def sync_local_cache():