ci: remove the CANONIZE_TOKEN probe, it did its job

Pipeline 521: the variable is visible inside the job, the push to a throwaway ref
succeeded and the ref was removed again. Combined with the token's own properties -
Maintainer, write_repository only - the monthly canonization has what it needs on
2026-09-01.

Two things the probe itself taught, kept here rather than in the removed block: an
API-triggered pipeline has source "api", not "web", so the first attempt silently
skipped the job entirely; and this repo has no "pruefen" stage, which rejected the
pipeline outright. Both would have cost the same time again next year.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Thore Cimbal
2026-08-19 12:00:00 +00:00
co-authored by Claude Opus 5
parent c3e42be0d1
commit 8473a1f0e5
-33
View File
@@ -200,36 +200,3 @@ canonize_wiki:
- git clone --bare --quiet https://rohana.axion1337.de/sorb/ThreadNetWiki.git /tmp/wiki.git
- GIT_SSL_CAINFO="$LABCA" git -C /tmp/wiki.git push "https://oauth2:${WIKI_CANONIZE_TOKEN}@${CI_SERVER_HOST}/axion1337.chat/threadnet-wiki.git" 'refs/heads/main:refs/heads/main'
- echo "git.lab threadnet-wiki spiegelt jetzt Gitea sorb/ThreadNetWiki (main)."
# ---------------------------------------------------------------------------
# TEMPORAER (2026-08-19): beweist, dass CANONIZE_TOKEN in der Pipeline ankommt
# und schreiben darf - OHNE main anzufassen. Laeuft nur, wenn eine Web-Pipeline
# ausdruecklich mit TEST_CANONIZE=1 gestartet wird. Wird nach dem Test entfernt.
# ---------------------------------------------------------------------------
canonize_token_test:
image: alpine:3.20
rules:
- if: $TEST_CANONIZE == "1" # Quelle egal: die Variable ist der Schutz
script:
- apk add --no-cache git ca-certificates >/dev/null
- export GIT_SSL_CAINFO="$CI_PROJECT_DIR/ci/lab-ca-chain.crt"
- |
if [ -z "$CANONIZE_TOKEN" ]; then
echo "FEHLT: CANONIZE_TOKEN ist im Job nicht sichtbar."
echo "Ursache meist: Variable 'protected', Pipeline laeuft aber auf einem"
echo "ungeschuetzten Branch. Genau dann bliebe die Rotation liegen."
exit 1
fi
echo "Sichtbar: CANONIZE_TOKEN ist im Job gesetzt."
URL="https://oauth2:${CANONIZE_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
REF="canonize-token-probe-${CI_PIPELINE_ID}"
# Ausgabe wird gefiltert: git schreibt die URL bei Fehlern mit ins Log.
if git push "$URL" "HEAD:refs/heads/$REF" 2>&1 | sed 's#oauth2:[^@]*@#oauth2:***@#g'; then
echo "SCHREIBEN OK: Zweig $REF angelegt."
else
echo "SCHREIBEN FEHLGESCHLAGEN - Rolle oder Scope reichen nicht."
exit 1
fi
git push "$URL" --delete "refs/heads/$REF" 2>&1 | sed 's#oauth2:[^@]*@#oauth2:***@#g' \
&& echo "Aufgeraeumt: $REF wieder entfernt." \
|| echo "WARNUNG: $REF blieb liegen, bitte von Hand loeschen."