diff --git a/CHANGELOG.md b/CHANGELOG.md index 16c7413421..4fd5d8503f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ Recommendation: for ease of reading, use the following order: - Updated our crate dependencies so they can be built in isolation ### Fixed - `--yes / -y` flag: fixed when working from a TTY +- CI: Fixes `kamu-base-with-data-mt` image builds ## [0.204.4] - 2024-09-30 ### Changed diff --git a/images/kamu-base-with-data-mt/extra/.kamuconfig b/images/kamu-base-with-data-mt/extra/.kamuconfig index 0462429714..68000e8f80 100644 --- a/images/kamu-base-with-data-mt/extra/.kamuconfig +++ b/images/kamu-base-with-data-mt/extra/.kamuconfig @@ -3,6 +3,9 @@ version: 1 content: users: predefined: + - accountName: kamu + isAdmin: true + avatarUrl: https://avatars.githubusercontent.com/u/50896974?s=200&v=4 - accountName: sh101-bowen avatarUrl: https://cdn-icons-png.flaticon.com/512/3118/3118054.png - accountName: sh102-gambier diff --git a/images/kamu-base-with-data-mt/init-workspace.py b/images/kamu-base-with-data-mt/init-workspace.py index 1d2b50a361..286c24ce44 100755 --- a/images/kamu-base-with-data-mt/init-workspace.py +++ b/images/kamu-base-with-data-mt/init-workspace.py @@ -1,48 +1,55 @@ #!/usr/bin/env python -import os -import sys +import shutil import subprocess +from pathlib import Path ############################################################################### +CURRENT_PATH = Path(__file__).resolve().parent S3_REPO_URL = "s3://datasets.kamu.dev/odf/v2/example-mt/" + ############################################################################### def s3_listdir(url): return [ line.strip().split(' ')[1] for line in subprocess.run( - f"aws s3 ls {url}", - shell=True, + f"aws s3 ls {url}", + shell=True, text=True, check=True, capture_output=True, ).stdout.splitlines() ] + def s3_cat(url): return subprocess.run( - f"aws s3 cp {url} -", - shell=True, + f"aws s3 cp {url} -", + shell=True, text=True, check=True, capture_output=True, ).stdout.strip() + ############################################################################### subprocess.run( - "kamu init --multi-tenant --exists-ok", + "kamu init --multi-tenant --exists-ok", shell=True, check=True, ) +shutil.copy(CURRENT_PATH / "extra/.kamuconfig", ".kamuconfig") + for did in s3_listdir(S3_REPO_URL): url = S3_REPO_URL + did alias = s3_cat(f"{S3_REPO_URL}{did}info/alias") account, name = alias.split('/', 1) + subprocess.run( f"kamu --account {account} pull --no-alias {url} --as {name}", shell=True,