fix(ci): fix docs generator unbound variable
This commit is contained in:
parent
961746812d
commit
c1a814f328
|
@ -65,7 +65,6 @@ chart_runner(){
|
|||
export -f chart_runner
|
||||
|
||||
prep_helm() {
|
||||
if [[ -z "$standalone" ]]; then
|
||||
helm repo add truecharts-old https://truecharts.org
|
||||
helm repo add truecharts https://charts.truecharts.org
|
||||
helm repo add truecharts-library https://library-charts.truecharts.org
|
||||
|
@ -75,7 +74,6 @@ prep_helm() {
|
|||
helm repo add prometheus https://prometheus-community.github.io/helm-charts
|
||||
helm repo add amd-gpu-helm https://radeonopencompute.github.io/k8s-device-plugin/
|
||||
helm repo update
|
||||
fi
|
||||
}
|
||||
export -f prep_helm
|
||||
|
||||
|
@ -161,12 +159,10 @@ sec_scan_cleanup() {
|
|||
export -f sec_scan_cleanup
|
||||
|
||||
pre_commit() {
|
||||
if [[ -z "$standalone" ]]; then
|
||||
echo "Running pre-commit test-and-cleanup..."
|
||||
pre-commit run --all ||:
|
||||
# Fix sh files to always be executable
|
||||
find . -name '*.sh' | xargs chmod +x
|
||||
fi
|
||||
}
|
||||
export -f pre_commit
|
||||
|
||||
|
@ -176,7 +172,6 @@ create_changelog() {
|
|||
local train="$3"
|
||||
local chartversion="$4"
|
||||
local prevversion="$(git tag -l "${chartname}-*" --sort=-v:refname | head -n 1)"
|
||||
if [[ -z "$standalone" ]]; then
|
||||
echo "Generating changelogs for: ${chartname}"
|
||||
# SCALE "Changelog" containing only last change
|
||||
git-chglog --next-tag ${chartname}-${chartversion} --tag-filter-pattern ${chartname} --path ${chart} -o ${chart}/app-changelog.md ${chartname}-${chartversion}
|
||||
|
@ -191,7 +186,6 @@ create_changelog() {
|
|||
cat ${chart}/app-changelog.md | cat - ${chart}/CHANGELOG.md > temp && mv temp ${chart}/CHANGELOG.md
|
||||
sed -i '1s/^/# Changelog<br>\n\n/' ${chart}/CHANGELOG.md
|
||||
rm ${chart}/app-changelog.md || echo "changelog not found..."
|
||||
fi
|
||||
}
|
||||
export -f create_changelog
|
||||
|
||||
|
@ -200,20 +194,7 @@ generate_docs() {
|
|||
local chartname="$2"
|
||||
local train="$3"
|
||||
local chartversion="$4"
|
||||
if [[ -z "$standalone" ]]; then
|
||||
echo "Generating Docs"
|
||||
if [ "${chartname}" == "common" ]; then
|
||||
helm-docs \
|
||||
--ignore-file=".helmdocsignore" \
|
||||
--output-file="README.md" \
|
||||
--template-files="/__w/apps/apps/templates/docs/common-README.md.gotmpl" \
|
||||
--chart-search-root="${chart}"
|
||||
helm-docs \
|
||||
--ignore-file=".helmdocsignore" \
|
||||
--output-file="helm-values.md" \
|
||||
--template-files="/__w/apps/apps/templates/docs/common-helm-values.md.gotmpl" \
|
||||
--chart-search-root="${chart}"
|
||||
else
|
||||
helm-docs \
|
||||
--ignore-file=".helmdocsignore" \
|
||||
--output-file="README.md" \
|
||||
|
@ -229,8 +210,6 @@ generate_docs() {
|
|||
--output-file="helm-values.md" \
|
||||
--template-files="/__w/apps/apps/templates/docs/helm-values.md.gotmpl" \
|
||||
--chart-search-root="${chart}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
export -f generate_docs
|
||||
|
||||
|
|
Loading…
Reference in New Issue