forked from admin/brencher
feat(configs): point hermes_infra at gitea admin/hermes ansible repos
backend/configs/hermes_infra.py was the last open config still using the legacy url=/branchNamePrefix= form, pointing at https://github.com/rudolf1/uber_backup.git. That URL never resolved (uber_backup doesn't exist on gitea) and github.com itself is unreachable from the brencher container (proxy HTTP 403 on CONNECT). Switch to the new remotes=[{name,url},...] form introduced by PR #3 (named-remotes), pointing at the actual repos that exist: - gitea_hermes: https://gitea.rudolf.keenetic.link/hermes/ansible - gitea_admin: https://gitea.rudolf.keenetic.link/admin/ansible Same form used in backend/configs/brencher.py (after PR #3) and backend/configs/docker_socket_proxy.py (PR #4). branchNamePrefix dropped: GitClone only applies its prefix refspec to a remote named "origin" (backend/steps/git.py ~L104), and neither remote here is named "origin". Scope: hermes_infra.py only. The other open configs (registry.py, gitea.py, hermes.py, immich.py, gmail_mcp.py, torrserv_proxy.py) still use the legacy form and are intentionally left for a future follow-up PR. Verified locally (no docker daemon): - py_compile backend/configs/hermes_infra.py: OK - Real import: clone.remotes is 2-entry list [gitea_hermes, gitea_admin], clone.urls derived from it, no github.com anywhere - env.id == 'hermes_infra', pipeline unchanged - deploy step: docker_compose_path == 'hermes_squid/stack-compose.yml' - pytest: 26/26 on no-docker/no-playwright suite - mypy: Success: no issues found - End-to-end smoke test (GitClone.progress() with both remotes pointed at file:///tmp/ansible-upstream): - both remotes created in the temp clone - 4 branches discovered (master + feat/docker-socket-proxy on each) - feat/docker-socket-proxy visible on both gitea_hermes and gitea_admin - no github.com in any remote URL After this PR merges, the brencher-bot deploying hermes_infra will clone from gitea (not github.com), so it can actually reach the source.
This commit is contained in:
@@ -4,7 +4,28 @@ from steps.docker import DockerComposeBuild, DockerSwarmCheck, DockerSwarmDeploy
|
||||
from steps.git import GitClone, CheckoutMerged, GitUnmerge
|
||||
from steps.shared_state import SharedStateHolderInMemory
|
||||
|
||||
clone = GitClone(url="https://github.com/rudolf1/uber_backup.git", branchNamePrefix="ansible")
|
||||
# Dual-remote clone for the ansible mirror (the deploy target, not brencher itself).
|
||||
# - gitea_hermes is where the feature branch lives (hermes/ansible:*)
|
||||
# - gitea_admin is the live-deploy source (where brencher-bot reads compose files from)
|
||||
#
|
||||
# Why not github? github.com is unreachable from the brencher container -- the
|
||||
# proxy returns HTTP 403 on CONNECT tunnel, so the URL would always fail to
|
||||
# fetch. See backend/configs/docker_socket_proxy.py for the same migration.
|
||||
#
|
||||
# Why drop branchNamePrefix? GitClone only applies its prefix refspec to a
|
||||
# remote named "origin" (backend/steps/git.py ~L104); neither remote here is
|
||||
# named "origin", so the prefix would be a silent no-op. Both remotes fetch
|
||||
# their full refset instead.
|
||||
#
|
||||
# Why two remotes? The deploy step (DockerSwarmDeploy) checks out a specific
|
||||
# branch and uses the resulting checkout as wd for the compose path. With
|
||||
# gitea_hermes as primary, feature branches opened in the fork are picked up;
|
||||
# gitea_admin provides the live-deploy source as a fallback / for cross-fork
|
||||
# PRs. This matches the form in backend/configs/brencher.py after PR #3.
|
||||
clone = GitClone(remotes=[
|
||||
{"name": "gitea_hermes", "url": "https://gitea.rudolf.keenetic.link/hermes/ansible"},
|
||||
{"name": "gitea_admin", "url": "https://gitea.rudolf.keenetic.link/admin/ansible"},
|
||||
])
|
||||
|
||||
dockerSwarmCheck = DockerSwarmCheck(
|
||||
stack_name="hermes_infra",
|
||||
|
||||
Reference in New Issue
Block a user