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