update: the history of the package is CHANGELOG.md, from which the build writes debian/changelog, the build, publish and development scripts are in Python, and the development tools keep their settings and credentials in .lm-dev-config.
Release / release (push) Failing after 14m43s
Release / release (push) Failing after 14m43s
This commit is contained in:
1 parent
a7bfabcb89
commit
6911d16fa3
26 files changed
+1966
-2105
No files matched your search
+12
-12
@@ -16,7 +16,6 @@ import argparse
|
||||
import importlib
|
||||
import ipaddress
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import secrets
|
||||
@@ -24,8 +23,8 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
from lm_dev import HANDOVER_DIR, ROOT, TESTS, VAULT_PORT, VaultError, config_path, enrol_instance, hand_over, \
|
||||
host_address, lxc_exec, newest_deb, store_secret, vault_initialise
|
||||
from lm_dev import HANDOVER_DIR, ROOT, TESTS, VAULT_PORT, MissingSetting, VaultError, config_path, enrol_instance, hand_over, \
|
||||
host_address, lxc_exec, newest_deb, setting, store_secret, vault_initialise
|
||||
|
||||
TMP = ROOT / 'tmp' / 'remote-test'
|
||||
|
||||
@@ -388,20 +387,21 @@ class Lab:
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||
parser.add_argument('scenarios', nargs='+', metavar='scenario', help=f'{", ".join(SCENARIOS)} or all')
|
||||
parser.add_argument('--remote', default=os.environ.get('LXD_REMOTE'), help='the lxc remote (LXD_REMOTE)')
|
||||
parser.add_argument('--pool', default=os.environ.get('LXD_POOL'),
|
||||
parser.add_argument('--remote', help='the lxc remote (LXD_REMOTE)')
|
||||
parser.add_argument('--pool',
|
||||
help='the storage pool of the project (LXD_POOL)')
|
||||
parser.add_argument('--project', default=os.environ.get('LXD_TEST_PROJECT', 'lm-test'),
|
||||
parser.add_argument('--project', default=setting('LXD_TEST_PROJECT', 'lm-test'),
|
||||
help='the project the instances live in (LXD_TEST_PROJECT, default lm-test)')
|
||||
parser.add_argument('--image', default=os.environ.get('LXD_IMAGE', 'ubuntu:26.04'),
|
||||
parser.add_argument('--image', default=setting('LXD_IMAGE', 'ubuntu:26.04'),
|
||||
help='the image of every instance (LXD_IMAGE, default ubuntu:26.04)')
|
||||
parser.add_argument('--keep', action='store_true', help='leave the project and the networks in place')
|
||||
parser.add_argument('--deb', help='the package to test (default the one built last, in out/ or out/dev/)')
|
||||
args = parser.parse_args()
|
||||
if not args.remote:
|
||||
parser.error('--remote or LXD_REMOTE is required')
|
||||
if not args.pool:
|
||||
parser.error('--pool or LXD_POOL is required')
|
||||
try:
|
||||
args.remote = args.remote or setting('LXD_REMOTE')
|
||||
args.pool = args.pool or setting('LXD_POOL')
|
||||
except MissingSetting as missing:
|
||||
parser.error(f'--{missing.name.removeprefix("LXD_").lower()} or {missing}')
|
||||
scenarios = SCENARIOS if args.scenarios == ['all'] else args.scenarios
|
||||
unknown = [name for name in scenarios if name not in SCENARIOS]
|
||||
if unknown:
|
||||
@@ -409,7 +409,7 @@ def main():
|
||||
|
||||
deb = pathlib.Path(args.deb) if args.deb else newest_deb()
|
||||
if deb is None or not deb.is_file():
|
||||
sys.exit(f'no package {args.deb}' if args.deb else 'no out/linux-manager_*_all.deb; run ./build.sh first')
|
||||
sys.exit(f'no package {args.deb}' if args.deb else 'no out/linux-manager_*_all.deb; run ./build.py first')
|
||||
if subprocess.run(['lxc', 'project', 'show', f'{args.remote}:{args.project}'], capture_output=True).returncode == 0:
|
||||
sys.exit(f'project {args.project} exists on {args.remote}; remove it or choose another with --project')
|
||||
|
||||
|
||||
Reference in new issue
Block a user