cctest-recipe-upstream: step 0 is just the mirror fetch (remote-add only as fallback)

This commit is contained in:
2026-09-14 16:57:55 +00:00
parent 7934367f15
commit b8161f15e4
2 changed files with 20 additions and 7 deletions
@@ -55,13 +55,20 @@ operator's machine must fetch it first. Always emit this **step 0** before the p
(anonymous public fetch, no credentials needed): (anonymous public fetch, no credentials needed):
``` ```
# 0. On a machine WITHOUT the branch pre-fetched, get it from the autonomic mirror: # 0. On a machine WITHOUT the branch pre-fetched, get it from the autonomic mirror
cd <local checkout of the recipe> # or: git clone https://git.autonomic.zone/recipe-maintainers/<recipe>.git # (assumes a local checkout of the recipe that already has the mirror remote;
git remote add gitea https://git.autonomic.zone/recipe-maintainers/<recipe>.git 2>/dev/null || git remote set-url gitea https://git.autonomic.zone/recipe-maintainers/<recipe>.git # its name here is `gitea`):
cd <local checkout of the recipe>
git fetch gitea +refs/pull/<PR_NUM>/head:refs/heads/<HEAD_REF> git fetch gitea +refs/pull/<PR_NUM>/head:refs/heads/<HEAD_REF>
git checkout <HEAD_REF> git checkout <HEAD_REF>
``` ```
If the operator's checkout does NOT yet have the mirror remote, emit once before the fetch:
```
git remote add gitea https://git.autonomic.zone/recipe-maintainers/<recipe>.git
```
In both modes the final output is a set of commands for the operator to run on a machine **with In both modes the final output is a set of commands for the operator to run on a machine **with
push access to `git.coopcloud.tech`** — always print them, even when everything local is push access to `git.coopcloud.tech`** — always print them, even when everything local is
already prepared. already prepared.
+10 -4
View File
@@ -83,14 +83,20 @@ operator's machine must fetch it first. Always emit this **step 0** before the p
(anonymous public fetch, no credentials needed): (anonymous public fetch, no credentials needed):
``` ```
# 0. On a machine WITHOUT the branch pre-fetched, get it from the autonomic mirror: # 0. On a machine WITHOUT the branch pre-fetched, get it from the autonomic mirror
cd <local checkout of the recipe> # or: git clone https://git.autonomic.zone/recipe-maintainers/<recipe>.git # (assumes a local checkout of the recipe that already has the mirror remote;
git remote add gitea https://git.autonomic.zone/recipe-maintainers/<recipe>.git 2>/dev/null || \ # its name here is `gitea`):
git remote set-url gitea https://git.autonomic.zone/recipe-maintainers/<recipe>.git cd <local checkout of the recipe>
git fetch gitea +refs/pull/<PR_NUM>/head:refs/heads/<HEAD_REF> git fetch gitea +refs/pull/<PR_NUM>/head:refs/heads/<HEAD_REF>
git checkout <HEAD_REF> git checkout <HEAD_REF>
``` ```
If the operator's checkout does NOT yet have the mirror remote, emit once before the fetch:
```
git remote add gitea https://git.autonomic.zone/recipe-maintainers/<recipe>.git
```
In both modes the final output is a set of commands for the operator to run on a machine **with In both modes the final output is a set of commands for the operator to run on a machine **with
push access to `git.coopcloud.tech`** — always print them, even when everything local is push access to `git.coopcloud.tech`** — always print them, even when everything local is
already prepared. already prepared.