From 7c440e8e97f2c231d3216f92017ae3dbf1fd6217 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 6 Apr 2021 15:34:11 +0700 Subject: Temporarily generate lists of current branch builds only as a hotfix. --- scripts/list-nightly-builds.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/list-nightly-builds.py b/scripts/list-nightly-builds.py index 042fd29..e75fdde 100755 --- a/scripts/list-nightly-builds.py +++ b/scripts/list-nightly-builds.py @@ -21,7 +21,7 @@ bucket = os.getenv("SNAPSHOTS_BUCKET") def make_link(s, f): f = re.sub(r'\s+', '+', f) - return "https://s3.amazonaws.com/{0}/rolling/{1}".format(bucket, f) + return "https://s3.amazonaws.com/{0}/rolling/current/{1}".format(bucket, f) def compare(l, r): try: @@ -39,16 +39,15 @@ def compare(l, r): s3 = boto3.client('s3') -object_listing = s3.list_objects_v2(Bucket=bucket, Prefix='rolling') +object_listing = s3.list_objects_v2(Bucket=bucket, Prefix='rolling/current') data = object_listing['Contents'] files = [] for f in data: files.append(f['Key']) -file_names = list(set(map(lambda s: re.sub(r'rolling/(.*?)', r'\1', s), files))) +file_names = list(set(map(lambda s: re.sub(r'rolling/current/(.*?)', r'\1', s), files))) file_names.sort(reverse=True, key=cmp_to_key(compare)) -file_names.remove('vyos-rolling-latest.iso') builds = [] @@ -61,11 +60,8 @@ for name in file_names: tmpl = jinja2.Template(""" """) - -print(tmpl.render(latest=make_link('rolling', 'vyos-rolling-latest.iso'), builds=builds)) -- cgit v1.2.3