diff options
author | Daniil Baturin <daniil@baturin.org> | 2022-08-14 16:53:44 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2022-08-14 16:53:44 +0100 |
commit | 197323a832082991aec0c287ee6a5b1620f6067c (patch) | |
tree | 56389958b933f868da9100dc096570dcc89226de | |
parent | 4675abe6c47f69f05441db596a79cbada1137135 (diff) | |
download | community.vyos.net-197323a832082991aec0c287ee6a5b1620f6067c.tar.gz community.vyos.net-197323a832082991aec0c287ee6a5b1620f6067c.zip |
Remove snapshots page
-rwxr-xr-x | scripts/list-snapshots.py | 80 | ||||
-rw-r--r-- | site/get/index.md | 9 | ||||
-rw-r--r-- | site/get/snapshots.md | 11 | ||||
-rw-r--r-- | soupault.toml | 10 |
4 files changed, 0 insertions, 110 deletions
diff --git a/scripts/list-snapshots.py b/scripts/list-snapshots.py deleted file mode 100755 index bea96fa..0000000 --- a/scripts/list-snapshots.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python3 - -# Requires the following environment variables: -# SNAPSHOTS_BUCKET -# AWS_ACCESS_KEY_ID -# AWS_SECRET_ACCESS_KEY - -import os -import re -import json - -import boto3 - -import jinja2 - -from functools import cmp_to_key - -bucket = os.getenv("SNAPSHOTS_BUCKET") - -def make_link(f): - f = re.sub(r'\s+', '+', f) - return "https://s3-us.vyos.io/{0}".format(f) - -def natural_sort(iterable, reverse=False): - import re - from jinja2.runtime import Undefined - - if isinstance(iterable, Undefined) or iterable is None: - return list() - - def convert(text): - return int(text) if text.isdigit() else text.lower() - def alphanum_key(key): - return [convert(c) for c in re.split('([0-9]+)', str(key))] - - return sorted(iterable, key=alphanum_key, reverse=reverse) - - -s3 = boto3.client('s3') -object_listing = s3.list_objects_v2(Bucket=bucket, Prefix='snapshot') -data = object_listing['Contents'] - -files = [] -for f in data: - files.append(f['Key']) - -snapshot_names = set(map(lambda s: re.sub(r'snapshot/(.*?)/.*', r'\1', s), files)) - -snapshots = [] - - -for name in snapshot_names: - snapshot = {} - snapshot['name'] = name - snapshot['files'] = list(filter(lambda s: re.search(name, s), files)) - - snapshot_files = list(filter(lambda s: re.search(name, s), files)) - snapshot_files = list(map(lambda f: {'name': os.path.basename(f).strip(), 'platform': os.path.basename(os.path.dirname(f)), 'link': make_link(f)}, snapshot_files)) - - # S3 listing sometimes returns dir names among file names... filter those out. - snapshot_files = list(filter(lambda f: f['name'] != "", snapshot_files)) - - snapshot['files'] = snapshot_files - - snapshots.append(snapshot) - -snapshots = natural_sort(snapshots, reverse=True) - -tmpl = jinja2.Template(""" -{% for s in snapshots %} - <h3 id="{{s.name}}"><a href="#{{s.name}}">#</a> {{s.name}}</h3> - <ul> - {% for f in s.files %} - <li><a href="{{f.link}}">{{f.name}} ({{f.platform}})</a></li> - {% endfor %} - </ul> -{% endfor %} -""") - -print(tmpl.render(snapshots=snapshots)) diff --git a/site/get/index.md b/site/get/index.md index 2656935..b05fcd7 100644 --- a/site/get/index.md +++ b/site/get/index.md @@ -21,15 +21,6 @@ Nightly builds are for you if you... Go to the [nightly builds page](/get/nightly-builds). -## Monthly snapshots - -Monthly snapshots receive some testing to ensure they aren't badly broken. -They include all experimental features. - -We recommend them for home networks, lab use, and non-critical production routers. - -Get them from our [snapshots page](/get/snapshots). - ## LTS release Prebuilt LTS release images are available to people and companies who help us move the project diff --git a/site/get/snapshots.md b/site/get/snapshots.md deleted file mode 100644 index 639d333..0000000 --- a/site/get/snapshots.md +++ /dev/null @@ -1,11 +0,0 @@ -# VyOS monthly snapshots and release candidates - -VyOS snapshots are built from the current development roughly every month. -They receive some testing to ensure they aren't broken, -but they do include experimental features. - -Release candidates are being built when an upcoming LTS release is under active testing. -In that phase, we suspend the "snapshot" process and replace it with a "release candidate" -process that has no particular schedule: there can be many of them each month, or not. - -## Available snapshots diff --git a/soupault.toml b/soupault.toml index f22b0b9..ec9e6ac 100644 --- a/soupault.toml +++ b/soupault.toml @@ -65,16 +65,6 @@ Disallow: / """ profile = "staging" -# Generates a list of available snapshots from S3 -[widgets.list-snapshots] - widget = "exec" - command = "scripts/list-snapshots.py" - selector = "div#content" - action = "append_child" - - page = "get/snapshots.md" - profile = "live" - ## Nightly build image listing generator ## # Inserts containers for current and equuleus lists |