Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bc448961a | ||
|
|
c5b61a3294 |
No files matched your search
@@ -12,7 +12,7 @@ action to its bash source and the behaviors that must match.
|
||||
| configure/systemd | actions/configure/systemd | render each unit -> /etc/systemd/system; daemon-reload; enable+start .service |
|
||||
| configure/routing | actions/configure/routing | ip_forward=1; fwmark 0x1->table100 rule; local default route table100 (idempotent) |
|
||||
| configure | (new umbrella) | run base,ufw,crowdsec,cron,systemd,routing in order |
|
||||
| sync/repository | actions/sync/repository | sync/<node> branch; add -A + commons submodule; commit; rebase origin/trunk; force-with-lease; telegram |
|
||||
| sync/repository | actions/sync/repository | sync/<node> branch; add -A + commons submodule; commit; rebase origin/main (was trunk in the monorepo); force-with-lease; telegram |
|
||||
| sync/packages | actions/sync/packages | apt --just-print upgrade Inst list; docker+skopeo digest compare; telegram info |
|
||||
| backup/run | actions/sync/tiers (restic-backup) | init-if-needed; backup /data/@tier1,2 --host --tag com-ermnvldmr-root-<node>; forget --prune 7/4/12; telegram |
|
||||
| tiers/link | actions/tiers/link | node + per-project @tierN symlinks; shared/ links; .env symlink |
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# actions/sync/repository.py
|
||||
"""Port of sync/repository — capture-up commit + rebase onto origin/trunk + force-push."""
|
||||
"""Port of sync/repository — capture-up commit + rebase onto origin/main + force-push."""
|
||||
import os
|
||||
from datetime import datetime
|
||||
from engine.descriptor import Meta, Arg
|
||||
|
||||
METADATA = Meta(summary="Capture-up: commit node changes, rebase onto origin/trunk, force-push sync/<node>.",
|
||||
METADATA = Meta(summary="Capture-up: commit node changes, rebase onto origin/main, force-push sync/<node>.",
|
||||
args=[Arg("telegram_bot_url", "Telegram Bot URL for notifications")])
|
||||
TITLE = "Annual Remote Sync"
|
||||
|
||||
@@ -41,8 +41,8 @@ def run(ctx, args):
|
||||
git("commit", "-m", f"[{node}] Auto-commit: {ts}")
|
||||
else:
|
||||
log.info("No changes to commit.")
|
||||
git("fetch", "origin", "trunk")
|
||||
if git("rebase", "origin/trunk", check=False).returncode != 0:
|
||||
git("fetch", "origin", "main")
|
||||
if git("rebase", "origin/main", check=False).returncode != 0:
|
||||
log.error("Rebase conflict — aborting rebase; manual intervention required.")
|
||||
git("rebase", "--abort", check=False)
|
||||
ctx.notify.error(TITLE, url, "Rebase conflict. Manual intervention required.", node)
|
||||
|
||||
@@ -26,9 +26,11 @@ def run(ctx, args):
|
||||
targets = [f"/workdir/{f}" for f in files_string.splitlines()]
|
||||
|
||||
log.info("Running dclint --fix (via docker)...")
|
||||
# "-e commons": never --fix inside the pinned submodule — a dirtied commons makes
|
||||
# sync/repository abort the nightly capture-up.
|
||||
r = s.run(["docker", "run", "--rm", "-v", f"{repo}:/workdir", "-w", "/workdir", "node:lts-alpine",
|
||||
"npx", "--yes", "dclint", "-e", "@tier1", "-e", "@tier2", "-e", "@tier3", "-e", ".env",
|
||||
"-r", "--fix", *targets], check=False)
|
||||
"-e", "commons", "-r", "--fix", *targets], check=False)
|
||||
if r.returncode != 0:
|
||||
log.error(f"dclint issues (exit {r.returncode})."); return r.returncode or rc_ip
|
||||
if args.hook and files_string:
|
||||
|
||||
Reference in new issue
Block a user