chore(ci): Improved lint speed (#8809)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  # <!--(issue)-->

TODO: Switch to scripted checks (To replace ct-list's tasks):
- [x] Helm Lint
- [x] Version Checking
- [x] Run the lint inside the devcontainer (so it have the below tools
available)
- [x] YAML Schema check on Chart.yaml
- [ ] Maintener check on Chart.yaml (Moved to another PR in the future)
- [x] YAML Lint on Chart.yaml
- [x] YAML Lint on values.yaml
- [x] Sort output of lint results (failed on the bottom)
- [x] Combine verify deps in the lint job, since the verification runs
inside the fetch dep (which runs on lint job too)
- [x] Remove one of the 2 "get changed" functions (one based on tags
other on commit)
After that, move linting to single step 


https://github.com/helm/chart-testing/blob/main/pkg/tool/linter.go
https://github.com/helm/chart-testing/blob/main/pkg/tool/account.go

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [x] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [x] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [x] 📄 I have made corresponding changes to the documentation
- [x] ⚠️ My changes generate no new warnings
- [x] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Stavros Kois
2023-05-23 11:26:41 +03:00
committed by GitHub
parent 66a1b19196
commit 702a0c3aba
39 changed files with 522 additions and 486 deletions
+1 -1
View File
@@ -5,5 +5,5 @@
/charts/dependency/ @truecharts/enterprise-maintainers @ornias1993
/charts/enterprise/ @truecharts/enterprise-maintainers @ornias1993
/charts/dev/ @ornias1993
/.github/ @truecharts/ci-maintainers @ornias1993
/.github/ @truecharts/ci-maintainers @ornias1993
docs/ @truecharts/docs-maintainers @ornias1993
+11 -7
View File
@@ -25,8 +25,8 @@ load_gpg_key() {
echo ""
echo "⏬ Downloading and Loading TrueCharts pgp Public Key"
gpg_dir=.cr-gpg
mkdir "$gpg_dir"
curl https://keybase.io/truecharts/pgp_keys.asc | gpg --dearmor > $gpg_dir/pubring.gpg || echo "❌ Couldn't load Public Key."
mkdir -p "$gpg_dir"
curl --silent https://keybase.io/truecharts/pgp_keys.asc | gpg --dearmor > $gpg_dir/pubring.gpg || echo "❌ Couldn't load Public Key."
echo "✅ Public Key loaded successfully..."
echo ""
}
@@ -100,17 +100,20 @@ for idx in $(eval echo "{0..$length}"); do
if [ ! $? ]; then
echo "❌ wget encountered an error..."
helm dependency build "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || helm dependency update "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || exit 1
helm dependency build "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || \
helm dependency update "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || exit 1
fi
if [ -f "$cache_path/$repo_dir/$name-$version.tgz" ]; then
echo "✅ Dependency Downloaded!"
echo "Validating dependency signature..."
helm verify $cache_path/$repo_dir/$name-$version.tgz --keyring $gpg_dir/pubring.gpg || helm verify $cache_path/$repo_dir/$name-$version.tgz --keyring $gpg_dir/pubring.gpg || exit 1
helm verify $cache_path/$repo_dir/$name-$version.tgz --keyring $gpg_dir/pubring.gpg || \
helm verify $cache_path/$repo_dir/$name-$version.tgz --keyring $gpg_dir/pubring.gpg || exit 1
else
echo "❌ Failed to download dependency"
# Try helm dependency build/update or otherwise fail fast if a dep fails to download...
helm dependency build "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || helm dependency update "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || exit 1
helm dependency build "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || \
helm dependency update "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/pubring.gpg || exit 1
fi
fi
echo ""
@@ -125,12 +128,13 @@ for idx in $(eval echo "{0..$length}"); do
else
echo "❌ Failed to copy dependency"
# Try helm dependency build/update or otherwise fail fast if a dep fails to copy...
helm dependency build "$charts_path/$train_chart/Chart.yaml" || helm dependency update "$charts_path/$train_chart/Chart.yaml" || exit 1
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml" || exit 1
fi
fi
done
}
export -f
export -f download_deps
load_gpg_key
+182
View File
@@ -0,0 +1,182 @@
#!/bin/bash
function check_version() {
chart_path=${1:?"No chart path provided to [Version Check]"}
target_branch=${2:?"No target branch provided to [Version Check]"}
new=$(git diff "$target_branch" -- "$chart_path" | sed -nr 's/^\+version: (.*)$/\1/p')
old=$(git diff "$target_branch" -- "$chart_path" | sed -nr 's/^\-version: (.*)$/\1/p')
if [[ -z "$new" ]]; then
echo -e "\t❌ Chart version: Not changed"
curr_result=1
fi
echo -e "\t🔙 Old Chart Version: $old"
echo -e "\t🆕 New Chart Version: $new"
if [[ $(echo "$new\n$old" | sort -V -r | head -n1) != "$old" ]]; then
echo -e "\t✅ Chart version: Bumped"
else
echo -e "\t❌ Chart version: Not bumped or downgraded"
curr_result=1
fi
}
export -f check_version
function check_chart_schema(){
chart_path=${1:?"No chart path provided to [Chart.yaml lint]"}
yamale_output=$(yamale --schema .github/chart_schema.yaml "$chart_path/Chart.yaml")
yamale_exit_code=$?
while IFS= read -r line; do
echo -e "\t$line"
done <<< "$yamale_output"
if [ $yamale_exit_code -ne 0 ]; then
echo -e "\t❌ Chart Schema: Failed"
curr_result=1
else
echo -e "\t✅ Chart Schema: Passed"
fi
}
export -f check_chart_schema
function helm_lint(){
chart_path=${1:?"No chart path provided to [Helm lint]"}
# Print only errors and warnings
helm_lint_output=$(helm lint --quiet "$chart_path")
helm_lint_exit_code=$?
while IFS= read -r line; do
echo -e "\t$line"
done <<< "$helm_lint_output"
if [ $helm_lint_exit_code -ne 0 ]; then
echo -e "\t❌ Helm Lint: Failed"
curr_result=1
else
echo -e "\t✅ Helm Lint: Passed"
fi
}
export -f helm_lint
function yaml_lint(){
file_path=${1:?"No file path provided to [YAML lint]"}
yaml_lint_output=$(yamllint --config-file .github/yaml-lint-conf.yaml "$file_path")
yaml_lint_exit_code=$?
while IFS= read -r line; do
echo -e "\t$line"
done <<< "$yaml_lint_output"
if [ $yaml_lint_exit_code -ne 0 ]; then
echo -e "\t❌ YAML Lint: Failed [$file_path]"
curr_result=1
else
echo -e "\t✅ YAML Lint: Passed [$file_path]"
fi
}
export -f yaml_lint
function lint_chart(){
chart_path=${1:?"No chart path provided to [Lint Chart]"}
target_branch=${2:?"No target branch provided to [Lint Chart]"}
status_file=${3:?"No status file provided to [Lint Chart]"}
curr_result_file=/tmp/$(basename "$chart_path")
curr_result=0
{
start_time=$(date +%s)
echo '---------------------------------------------------------------------------------------'
echo "## 🔍Linting [$chart_path]"
echo '----------------------------------------------'
echo ''
echo "👣 Helm Lint - [$chart_path]"
helm_lint "$chart_path"
echo "👣 Chart Version - [$chart_path] against [$target_branch]"
check_version "$chart_path" "$target_branch"
echo "👣 Chart Schema - [$chart_path]"
check_chart_schema "$chart_path"
echo "👣 YAML Lint - [$chart_path/Chart.yaml]"
yaml_lint "$chart_path/Chart.yaml"
echo "👣 YAML Lint - [$chart_path/values.yaml]"
yaml_lint "$chart_path/values.yaml"
for values in $chart_path/ci/*values.yaml; do
if [ -f "${values}" ]; then
echo "👣 YAML Lint - [$values]"
yaml_lint "$values"
fi
done
end_time=$(date +%s)
diff_time=$((end_time - start_time))
echo -e "\nResult:"
if [ $curr_result -ne 0 ]; then
echo "❌ Linting [$chart_path]: Failed - Took $diff_time seconds" | tee -a "$result_file"
else
echo "✅ Linting [$chart_path]: Passed - Took $diff_time seconds" | tee -a "$result_file"
fi
echo '---------------------------------------------------------------------------------------'
echo ''
} > "$curr_result_file"
cat "$curr_result_file"
echo $curr_result >> "$status_file"
}
export -f lint_chart
# Start of script
charts=$1
target_branch=${2:-"origin/master"}
status_file="/tmp/status"
exit_code=0
result_file=${result_file:?"No result file provided"}
changed=$(echo $charts | jq --raw-output '.[]')
echo "📂 Charts to lint:"
for chart in $changed; do
echo -e "\t- 📄 $chart"
done
echo ''
start_time=$(date +%s)
# Run lint_chart in parallel
parallel --jobs $(($(nproc) * 2)) "lint_chart {} $target_branch $status_file" ::: $changed || true
if grep -q 1 "$status_file"; then
exit_code=1
fi
end_time=$(date +%s)
diff_time=$((end_time - start_time))
echo '------------------------------------'
# Print summary
sorted=$(cat "$result_file" | sort)
sorted=$(echo "$sorted" | sed 's/✅/:heavy_check_mark:/g')
sorted=$(echo "$sorted" | sed 's/❌/:heavy_multiplication_x:/g')
echo "# 📝 Linting results:" | tee "$result_file"
echo '====================================================================================='
echo "$sorted" | tee -a "$result_file"
echo ''
echo -e "Total Charts Linted: **$(echo "$sorted" | wc -l)**" | tee -a "$result_file"
echo -e "Total Charts Passed: **$(echo "$sorted" | grep -c 'heavy_check_mark')**" | tee -a "$result_file"
echo -e "Total Charts Failed: **$(echo "$sorted" | grep -c 'heavy_multiplication_x')**" | tee -a "$result_file"
echo '====================================================================================='
echo '' | tee -a "$result_file"
if [ $exit_code -ne 0 ]; then
echo "❌ Linting: **Failed** - Took $diff_time seconds" | tee -a "$result_file"
else
echo "✅ Linting: **Passed** - Took $diff_time seconds" | tee -a "$result_file"
fi
exit $exit_code
+50 -370
View File
@@ -11,400 +11,80 @@ on:
type: string
jobs:
verify-dep-sig:
lint-and-verify:
name: Lint Charts and Verify Dependencies
runs-on: ubuntu-latest
name: Verify Dependency Signatures
container:
image: ghcr.io/truecharts/devcontainer:3.1.10@sha256:c239addf725eb5cedf79517f8089fdafdc32b5270d1893ee87ae6e511b9bcae3
image: tccr.io/truecharts/devcontainer:v3.1.38@sha256:2fd9355bc6791461430db87a04f5fe7b49c46bc5957bc348f1efbff4c6c7913d
steps:
- name: Install Kubernetes tools
uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3
with:
setup-tools: |
helmv3
helm: "3.8.0"
- name: Prep Helm
run: |
helm repo add truecharts https://charts.truecharts.org
helm repo add truecharts-library https://library-charts.truecharts.org
helm repo add truecharts-deps https://deps.truecharts.org
helm repo update
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
ref: ${{ inputs.checkoutCommit }}
- name: Setting repo parent dir as safe safe.directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Collect changes
id: collect-changes
uses: ./.github/actions/collect-changes
- name: Fetch and Verify dependencies
shell: bash
if: |
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
- name: Prep Helm
run: |
CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }})
charts_path="charts"
for changed in ${CHARTS[@]}; do
.github/scripts/fetch_helm_deps.sh "${changed}"
done
helm repo add truecharts https://charts.truecharts.org
helm repo add truecharts-deps https://deps.truecharts.org
helm repo add truecharts-library https://library-charts.truecharts.org
helm repo add truecharts-deps https://deps.truecharts.org
helm repo update
generate-lint-matrix:
name: Generate matrix for lint
runs-on: ubuntu-latest
outputs:
matrix1: |
{
"chart": ${{ steps.list-changed.outputs.charts1 }}
}
matrix2: |
{
"chart": ${{ steps.list-changed.outputs.charts2 }}
}
matrix3: |
{
"chart": ${{ steps.list-changed.outputs.charts3 }}
}
matrix4: |
{
"chart": ${{ steps.list-changed.outputs.charts4 }}
}
matrix5: |
{
"chart": ${{ steps.list-changed.outputs.charts5 }}
}
matrix6: |
{
"chart": ${{ steps.list-changed.outputs.charts6 }}
}
detected1: ${{ steps.list-changed.outputs.detected1 }}
detected2: ${{ steps.list-changed.outputs.detected2 }}
detected3: ${{ steps.list-changed.outputs.detected3 }}
detected4: ${{ steps.list-changed.outputs.detected4 }}
detected5: ${{ steps.list-changed.outputs.detected5 }}
detected6: ${{ steps.list-changed.outputs.detected6 }}
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
ref: ${{ inputs.checkoutCommit }}
- name: Set up chart-testing
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
- name: Collect changes
- name: Collect changes (branch-based)
id: list-changed
if: inputs.chartChangesDetected == 'true'
shell: bash
run: |
EXCLUDED=$(yq eval -o=json '.excluded-charts // []' .github/ct-lint.yaml)
CHARTS=$(ct list-changed --config .github/ct-lint.yaml)
CHARTS_JSON=$(echo "${CHARTS}" | jq -R -s -c 'split("\n")[:-1]')
OUTPUT_JSON=$(echo "{\"excluded\": ${EXCLUDED}, \"all\": ${CHARTS_JSON}}" | jq -c '.all-.excluded')
OUTPUT_JSON1=$((echo $OUTPUT_JSON | jq -r -c '.[:50]'; echo $OUTPUT_JSON | jq -r -c '.[301:350]'; echo $OUTPUT_JSON | jq -r -c '.[601:650]'; echo $OUTPUT_JSON | jq -r -c '.[901:950]'; echo $OUTPUT_JSON | jq -r -c '.[1201:1250]') | jq -s add)
OUTPUT_JSON2=$((echo $OUTPUT_JSON | jq -r -c '.[51:100]'; echo $OUTPUT_JSON | jq -r -c '.[351:400]'; echo $OUTPUT_JSON | jq -r -c '.[651:700]'; echo $OUTPUT_JSON | jq -r -c '.[951:1000]'; echo $OUTPUT_JSON | jq -r -c '.[1251:1300]') | jq -s add)
OUTPUT_JSON3=$((echo $OUTPUT_JSON | jq -r -c '.[101:150]'; echo $OUTPUT_JSON | jq -r -c '.[401:450]'; echo $OUTPUT_JSON | jq -r -c '.[701:750]'; echo $OUTPUT_JSON | jq -r -c '.[1001:1050]'; echo $OUTPUT_JSON | jq -r -c '.[1301:1350]') | jq -s add)
OUTPUT_JSON4=$((echo $OUTPUT_JSON | jq -r -c '.[151:200]'; echo $OUTPUT_JSON | jq -r -c '.[451:500]'; echo $OUTPUT_JSON | jq -r -c '.[751:800]'; echo $OUTPUT_JSON | jq -r -c '.[1051:1100]'; echo $OUTPUT_JSON | jq -r -c '.[1351:1400]') | jq -s add)
OUTPUT_JSON5=$((echo $OUTPUT_JSON | jq -r -c '.[201:250]'; echo $OUTPUT_JSON | jq -r -c '.[501:550]'; echo $OUTPUT_JSON | jq -r -c '.[801:850]'; echo $OUTPUT_JSON | jq -r -c '.[1101:1150]'; echo $OUTPUT_JSON | jq -r -c '.[1401:1450]') | jq -s add)
OUTPUT_JSON6=$((echo $OUTPUT_JSON | jq -r -c '.[251:300]'; echo $OUTPUT_JSON | jq -r -c '.[551:600]'; echo $OUTPUT_JSON | jq -r -c '.[851:900]'; echo $OUTPUT_JSON | jq -r -c '.[1151:1200]'; echo $OUTPUT_JSON | jq -r -c '.[1451:1500]') | jq -s add)
echo ::set-output name=charts1::${OUTPUT_JSON1}
echo ::set-output name=charts2::${OUTPUT_JSON2}
echo ::set-output name=charts3::${OUTPUT_JSON3}
echo ::set-output name=charts4::${OUTPUT_JSON4}
echo ::set-output name=charts5::${OUTPUT_JSON5}
echo ::set-output name=charts6::${OUTPUT_JSON6}
if [[ $(echo ${OUTPUT_JSON1} | jq -c '. | length') -gt 0 ]]; then
echo "::set-output name=detected1::true"
fi
if [[ $(echo ${OUTPUT_JSON2} | jq -c '. | length') -gt 0 ]]; then
echo "::set-output name=detected2::true"
fi
if [[ $(echo ${OUTPUT_JSON3} | jq -c '. | length') -gt 0 ]]; then
echo "::set-output name=detected3::true"
fi
if [[ $(echo ${OUTPUT_JSON4} | jq -c '. | length') -gt 0 ]]; then
echo "::set-output name=detected4::true"
fi
if [[ $(echo ${OUTPUT_JSON5} | jq -c '. | length') -gt 0 ]]; then
echo "::set-output name=detected5::true"
fi
if [[ $(echo ${OUTPUT_JSON6} | jq -c '. | length') -gt 0 ]]; then
echo "::set-output name=detected6::true"
EXCLUDED_JSON=$(go-yq eval -o=json '.excluded-charts // []' .github/ct-lint.yaml)
CHARTS_JSON=$(echo "${CHARTS}" | jq --raw-input '.' | jq --compact-output --slurp '.')
OUTPUT_JSON=$(echo "{\"excluded\": ${EXCLUDED_JSON}, \"all\": ${CHARTS_JSON}}" | jq --compact-output '.all-.excluded')
echo CHANGED_CHARTS=${OUTPUT_JSON} >> "$GITHUB_OUTPUT"
if [[ $(echo ${OUTPUT_JSON} | jq --compact-output '. | length') -gt 0 ]]; then
echo "detected=true" >> "$GITHUB_OUTPUT"
fi
lint-charts1:
needs:
- generate-lint-matrix
if: needs.generate-lint-matrix.outputs.detected1 == 'true'
name: Lint charts Part 1
strategy:
matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix1) }}
fail-fast: false
max-parallel: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
ref: ${{ inputs.checkoutCommit }}
- name: lint Kubernetes tools
uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3
with:
setup-tools: |
helmv3
helm: "3.8.0"
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4
with:
python-version: "3.10"
- name: Set up chart-testing
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
- name: Run chart-testing (lint)
run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}"
lint-charts2:
needs:
- generate-lint-matrix
if: needs.generate-lint-matrix.outputs.detected2 == 'true'
name: Lint charts Part 2
strategy:
matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix2) }}
fail-fast: false
max-parallel: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
ref: ${{ inputs.checkoutCommit }}
- name: lint Kubernetes tools
uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3
with:
setup-tools: |
helmv3
helm: "3.8.0"
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4
with:
python-version: "3.10"
- name: Set up chart-testing
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
- name: Run chart-testing (lint)
run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}"
lint-charts3:
needs:
- generate-lint-matrix
if: needs.generate-lint-matrix.outputs.detected3 == 'true'
name: Lint charts Part 3
strategy:
matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix3) }}
fail-fast: false
max-parallel: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
ref: ${{ inputs.checkoutCommit }}
- name: lint Kubernetes tools
uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3
with:
setup-tools: |
helmv3
helm: "3.8.0"
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4
with:
python-version: "3.10"
- name: Set up chart-testing
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
- name: Run chart-testing (lint)
run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}"
lint-charts4:
needs:
- generate-lint-matrix
if: needs.generate-lint-matrix.outputs.detected4 == 'true'
name: Lint charts Part 4
strategy:
matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix4) }}
fail-fast: false
max-parallel: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
ref: ${{ inputs.checkoutCommit }}
- name: lint Kubernetes tools
uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3
with:
setup-tools: |
helmv3
helm: "3.8.0"
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4
with:
python-version: "3.10"
- name: Set up chart-testing
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
- name: Run chart-testing (lint)
run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}"
lint-charts5:
needs:
- generate-lint-matrix
if: needs.generate-lint-matrix.outputs.detected5 == 'true'
name: Lint charts Part 5
strategy:
matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix5) }}
fail-fast: false
max-parallel: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
ref: ${{ inputs.checkoutCommit }}
- name: lint Kubernetes tools
uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3
with:
setup-tools: |
helmv3
helm: "3.8.0"
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4
with:
python-version: "3.10"
- name: Set up chart-testing
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
- name: Run chart-testing (lint)
run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}"
lint-charts6:
needs:
- generate-lint-matrix
if: needs.generate-lint-matrix.outputs.detected6 == 'true'
name: Lint charts Part 6
strategy:
matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix6) }}
fail-fast: false
max-parallel: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
ref: ${{ inputs.checkoutCommit }}
- name: lint Kubernetes tools
uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3
with:
setup-tools: |
helmv3
helm: "3.8.0"
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4
with:
python-version: "3.10"
- name: Set up chart-testing
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
- name: Run chart-testing (lint)
run: ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}" || ct lint --config ".github/ct-lint.yaml" --charts "${{ matrix.chart }}"
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
lint_success:
needs:
- generate-lint-matrix
- lint-charts1
- lint-charts2
- lint-charts3
- lint-charts4
- lint-charts5
- lint-charts6
if: |
always()
name: Lint successful
runs-on: ubuntu-latest
steps:
- name: Check lint matrix status
- name: Fetch and Verify dependencies
shell: bash
if: steps.list-changed.outputs.detected == 'true'
env:
charts_path: "./"
run: |
res1="${{needs.lint-charts1.result}}"
res2="${{needs.lint-charts2.result}}"
res3="${{needs.lint-charts3.result}}"
res4="${{needs.lint-charts4.result}}"
res5="${{needs.lint-charts5.result}}"
res6="${{needs.lint-charts6.result}}"
CHANGED=$(echo '${{ steps.list-changed.outputs.CHANGED_CHARTS }}' | jq --raw-output '.[]')
for changed in ${CHANGED}; do
.github/scripts/fetch_helm_deps.sh "${changed}"
done
if [[ $res1 == "success" || $res1 == "skipped" ]]; then
echo "lint tests 1 successfull..."
else
echo "lint tests 1 error, stopping due to failure..."
exit 1
fi
- name: Run Chart Linting
continue-on-error: true
id: lint
if: steps.list-changed.outputs.detected == 'true'
env:
result_file: /tmp/lint_result.txt
run: |
CHANGED=$(echo '${{ steps.list-changed.outputs.CHANGED_CHARTS }}' | jq --raw-output '.[]')
# If the github.base_ref is empty (eg it runs outside of a PR) it fails back to origin/master
.github/scripts/tc-lint.sh '${{ steps.list-changed.outputs.CHANGED_CHARTS }}' "origin/${{ github.base_ref }}"
if [[ $res2 == "success" || $res2 == "skipped" ]]; then
echo "lint tests 2 successfull..."
else
echo "lint tests 2 error, stopping due to failure..."
exit 1
fi
- name: Create/Update comment
if: steps.list-changed.outputs.detected == 'true'
uses: thollander/actions-comment-pull-request@632cf9ce90574d125be56b5f3405cda41a84e2fd # v2
with:
filePath: /tmp/lint_result.txt
comment_tag: lint_results
mode: recreate
if [[ $res3 == "success" || $res3 == "skipped" ]]; then
echo "lint tests 3 successfull..."
else
echo "lint tests 3 error, stopping due to failure..."
exit 1
fi
if [[ $res4 == "success" || $res4 == "skipped" ]]; then
echo "lint tests 4 successfull..."
else
echo "lint tests 4 error, stopping due to failure..."
exit 1
fi
if [[ $res5 == "success" || $res5 == "skipped" ]]; then
echo "lint tests 5 successfull..."
else
echo "lint tests 5 error, stopping due to failure..."
exit 1
fi
if [[ $res6 == "success" || $res6 == "skipped" ]]; then
echo "lint tests 6 successfull..."
else
echo "lint tests 6 error, stopping due to failure..."
- name: Lint Result
if: steps.list-changed.outputs.detected == 'true'
shell: bash
run: |
if [ "${{ steps.lint.outcome }}" != "success" ]; then
echo "Linting failed"
exit 1
fi
-2
View File
@@ -11,7 +11,6 @@ on:
- "charts/**"
jobs:
release-helm:
runs-on: ubuntu-latest
container:
@@ -238,7 +237,6 @@ jobs:
git commit -sm "Commit released docs for TrueCharts" || exit 0
git push
- name: Checkout Catalog
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
if: |
+56
View File
@@ -0,0 +1,56 @@
---
rules:
anchors:
forbid-undeclared-aliases: true
braces:
forbid: non-empty
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
brackets:
forbid: non-empty
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
colons:
max-spaces-before: 0
max-spaces-after: 1
commas:
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments:
require-starting-space: true
min-spaces-from-content: 2
# No --- to start a file
document-start: disable
document-end: disable
empty-lines:
max: 1
max-start: 0
max-end: 0
float-values:
require-numeral-before-decimal: true
forbid-scientific-notation: true
forbid-nan: true
forbid-inf: true
hyphens:
max-spaces-after: 1
indentation:
spaces: 2
indent-sequences: true
check-multi-line-strings: false
key-duplicates: enable
# Lines can be any length
line-length: disable
new-line-at-end-of-file: enable
new-lines:
type: unix
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
trailing-spaces: enable
truthy:
allowed-values: ["true", "false"]
@@ -21,7 +21,7 @@ name: kube-state-metrics
sources:
- https://github.com/truecharts/charts/tree/master/charts/dependency/kube-state-metrics
type: application
version: 1.0.2
version: 1.0.3
annotations:
truecharts.org/catagories: |
- metrics
+144 -56
View File
@@ -79,118 +79,206 @@ rbac:
primary: true
clusterWide: true
rules:
- apiGroups: ["certificates.k8s.io"]
- apiGroups:
- certificates.k8s.io
resources:
- certificatesigningrequests
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- configmaps
verbs: ["list", "watch"]
- apiGroups: ["batch"]
verbs:
- list
- watch
- apiGroups:
- batch
resources:
- cronjobs
verbs: ["list", "watch"]
- apiGroups: ["extensions", "apps"]
verbs:
- list
- watch
- apiGroups:
- extensions
- apps
resources:
- daemonsets
verbs: ["list", "watch"]
- apiGroups: ["extensions", "apps"]
verbs:
- list
- watch
- apiGroups:
- extensions
- apps
resources:
- deployments
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- endpoints
verbs: ["list", "watch"]
- apiGroups: ["autoscaling"]
verbs:
- list
- watch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs: ["list", "watch"]
- apiGroups: ["extensions", "networking.k8s.io"]
verbs:
- list
- watch
- apiGroups:
- extensions
- networking.k8s.io
resources:
- ingresses
verbs: ["list", "watch"]
- apiGroups: ["batch"]
verbs:
- list
- watch
- apiGroups:
- batch
resources:
- jobs
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- limitranges
verbs: ["list", "watch"]
- apiGroups: ["admissionregistration.k8s.io"]
verbs:
- list
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs: ["list", "watch"]
- apiGroups: ["networking.k8s.io"]
verbs:
- list
- watch
- apiGroups:
- networking.k8s.io
resources:
- networkpolicies
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- nodes
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- persistentvolumes
verbs: ["list", "watch"]
- apiGroups: ["policy"]
verbs:
- list
- watch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- pods
verbs: ["list", "watch"]
- apiGroups: ["extensions", "apps"]
verbs:
- list
- watch
- apiGroups:
- extensions
- apps
resources:
- replicasets
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- replicationcontrollers
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- resourcequotas
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs: ["list", "watch"]
- apiGroups: [""]
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- services
verbs: ["list", "watch"]
- apiGroups: ["apps"]
verbs:
- list
- watch
- apiGroups:
- apps
resources:
- statefulsets
verbs: ["list", "watch"]
- apiGroups: ["storage.k8s.io"]
verbs:
- list
- watch
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs: ["list", "watch"]
- apiGroups: ["autoscaling.k8s.io"]
verbs:
- list
- watch
- apiGroups:
- autoscaling.k8s.io
resources:
- verticalpodautoscalers
verbs: ["list", "watch"]
- apiGroups: ["admissionregistration.k8s.io"]
verbs:
- list
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingwebhookconfigurations
verbs: ["list", "watch"]
- apiGroups: ["storage.k8s.io"]
verbs:
- list
- watch
- apiGroups:
- storage.k8s.io
resources:
- volumeattachments
verbs: ["list", "watch"]
verbs:
- list
- watch
metrics:
main:
+1 -1
View File
@@ -35,7 +35,7 @@ sources:
- https://github.com/authelia/chartrepo
- https://github.com/authelia/authelia
type: application
version: 15.1.17
version: 15.1.19
annotations:
truecharts.org/catagories: |
- security
+4 -2
View File
@@ -10,8 +10,10 @@ workload:
podSpec:
containers:
main:
command: ["authelia"]
args: ["--config=/configuration.yaml"]
command:
- authelia
args:
- --config=/configuration.yaml
envFrom:
- configMapRef:
name: authelia-paths
+1 -1
View File
@@ -29,7 +29,7 @@ sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
type: application
version: 9.0.6
version: 9.0.7
annotations:
truecharts.org/catagories: |
- metrics
+2 -1
View File
@@ -972,7 +972,8 @@ alertmanager:
global:
resolve_timeout: 5m
route:
group_by: ["job"]
group_by:
- job
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
+1 -1
View File
@@ -30,7 +30,7 @@ sources:
- https://gitea.com/gitea/helm-chart
- https://github.com/go-gitea/gitea
type: application
version: 13.0.7
version: 13.0.8
annotations:
truecharts.org/catagories: |
- GIT
+4 -2
View File
@@ -100,7 +100,8 @@ workload:
enabled: true
imageSelector: image
type: init
command: ["/usr/sbin/init_directory_structure.sh"]
command:
- "/usr/sbin/init_directory_structure.sh"
securityContext:
runAsUser: 0
runAsNonRoot: false
@@ -111,7 +112,8 @@ workload:
enabled: true
imageSelector: image
type: init
command: ["/usr/sbin/configure_gitea.sh"]
command:
- "/usr/sbin/configure_gitea.sh"
envFrom:
- configMapRef:
name: gitea-env
+1 -1
View File
@@ -22,7 +22,7 @@ sources:
- https://www.kiwix.org/
- https://github.com/kiwix/kiwix-tools/blob/master/docker/server
type: application
version: 4.0.16
version: 4.0.17
annotations:
truecharts.org/SCALE-support: "true"
truecharts.org/catagories: |
+2 -1
View File
@@ -29,4 +29,5 @@ workload:
env:
DOWNLOAD: http://download.kiwix.org/zim/wikipedia_en_chemistry_nopic.zim
PORT: "{{ .Values.service.main.ports.main.port }}"
args: ["*.zim"]
args:
- "*.zim"
+1 -1
View File
@@ -23,7 +23,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/lldap
- https://github.com/nitnelave/lldap
type: application
version: 1.1.5
version: 1.1.6
annotations:
truecharts.org/catagories: |
- ldap
+4 -2
View File
@@ -26,8 +26,10 @@ workload:
podSpec:
containers:
main:
command: ["/app/lldap"]
args: ["run"]
command:
- "/app/lldap"
args:
- "run"
env:
LLDAP_LDAP_BASE_DN: "dc=example,dc=com"
LLDAP_JWT_SECRET:
+1 -1
View File
@@ -20,7 +20,7 @@ name: minio-console
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/minio-console
- https://github.com/minio/console
version: 6.0.17
version: 6.0.18
annotations:
truecharts.org/catagories: |
- media
+2 -1
View File
@@ -29,4 +29,5 @@ workload:
CONSOLE_MINIO_SERVER: ""
CONSOLE_PBKDF_PASSPHRASE: "changeme"
CONSOLE_PBKDF_SALT: "changeme"
args: ["server"]
args:
- "server"
+1 -1
View File
@@ -20,7 +20,7 @@ name: minio
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/minio
- https://github.com/minio/minio
version: 6.0.18
version: 6.0.19
annotations:
truecharts.org/catagories: |
- media
+6 -8
View File
@@ -49,14 +49,12 @@ workload:
path: "/minio/health/ready"
port: 10106
args:
[
"server",
"/data",
"--address",
":10106",
"--console-address",
":10107",
]
- "server"
- "/data"
- "--address"
- ":10106"
- "--console-address"
- ":10107"
env:
MINIO_ROOT_USER: "minio"
MINIO_BROWSER_REDIRECT_URL: ""
+1 -1
View File
@@ -19,7 +19,7 @@ name: netdata
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/netdata
- https://github.com/netdata
version: 5.0.14
version: 5.0.15
annotations:
truecharts.org/catagories: |
- utilities
+5 -2
View File
@@ -41,7 +41,8 @@ rbac:
- "get"
- "list"
- "watch"
- apiGroups: [""]
- apiGroups:
- ""
resources:
- "namespaces"
verbs:
@@ -142,7 +143,9 @@ workload:
enabled: true
imageSelector: image
type: init
command: ["/bin/bash", "-c"]
command:
- /bin/bash
- -c
args:
- |-
copy_config () {
+1 -1
View File
@@ -18,7 +18,7 @@ name: ntfy
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/ntfy
- https://github.com/binwiederhier/ntfy/
version: 5.0.7
version: 5.0.9
annotations:
truecharts.org/catagories: |
- media
+2 -1
View File
@@ -39,7 +39,8 @@ workload:
type: tcp
startup:
type: tcp
args: ["serve"]
args:
- "serve"
env:
NTFY_LISTEN_HTTP: ":{{ .Values.service.main.ports.main.port }}"
# User Defined
+1 -1
View File
@@ -18,7 +18,7 @@ name: pinry
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/pinry
- https://github.com/pinry/pinry/
version: 5.0.11
version: 5.0.13
annotations:
truecharts.org/catagories: |
- media
+5 -4
View File
@@ -36,11 +36,13 @@ workload:
secretKeyRef:
name: secrets
key: SECRET_KEY
command: ["sh", "-c"]
command:
- sh
- -c
args:
- |
keyfile="/data/production_secret_key.txt"; if [ ! -f ${keyfile} ]; then
keyfile="/data/production_secret_key.txt";
if [ ! -f ${keyfile} ]; then
echo "No ${keyfile} File...";
echo "Creating ${keyfile} file...";
echo "${SECRET_KEY}" > ${keyfile};
@@ -51,7 +53,6 @@ workload:
echo "Failed.";
fi;
else
echo "${keyfile} File exists. Skipping...";
fi;
containers:
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v2
kubeVersion: ">=1.16.0-0"
name: projectsend
version: 7.0.12
version: 7.0.14
appVersion: "2021.12.10"
description: Projectsend is a self-hosted application that lets you upload files and assign them to specific clients that you create yourself.
type: application
+3 -1
View File
@@ -53,7 +53,9 @@ workload:
expandObjectName: false
name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}'
key: plainhost
command: ["/bin/sh", "-c"]
command:
- /bin/sh
- -c
args:
- |-
export configFile="/config/projectsend/sys.config.php";
+1 -1
View File
@@ -22,7 +22,7 @@ sources:
- https://github.com/recyclarr/recyclarr
- https://github.com/recyclarr/recyclarr/pkgs/container/recyclarr
type: application
version: 4.0.15
version: 4.0.16
annotations:
truecharts.org/SCALE-support: "true"
truecharts.org/catagories: |
+3 -1
View File
@@ -28,7 +28,9 @@ workload:
type: install
enabled: true
imageSelector: "image"
command: ["recyclarr", "create-config"]
command:
- recyclarr
- create-config
containers:
main:
probes:
+1 -1
View File
@@ -19,7 +19,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/ser2sock
- https://github.com/nutechsoftware/ser2sock
- https://github.com/tenstartups/ser2sock
version: 9.0.14
version: 9.0.15
annotations:
truecharts.org/catagories: |
- media
@@ -3,3 +3,11 @@ persistence:
enabled: false
type: hostPath
mountPath: /dev/ttyUSB0
workload:
main:
podSpec:
containers:
main:
env:
SERIAL_DEVICE: "{{ .Values.persistence.usb.mountPath }}"
+1 -1
View File
@@ -35,5 +35,5 @@ workload:
main:
env:
LISTENER_PORT: "{{ .Values.service.main.ports.main.port }}"
SERIAL_DEVICE: "{{ .Values.persistence.usb.mountPath }}"
SERIAL_DEVICE: ""
BAUD_RATE: 115200
+1 -1
View File
@@ -20,7 +20,7 @@ name: zigbee2mqtt
sources:
- https://github.com/truecharts/charts/tree/master/charts/stable/zigbee2mqtt
- https://github.com/Koenkk/zigbee2mqtt
version: 7.0.16
version: 7.0.17
annotations:
truecharts.org/catagories: |
- media
+3 -1
View File
@@ -41,7 +41,9 @@ workload:
ZIGBEE2MQTT_CONFIG_SERIAL_PORT: "{{ .Values.workload.main.podSpec.containers.main.env.ZIGBEE2MQTT_CONFIG_SERIAL_PORT }}"
ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER: "{{ .Values.workload.main.podSpec.containers.main.env.ZIGBEE2MQTT_CONFIG_SERIAL_ADAPTER }}"
USE_CUSTOM_CONFIG_FILE: "{{ .Values.workload.main.podSpec.containers.main.env.USE_CUSTOM_CONFIG_FILE }}"
command: ["/bin/sh", "-c"]
command:
- /bin/sh
- -c"
args:
- >
if [ -f /data/configuration.yaml ] || [ ${USE_CUSTOM_CONFIG_FILE} == true ]; then
+1 -1
View File
@@ -29,7 +29,7 @@
type: string
default: ""
required: true
- variable: certificateIssuer
label: Use Cert-Manager clusterIssuer
description: 'add the name of your cert-manager clusterIssuer here for automatic tls certificates.'
+8 -6
View File
@@ -40,14 +40,16 @@ function incr_semver() {
BUMPTYPE=${1}
if [ -z ${2+x} ]; then
for train in dependency enterprise; do
for train in dependency incubator stable enterprise; do
for chart in charts/${train}/*; do
if [ -d "${chart}" ]; then
echo "Bumping version for ${train}/${chart}"
OLDVER=$(cat ${chart}/Chart.yaml | grep "^version: ")
OLDVER=${OLDVER#version: }
NEWVER=$(incr_semver ${OLDVER} ${BUMPTYPE})
sed -i "s|^version:.*|version: ${NEWVER}|g" ${chart}/Chart.yaml
if [ -f "${chart}/Chart.yaml" ]; then
echo "Bumping version for ${train}/${chart}"
OLDVER=$(cat ${chart}/Chart.yaml | grep "^version: ")
OLDVER=${OLDVER#version: }
NEWVER=$(incr_semver ${OLDVER} ${BUMPTYPE})
sed -i "s|^version:.*|version: ${NEWVER}|g" ${chart}/Chart.yaml
fi
fi
done
done