0e963f2194
Add top-level `vmgui` to open the VMware Workstation GUI (renamed from the earlier `vm open`). --vmx is optional: with it the GUI opens that VM, without it the GUI starts bare. Power-on/fullscreen flags ignored (with a notice) when no VMX is given. Needs an X display — sudo -u ci-runner strips $DISPLAY, so --display / xhost; see runbook §4.7. 9 tests; suite green ≥90%. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
62 lines
1.7 KiB
Python
62 lines
1.7 KiB
Python
"""CLI entry point.
|
|
|
|
Phase A2 ships ``wait-ready``, ``vm`` (remove/cleanup), ``monitor``
|
|
(disk/runner) and ``report`` (job). Phase A3 adds ``vm new``, ``build``,
|
|
``artifacts``. Subsequent phases add ``job``.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import time as time
|
|
|
|
import click
|
|
|
|
from ci_orchestrator import __version__
|
|
from ci_orchestrator.commands.artifacts import artifacts
|
|
from ci_orchestrator.commands.bench import bench
|
|
from ci_orchestrator.commands.build import build
|
|
from ci_orchestrator.commands.creds import creds
|
|
from ci_orchestrator.commands.job import job
|
|
from ci_orchestrator.commands.monitor import monitor
|
|
from ci_orchestrator.commands.report import report
|
|
from ci_orchestrator.commands.retention import retention
|
|
from ci_orchestrator.commands.smoke import smoke
|
|
from ci_orchestrator.commands.template import template
|
|
from ci_orchestrator.commands.validate import validate
|
|
from ci_orchestrator.commands.vm import vm, vmgui
|
|
|
|
# Re-export so legacy A1 tests that patched ``cli_module.<name>`` keep working.
|
|
from ci_orchestrator.commands.wait import ( # noqa: F401 (intentional re-exports)
|
|
KeyringCredentialStore,
|
|
SshTransport,
|
|
WinRmTransport,
|
|
load_backend,
|
|
wait_ready,
|
|
)
|
|
|
|
|
|
@click.group()
|
|
@click.version_option(__version__, prog_name="ci-orchestrator")
|
|
def cli() -> None:
|
|
"""Local CI/CD orchestrator."""
|
|
|
|
|
|
cli.add_command(wait_ready)
|
|
cli.add_command(vm)
|
|
cli.add_command(build)
|
|
cli.add_command(artifacts)
|
|
cli.add_command(monitor)
|
|
cli.add_command(report)
|
|
cli.add_command(retention)
|
|
cli.add_command(template)
|
|
cli.add_command(job)
|
|
cli.add_command(bench)
|
|
cli.add_command(smoke)
|
|
cli.add_command(validate)
|
|
cli.add_command(creds)
|
|
cli.add_command(vmgui)
|
|
|
|
|
|
if __name__ == "__main__": # pragma: no cover
|
|
cli()
|