From 092183ca3024682accac8b7d51b5877aa23b6b06 Mon Sep 17 00:00:00 2001 From: mi <1+mi@noreply.git.javagil.de> Date: Fri, 4 Sep 2026 13:33:08 +0200 Subject: [PATCH] Clone the watched repository from Gitea by default (#21) The repository moved to git.javagil.de, but repo-init still defaulted to the GitHub mirror, which is no longer updated. A freshly cloned instance therefore watched a stale main. Co-Authored-By: Claude Opus 5 Co-authored-by: mhoennig Reviewed-on: http://git.javagil.de/mi/werkator/pulls/21 --- ...026-09-04-PR#21-gitea-default-clone-url.md | 30 +++++++++++++++++++ tools/remote | 4 +-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 docs/prs/2026-09-04-PR#21-gitea-default-clone-url.md diff --git a/docs/prs/2026-09-04-PR#21-gitea-default-clone-url.md b/docs/prs/2026-09-04-PR#21-gitea-default-clone-url.md new file mode 100644 index 0000000..0c7b77f --- /dev/null +++ b/docs/prs/2026-09-04-PR#21-gitea-default-clone-url.md @@ -0,0 +1,30 @@ +> **WARNING:** This document describes only the change applied in this PR. +> It may already be outdated once the next PR is merged. +> Historic PR-documentation is not maintained along with new PRs — treat it as a snapshot, not as current documentation. + +## The Problem + +The repository's home is `https://git.javagil.de/mi/werkator.git` since the move to the own Gitea instance, +but `tools/remote` still defaulted `WERKATOR_REPO_URL` to the GitHub mirror. + +The mih09 production instance was cloned from that mirror and consequently watched a `main` that nobody pushes to any more: +it kept reporting the last GitHub state as green while three merged pull requests sat unbuilt on the real `main`. +The failure that started this — a flaky test already fixed on Gitea's `main` — could not be re-verified live, +because the instance had no way to see the fix. + +## Non-Goals + +- The existing clone on mih09 is not touched by this change; its remote was repointed by hand (`git remote set-url`), and `repo-init` skips an existing clone. +- The generic placeholder URLs in `docs/deployment.md` stay as they are — they describe cloning *any* watched repository, not werkator's own. +- No decision about mirroring to GitHub; the mirror simply stops being the source an instance builds from. + +## The Solution + +`REPO_URL` in [tools/remote](../../tools/remote) defaults to the Gitea URL, and the usage comment says so. + +The value stays overridable via `WERKATOR_REPO_URL` in the instance's env file, +so an installation that deliberately watches a different remote is unaffected. +Anonymous HTTPS works against Gitea exactly as it did against GitHub, so no deploy key or token is involved. + +Note that pull requests opened via AGit-Flow create no branch in Gitea, +so an instance watching this remote sees `main` only — branch builds require pushing real branches. diff --git a/tools/remote b/tools/remote index 945b722..67c7bcd 100755 --- a/tools/remote +++ b/tools/remote @@ -44,7 +44,7 @@ # Optional in the env file: # WERKATOR_INIT_CONFIG the init fragment to apply (repo-init, instance-start) # WERKATOR_REPO_URL https clone URL of the watched repository -# (default: https://github.com/mhoennig/werkator.git) +# (default: https://git.javagil.de/mi/werkator.git) # WERKATOR_REPO_DIR directory of the watched repository, absolute or relative to # WERKATOR_PATH (default: werkator); it also names the systemd # unit, exactly as `init --systemd` derives it @@ -122,7 +122,7 @@ require_env WERKATOR_REMOTE WERKATOR_PATH HOST="$WERKATOR_REMOTE" TARGET_DIR="$WERKATOR_PATH" ROOTFS="${WERKATOR_ROOTFS:-$REPO_ROOT/build/werkator-buildenv-trixie-java-go-node.tar.zst}" -REPO_URL="${WERKATOR_REPO_URL:-https://github.com/mhoennig/werkator.git}" +REPO_URL="${WERKATOR_REPO_URL:-https://git.javagil.de/mi/werkator.git}" # The host layout is three values, not one convention: an installation that grew # before this script existed puts them elsewhere, and the defaults are exactly what