git pages bug fix
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 21s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 1m16s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m37s
CI Feature / Report Summary (push) Successful in 4s

This commit is contained in:
moilanik
2026-06-21 08:34:29 +03:00
parent a579f57e03
commit 5c6d4fd636
2 changed files with 83 additions and 29 deletions
+11 -1
View File
@@ -6,7 +6,7 @@ metadata:
labels:
{{- include "git-pages.componentLabels" . | nindent 4 }}
annotations:
"helm.sh/hook": post-install, post-upgrade
"helm.sh/hook": post-install
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
spec:
backoffLimit: 5
@@ -32,6 +32,16 @@ spec:
-H "Host: {{ .Values.ingress.host }}" \
-o /dev/null "http://git-pages:3000/.git-pages/health"
do sleep 2; done
echo "Init: checking if site already exists..."
MANIFEST=$(curl -sf \
-H "Host: {{ .Values.ingress.host }}" \
"http://git-pages:3000/.git-pages/manifest.json" 2>/dev/null || echo "")
if echo "$MANIFEST" | grep -q '"contents"'; then
echo "Init: site already initialized, skipping"
exit 0
fi
echo "Init: creating placeholder site..."
WORK=$(mktemp -d)
mkdir -p "$WORK/__init__"