generate common docs (+1 squashed commits)

Squashed commits:

[0f1f76b1f] again
This commit is contained in:
kjeld Schouten-Lebbing 2021-08-31 11:20:18 +02:00
parent 08771717be
commit e250c0a0b8
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
5 changed files with 102 additions and 3 deletions

View File

@ -97,6 +97,21 @@ jobs:
done
done
- name: generate common docs
run: |
mkdir -p docs/apps/common || echo "common path already exists, continuing..."
echo "Copying common templates to docs"
helm-docs \
--ignore-file=".helmdocsignore" \
--output-file="README.md" \
--template-files="/home/runner/work/apps/apps/templates/docs/common-README.md.gotmpl" \
--chart-search-root="/home/runner/work/apps/apps/charts/library/common"
helm-docs \
--ignore-file=".helmdocsignore" \
--output-file="/home/runner/work/apps/apps/docs/apps/common/helm-values.md" \
--template-files="/home/runner/work/apps/apps/templates/docs/common-helm-values.md.gotmpl" \
--chart-search-root="/home/runner/work/apps/apps/charts/library/common"
- uses: dorny/paths-filter@v2
id: filter
with:
@ -165,10 +180,10 @@ jobs:
yes | cp -rf ${chart}/README.md docs/apps/${train}/${chartname}/index.md || echo "readme copy failed, continuing..."
yes | cp -rf ${chart}/CONFIG.md docs/apps/${train}/${chartname}/CONFIG.md || echo "config copy failed, continuing..."
yes | cp -rf ${chart}/helm-values.md docs/apps/${train}/${chartname}/helm-values.md || echo "config copy failed, continuing..."
yes | cp -rf ${chart}/LICENSE docs/apps/${train}/${chartname}/LICENSE.md || echo "license copy failed, continuing..."
sed -i '1s/^/# License<br>\n\n/' docs/apps/${train}/${chartname}/LICENSE.md || echo "license edit failed, continuing..."
fi
done
yes | cp -rf /home/runner/work/apps/apps/docs/apps/common/README.md docs/apps/common/index.md || echo "common readme copy failed, continuing..."
echo "Processed charts for ${train}:"
ls docs/apps/${train}/ || echo "no Apps in train"
done

View File

@ -67,6 +67,5 @@ All Rights Reserved - The TrueCharts Project
{{ template "custom.uninstall" . }}
{{ template "custom.support" . }}
{{ template "helm-docs.versionFooter" . }}
---
{{ template "custom.copyright" . }}

View File

@ -0,0 +1,66 @@
{{- define "custom.introheader" -}}
# Introduction
{{- end -}}
{{- define "custom.repository.organization" -}}
TrueCharts
{{- end -}}
{{- define "custom.repository.url" -}}
https://github.com/truecharts/apps
{{- end -}}
{{- define "custom.helm.url" -}}
https://truecharts.org
{{- end -}}
{{- define "custom.helm.path" -}}
{{ template "custom.repository.organization" . }}/{{ template "chart.name" . }}
{{- end -}}
{{- define "custom.notes" -}}
Function library for TrueCharts
Since a lot of the TrueCharts Apps and Charts follow a similar pattern, this library was built to reduce maintenance cost between the charts that use it and try achieve a goal of being DRY.
{{- end -}}
{{- define "custom.requirements" -}}
## Requirements
{{ template "chart.kubeVersionLine" . }}
{{- end -}}
{{- define "custom.dependencies" -}}
## Dependencies
{{ template "chart.requirementsTable" . }}
{{- end -}}
{{- define "custom.install" -}}
## Installing the Chart
This is a Helm Library Chart.
WARNING: THIS CHART IS NOT MEANT TO BE INSTALLED DIRECTLY
{{- end -}}
{{- define "custom.support" -}}
## Support
- Please check our [quick-start guides](https://truecharts.org/manual/Quick-Start%20Guides/01-Open-Apps/) first.
- See the [Wiki](https://truecharts.org)
- Check our [Discord](https://discord.gg/tVsPTHWTtr)
- Open a [issue](https://github.com/truecharts/apps/issues/new/choose)
{{- end -}}
{{- define "custom.copyright" -}}
All Rights Reserved - The TrueCharts Project
{{- end -}}
{{ template "custom.introheader" . }}
{{ template "chart.description" . }}
{{ template "chart.deprecationWarning" . }}
{{ template "custom.notes" . }}
{{ template "chart.sourcesSection" . }}
{{ template "custom.requirements" . }}
{{ template "custom.dependencies" . }}
{{ template "custom.install" . }}
{{ template "custom.support" . }}
---
{{ template "custom.copyright" . }}

View File

@ -0,0 +1,19 @@
{{- define "custom.helm.introheader" -}}
# Default Helm-Values
{{- end -}}
{{- define "custom.helm.notes" -}}
TrueCharts is primarily build to supply TrueNAS SCALE Apps.
However, we also supply all Apps as standard Helm-Charts. In this document we aim to document the default values in our Common Chart.
This chart is used by a lot of our Apps to provide sane defaults and logic.
{{- end -}}
{{- define "custom.helm.copyright" -}}
All Rights Reserved - The TrueCharts Project
{{- end -}}
{{ template "custom.helm.introheader" . }}
{{ template "custom.helm.notes" . }}
{{ template "chart.valuesSection" . }}
{{ template "custom.helm.copyright" . }}