diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-09-23 17:55:45 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-09-23 17:55:45 +0200 |
commit | c9cbe5fc5250d9df9ade95e01aab7ae420c33197 (patch) | |
tree | 57700d3d9f8a1ebe16edbdced9944b0464a7170e /scenarios/fragments/flavor.py | |
parent | 0664442648a8fd3627fc3d72c3bb33155612aadf (diff) | |
download | mknet-c9cbe5fc5250d9df9ade95e01aab7ae420c33197.tar.gz mknet-c9cbe5fc5250d9df9ade95e01aab7ae420c33197.zip |
Add some support for minio
Diffstat (limited to 'scenarios/fragments/flavor.py')
-rw-r--r-- | scenarios/fragments/flavor.py | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/scenarios/fragments/flavor.py b/scenarios/fragments/flavor.py index eeb8345..87c4e9d 100644 --- a/scenarios/fragments/flavor.py +++ b/scenarios/fragments/flavor.py @@ -2,14 +2,20 @@ from pathlib import Path from . import shared from os.path import exists -def add_path(d): +def grg_path(d): for flav, desc in d.items(): if "path" in desc: continue binary = f"garage-{desc['target']}-{desc['version']}" desc['path'] = Path(shared.binary_path) / binary return d -garage = add_path({ +def minio_path(d): + for flav, desc in d.items(): + if "path" in desc: continue + desc['path'] = Path(shared.binary_path) / flav + return d + +garage = grg_path({ "garage-local": { "path": "./garage/target/release/garage" }, "garage-v0.7": { "version": "v0.7.3", @@ -23,6 +29,12 @@ warp = { "warp-default": "mixed" } +minio = minio_path({ + "minio-20220917": { + "version": "2022-09-17T00-09-45Z" + } +}) + def download(): for flav, desc in garage.items(): @@ -33,3 +45,13 @@ def download(): shared.exec(f"wget https://garagehq.deuxfleurs.fr/_releases/{desc['version']}/{desc['target']}/garage -O {desc['path']}") shared.exec(f"chmod +x {desc['path']}") shared.exec(f"{desc['path']} --version") + + for flav, desc in minio.items(): + if "version" not in desc: continue + if exists(desc['path']): continue + + shared.exec(f"mkdir -p {shared.binary_path}") + shared.exec(f"wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.{desc['version']} -O {desc['path']}") + shared.exec(f"chmod +x {desc['path']}") + shared.exec(f"{desc['path']} --version") + |