1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-07-20 23:17:00 +00:00

Actually fix artifact cleanup

This commit is contained in:
Michael Hollister 2024-10-21 14:04:47 -05:00
parent 977ac3328b
commit 5bdce48bb3

View file

@ -1,4 +1,3 @@
import glob
import os import os
import hashlib import hashlib
import boto3 import boto3
@ -63,9 +62,9 @@ def copy_artifacts_to_local_cache():
print(f'Current app version: {version}') print(f'Current app version: {version}')
shutil.copytree('/artifacts', dst, dirs_exist_ok=True, ignore=shutil.ignore_patterns('*.w*')) shutil.copytree('/artifacts', dst, dirs_exist_ok=True, ignore=shutil.ignore_patterns('*.w*'))
# Clean up old job artifacts for dir in os.listdir('/artifacts'):
for file in glob.glob(os.path.join('/artifacts', '*')): shutil.rmtree(os.path.join('/artifacts', dir))
os.remove(file)
return version return version
def sync_local_cache(): def sync_local_cache():
@ -126,9 +125,9 @@ def update_website():
# CI Operations # CI Operations
current_version = copy_artifacts_to_local_cache() current_version = copy_artifacts_to_local_cache()
sync_local_cache() # sync_local_cache()
# generate_delta_updates(current_version) # generate_delta_updates(current_version)
upload_local_cache() # upload_local_cache()
# generate_previous_releases_page() # generate_previous_releases_page()
# update_website() # update_website()