WIP Cleanup configuration options (#4365)
* chore(apps): remove un-needed UI elements * dont grab metallb upstreams anymore * add new readme template pointing to the website and remove helm-values system * Move readme generation to daily job * remove readme addition and remve readme generation from build-release script * bump * remvoe the use of helm-docs * completely remove helm-docs * move tag sync to renovate bump action * fully remove tag sync and remove needless helm dependency updates * remove needless helm prep * get rid of needlessly loaded grafana repo
This commit is contained in:
committed by
GitHub
parent
78626622e7
commit
5864fce3ac
15
.github/scripts/build-catalog.sh
vendored
15
.github/scripts/build-catalog.sh
vendored
@@ -37,21 +37,6 @@ clean_catalog() {
|
||||
}
|
||||
export -f clean_catalog
|
||||
|
||||
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
|
||||
helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||
helm repo add metallb https://metallb.github.io/metallb
|
||||
helm repo add grafana https://grafana.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 update
|
||||
fi
|
||||
}
|
||||
export -f prep_helm
|
||||
|
||||
clean_apps() {
|
||||
local chart="$1"
|
||||
local chartname="$2"
|
||||
|
||||
75
.github/scripts/gen-docs.sh
vendored
75
.github/scripts/gen-docs.sh
vendored
@@ -3,62 +3,6 @@ set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
# Designed to ensure the appversion in Chart.yaml is in sync with the primary Chart tag if found
|
||||
# Also makes sure that home link is pointing to the correct url
|
||||
sync_tag() {
|
||||
local chart="$1"
|
||||
local chartname="$2"
|
||||
local train="$3"
|
||||
local chartversion="$4"
|
||||
echo "Attempting to sync primary tag with appversion for: ${chartname}"
|
||||
local tag="$(cat ${chart}/values.yaml | grep '^ tag: ' | awk -F" " '{ print $2 }' | head -1)"
|
||||
tag="${tag%%@*}"
|
||||
tag="${tag:-auto}"
|
||||
tag=$(echo $tag | sed "s/release-//g")
|
||||
tag=$(echo $tag | sed "s/release_//g")
|
||||
tag=$(echo $tag | sed "s/version-//g")
|
||||
tag=$(echo $tag | sed "s/version_//g")
|
||||
tag="${tag#*V.}"
|
||||
tag="${tag#*v-}"
|
||||
tag="${tag#*v}"
|
||||
tag="${tag%-*}"
|
||||
tag="${tag:0:10}"
|
||||
tag="${tag%-}"
|
||||
tag="${tag%_}"
|
||||
tag="${tag%.}"
|
||||
echo "Updating tag of ${chartname} to ${tag}..."
|
||||
sed -i -e "s|appVersion: .*|appVersion: \"${tag}\"|" "${chart}/Chart.yaml"
|
||||
echo "Updating icon of ${chartname}..."
|
||||
sed -i -e "s|icon: .*|icon: https:\/\/truecharts.org\/img\/hotlink-ok\/chart-icons\/${chartname}.png|" "${chart}/Chart.yaml"
|
||||
echo "Updating home of ${chartname}..."
|
||||
sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml"
|
||||
echo "Attempting to update sources of ${chartname}..."
|
||||
echo "Using go-yq verion: <$(go-yq -V)>"
|
||||
# Get all sources (except truecharts)
|
||||
curr_sources=$(go-yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml")
|
||||
# Empty sources list in-place
|
||||
go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
|
||||
# Add truechart source
|
||||
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
|
||||
# Add the rest of the sources
|
||||
while IFS= read -r line; do
|
||||
src="$line" go-yq -i '.sources += env(src)' "${chart}/Chart.yaml"
|
||||
done <<< "$curr_sources"
|
||||
echo "Sources of ${chartname} updated!"
|
||||
}
|
||||
export -f sync_tag
|
||||
|
||||
sync_helmignore() {
|
||||
local chart="$1"
|
||||
local chartname="$2"
|
||||
local train="$3"
|
||||
local chartversion="$4"
|
||||
echo "Attempting to sync HelmIgnore file for: ${chartname}"
|
||||
rm -rf ${chart}/.helmignore
|
||||
cp templates/chart/.helmignore ${chart}/
|
||||
}
|
||||
export -f sync_helmignore
|
||||
|
||||
create_changelog() {
|
||||
local chart="$1"
|
||||
local chartname="$2"
|
||||
@@ -82,21 +26,6 @@ create_changelog() {
|
||||
}
|
||||
export -f create_changelog
|
||||
|
||||
generate_docs() {
|
||||
local chart="$1"
|
||||
local chartname="$2"
|
||||
local train="$3"
|
||||
local chartversion="$4"
|
||||
echo "Generating Docs"
|
||||
helm-docs \
|
||||
--ignore-file=".helmdocsignore" \
|
||||
--output-file="README.md" \
|
||||
--template-files="/__w/charts/charts/templates/docs/README.md.gotmpl" \
|
||||
--chart-search-root="${chart}"
|
||||
sed -i "s/TRAINPLACEHOLDER/${train}/" "${chart}/README.md"
|
||||
}
|
||||
export -f generate_docs
|
||||
|
||||
|
||||
if [[ -d "charts/${1}" ]]; then
|
||||
echo "Start processing charts/${1} ..."
|
||||
@@ -104,11 +33,7 @@ if [[ -d "charts/${1}" ]]; then
|
||||
chartname=$(basename charts/${1})
|
||||
train=$(basename $(dirname "charts/${1}"))
|
||||
SCALESUPPORT=$(cat charts/${1}/Chart.yaml | yq '.annotations."truecharts.org/SCALE-support"' -r)
|
||||
sync_helmignore "charts/${1}" "${chartname}" "$train" "${chartversion}" || echo "Syncing HelmIgnore file failed..."
|
||||
helm dependency update "charts/${1}" --skip-refresh || (sleep 10 && helm dependency update "charts/${1}" --skip-refresh) || (sleep 10 && helm dependency update "charts/${1}" --skip-refresh)
|
||||
sync_tag "charts/${1}" "${chartname}" "$train" "${chartversion}" || echo "Tag sync failed..."
|
||||
create_changelog "charts/${1}" "${chartname}" "$train" "${chartversion}" || echo "changelog generation failed..."
|
||||
generate_docs "charts/${1}" "${chartname}" "$train" "${chartversion}" || echo "Docs generation failed..."
|
||||
else
|
||||
echo "Chart 'charts/${1}' no longer exists in repo. Skipping it..."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user