From 650733849d0be316a70eabb22babdd540df07fa7 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Wed, 19 Jul 2023 14:08:43 -0700 Subject: [PATCH] builder: drop invalidation logic --- builder.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/builder.py b/builder.py index 11cc966..4177e7f 100755 --- a/builder.py +++ b/builder.py @@ -58,7 +58,6 @@ TARGETS = { } MANIFEST_URI = os.getenv("MANIFEST_URI") -CF_DISTRIBUTION = os.getenv("CF_DISTRIBUTION") S3_BUCKET = os.getenv("S3_BUCKET") @@ -144,19 +143,6 @@ def uploadToS3(source, destination): s3.upload_file(source, S3_BUCKET, destination) -def invalidateCF(path): - cf = boto3.client("cloudfront") - res = cf.create_invalidation( - DistributionId=CF_DISTRIBUTION, - InvalidationBatch={ - "Paths": {"Quantity": 1, "Items": [path]}, - "CallerReference": str(time.time()).replace(".", ""), - }, - ) - invalidation_id = res["Invalidation"]["Id"] - return invalidation_id - - def packageUpload(target): package = f"fedora-{RELEASE}-{target['id']}-{TODAY}.zip" @@ -213,14 +199,12 @@ def upload(target): packageUpload(target) manifestUpdate() uploadToS3("merged_installer_data.json", "installer_data.json") - invalidateCF("/installer_data.json") @cli.command() @click.option("--update/--no-update", default=False) @click.option("--upload/--no-upload", default=False) -@click.option("--invalidate/--no-invalidate", default=False) -def manifest(update, upload, invalidate): +def manifest(update, upload): if update: manifestUpdate() manifest = "merged_installer_data.json" @@ -231,9 +215,6 @@ def manifest(update, upload, invalidate): click.echo(json.dumps(manifest, indent=2)) - if invalidate: - invalidateCF("/installer_data.json") - @cli.command() def clean():