docs,config: aggiorna AGENTS.md, config.example, HOST-SETUP.md, checklist faseA e fix vari orchestrator (workstation, build, job, wait, winrm, test)

This commit is contained in:
Simone
2026-05-17 00:14:04 +02:00
parent dc8449a0d7
commit e810747557
10 changed files with 135 additions and 52 deletions
+21 -6
View File
@@ -135,14 +135,14 @@ def _wait_running(
def _wait_for_ip(
backend: VmBackend, handle: VmHandle, deadline: float, poll: float
) -> str | None:
while _now() < deadline:
while (now := _now()) < deadline:
call_timeout = min(poll, deadline - now)
try:
ip = backend.get_ip(handle)
ip = backend.get_ip(handle, timeout=call_timeout)
except BackendError:
ip = None
if ip:
return ip
time.sleep(poll)
return None
@@ -328,7 +328,22 @@ def job(
"""
# Reserved for future host-side clone variant; the Python port always
# provisions sources via in-guest ``git clone``.
del submodules, use_git_clone, gitea_credential_target
del submodules, use_git_clone
# Inject Gitea credentials into HTTP(S) clone URL so git doesn't prompt.
authed_repo_url = repo_url
if repo_url and repo_url.startswith(("http://", "https://")):
from urllib.parse import urlparse, urlunparse
try:
gitea_cred = KeyringCredentialStore().get(gitea_credential_target)
parsed = urlparse(repo_url)
host = parsed.hostname or ""
port_part = f":{parsed.port}" if parsed.port else ""
netloc = f"{gitea_cred.username}:{gitea_cred.password}@{host}{port_part}"
authed_repo_url = urlunparse(parsed._replace(netloc=netloc))
except Exception:
pass # no credential stored — try unauthenticated (public repo)
config: Config = load_config()
if not template_path:
@@ -463,7 +478,7 @@ def job(
workdir="/opt/ci/build",
output_dir="/opt/ci/output",
host_source_dir=None,
clone_url=repo_url,
clone_url=authed_repo_url,
clone_branch=branch,
clone_commit=commit,
clone_submodules=False,
@@ -479,7 +494,7 @@ def job(
workdir="C:\\CI\\build",
artifact_zip="C:\\CI\\output\\artifacts.zip",
host_source_dir=None,
clone_url=repo_url,
clone_url=authed_repo_url,
clone_branch=branch,
clone_commit=commit,
clone_submodules=False,