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
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:
@@ -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__"
|
||||
|
||||
Reference in New Issue
Block a user