feat: customize init command (#166)
Some checks failed
changelog / changelog (push) Has been cancelled
check-and-test / check-and-test (push) Has been cancelled

add feature to customize the reach gitea commands.

See: https://gitea.com/gitea/helm-actions/src/branch/feat/customize-init-command/docs/connectionCommandOverride.mdReviewed-on: https://gitea.com/gitea/helm-actions/pulls/166
Co-authored-by: Daan <dselen@nerthus.nl>
This commit is contained in:
Daan
2026-07-10 14:05:51 +00:00
committed by DaanSelen
parent 2342ccdee2
commit e456879b7d
7 changed files with 87 additions and 75 deletions

View File

@ -66,14 +66,21 @@ spec:
- mountPath: /data
name: data-runner
{{- end }}
- name: init-gitea
- name: reach-gitea
image: "{{ include "gitea.actions.init.image" . }}"
command:
- sh
- -c
- |
{{- if .Values.init.preConnectionCommandOverride }}
{{ .Values.init.preConnectionCommandOverride }}
{{- end }}
echo 'Trying to reach Gitea on {{ include "gitea.actions.local_root_url" . }}'
{{- if .Values.init.connectionCommandOverride }}
until timeout 10 {{ .Values.init.connectionCommandOverride }} {{ include "gitea.actions.local_root_url" . }}; do
{{- else }}
until timeout 10 wget --no-check-certificate --spider {{ include "gitea.actions.local_root_url" . }}; do
{{- end }}
sleep 3
echo "Trying again in 3 seconds..."
done