feat(ci): split-off helm-prep and precommit

This commit is contained in:
kjeld Schouten-Lebbing
2022-04-01 11:45:11 +02:00
parent be9a819837
commit 845ecd2231
4 changed files with 25 additions and 26 deletions
-23
View File
@@ -24,19 +24,6 @@ chart_runner(){
}
export -f chart_runner
prep_helm() {
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
}
export -f prep_helm
# Designed to ensure the appversion in Chart.yaml is in sync with the primary App tag if found
sync_tag() {
local chart="$1"
@@ -118,14 +105,6 @@ sec_scan_cleanup() {
}
export -f sec_scan_cleanup
pre_commit() {
echo "Running pre-commit test-and-cleanup..."
pre-commit run --all ||:
# Fix sh files to always be executable
find . -name '*.sh' | xargs chmod +x
}
export -f pre_commit
create_changelog() {
local chart="$1"
local chartname="$2"
@@ -174,7 +153,5 @@ generate_docs() {
export -f generate_docs
parthreads=$(($(nproc) * 2))
prep_helm
parallel -j ${parthreads} chart_runner '2>&1' ::: ${1}
echo "Starting post-processing"
pre_commit
+22
View File
@@ -29,6 +29,18 @@ jobs:
wget -O /tmp/helm-docs.deb https://github.com/k8s-at-home/helm-docs/releases/download/v0.1.1/helm-docs_0.1.1_Linux_x86_64.deb
sudo dpkg -i /tmp/helm-docs.deb
- name: Prep Helm
run: |
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
- name: Checkout
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3
with:
@@ -47,6 +59,16 @@ jobs:
CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }})
.github/scripts/gen-docs.sh ${CHARTS}
- name: Fix Pre-Commit issues
shell: bash
if: |
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
run: |
echo "Running pre-commit test-and-cleanup..."
pre-commit run --all ||:
# Fix sh files to always be executable
find . -name '*.sh' | xargs chmod +x
- name: Checkout
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3
with:
+1 -1
View File
@@ -22,7 +22,7 @@ sources:
- https://grafana.com/oss/loki/
- https://grafana.com/docs/loki/latest/
type: application
version: 2.0.16
version: 2.0.17
annotations:
truecharts.org/catagories: |
- metrics
+2 -2
View File
@@ -52,11 +52,11 @@ main() {
# copy_general_docs
if [[ -n "${changed_charts[*]}" ]]; then
prep_helm
#prep_helm
parallel -j ${parthreads} chart_runner '2>&1' ::: ${changed_charts[@]}
echo "Starting post-processing"
pre_commit
#pre_commit
validate_catalog
if [ "${production}" == "true" ]; then
gen_dh_cat