TrueChartsClone/.github/scripts/fetch_helm_deps.sh

212 lines
9.8 KiB
Bash
Raw Normal View History

#!/bin/bash
# require go-yq
command -v go-yq >/dev/null 2>&1 || {
printf >&2 "%s\n" "❌ go-yq (https://github.com/mikefarah/yq) is not installed. Aborting."
exit 1
}
# define defaults
cache_path=${cache_path:-./tgz_cache}
charts_path=${charts_path:-./charts}
# Do NOT persist this directory, in order to always have the latest index for this run.
index_cache=${index_cache:-./index_cache}
mkdir -p "$cache_path"
trains=(
"enterprise"
"stable"
"incubator"
"dependency"
"operators"
)
load_gpg_key() {
echo ""
echo "⏬ Downloading and Loading TrueCharts pgp Public Key"
gpg_dir=.cr-gpg
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._
2023-05-23 08:26:41 +00:00
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."
feat: add cert-manager operator chart DNM DRAFT (#10297) **Description** Draft addition of cert-manager as an operator chart **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ 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._
2023-07-15 17:22:49 +00:00
curl --silent https://cert-manager.io/public-keys/cert-manager-keyring-2021-09-20-1020CF3C033D4F35BAE1C19E1226061C665DF13E.gpg > $gpg_dir/certman.gpg || echo "❌ Couldn't load certman Public Key."
echo "✅ Public Key loaded successfully..."
echo ""
}
export -f load_gpg_key
download_deps() {
local train_chart="$1"
# Extract dependencies for the Chart
deps=$(go-yq '.dependencies' "$charts_path/$train_chart/Chart.yaml")
# Find how many deps exist, so we can loop through them
length=$(echo "$deps" | go-yq '. | length')
echo "🤖🔨 Processing <$charts_path/$train_chart>... Dependencies: $length"
echo ""
for idx in $(eval echo "{0..$length}"); do
# Retrieve info for the dep in the current index..
curr_dep=$(echo "$deps" | pos="$idx" go-yq '.[env(pos)]')
if [ ! "$curr_dep" == null ]; then
name=$(echo "$curr_dep" | go-yq '.name')
version=$(echo "$curr_dep" | go-yq '.version')
repo=$(echo "$curr_dep" | go-yq '.repository')
# Remove http:// or https:// from url to create a dir name
repo_dir="${repo#http://}"
repo_dir="${repo#https://}"
echo "**********"
echo "🔗 Dependency: $name"
echo "🆚 Version: $version"
echo "🏠 Repository: $repo"
echo ""
if [ -f "$cache_path/$repo_dir/$name-$version.tgz" ]; then
echo "✅ Dependency exists in cache..."
else
echo "🤷‍♂️ Dependency does not exists in cache..."
repo_url="$repo/index.yaml"
if [ -f "$index_cache/$repo_dir/index.yaml" ]; then
echo "✅ Index for <$repo> exists!"
else
echo "⏬ Index for <$repo> is missing. Downloading from <$repo_url>..."
mkdir -p $index_cache/$repo_dir
wget --quiet "$repo_url" -O "$index_cache/$repo_dir/index.yaml"
if [ ! $? ]; then
echo "❌ wget encountered an error..."
exit 1
fi
if [ -f "$index_cache/$repo_dir/index.yaml" ]; then
echo "✅ Downloaded index for <$repo>!"
else
echo "❌ Failed to download index for <$repo> from <$repo_url>"
exit 1
fi
fi
# At the time of writing this, only 1 url existed (.urls[0]) pointing to the actual tgz.
# Extract url from repo_url. It's under .entries.DEP_NAME.urls. We filter the specific version first (.version)
dep_url=$(v="$version" n="$name" go-yq '.entries.[env(n)].[] | select (.version == env(v)) | .urls.[0]' "$index_cache/$repo_dir/index.yaml")
feat: add cert-manager operator chart DNM DRAFT (#10297) **Description** Draft addition of cert-manager as an operator chart **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ 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._
2023-07-15 17:22:49 +00:00
# tmp hotpatch for cert-manager
if [[ ! "$dep_url" == "https"* ]]; then
dep_url="https://charts.jetstack.io/${dep_url}"
fi
echo ""
echo "⏬ Downloading dependency $name-$version from $dep_url..."
mkdir -p "$cache_path/$repo_dir"
wget --quiet "$dep_url" -P "$cache_path/$repo_dir"
feat: add cert-manager operator chart DNM DRAFT (#10297) **Description** Draft addition of cert-manager as an operator chart **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ 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._
2023-07-15 17:22:49 +00:00
wget --quiet "$dep_url.prov" -P "$cache_path/$repo_dir" || echo "failed downloading .prov"
if [ ! $? ]; then
echo "❌ wget encountered an error..."
if [[ "$train_chart" =~ incubator\/.* ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml"|| exit 1
feat(velero): add velero (#14648) **Description** This adds a Velero helm chart. This time we've chosen to directly use the upstream operator helm chart, as it does not contain many problematic bits and would offer more stability. ⚒️ Fixes #14524 **⚙️ Type of change** - [x] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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:** This does not contain any custom resources references backed by common yet. However, those can also be added using velero cli for testing for the time being. It also does not contain any GUI sections for SCALE yet, just like cert-manager it would likely be added on-demand. **✔️ 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. - [x] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [x] 🖼️ 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._
2023-11-14 13:12:27 +00:00
elif [[ "$name" =~ "velero" ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml"|| exit 1
feat(metallb/cloudnative-pg/CI): BREAKING CHANGE move to consume upstream helm charts (#14681) **Description** To ensure stability, we've decided to directly use upstream helm-charts from their respective projects for operators specifically. Mostly because they heavily rely on rbac, crds and crs, which could cause conflicts between shipped rbac/crd and container versions. also patches the ci for a few other operators to exclude them from signing requirements ⚒️ Fixes # <!--(issue)--> **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [x] ⚠️ 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ 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. - [x] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [x] 🖼️ 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._
2023-11-15 14:39:03 +00:00
elif [[ "$name" =~ "metallb" ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml"|| exit 1
elif [[ "$name" =~ "cloudnative-pg" ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml"|| exit 1
elif [[ "$name" =~ "kube-prometheus-stack" ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml"|| exit 1
feat: add cert-manager operator chart DNM DRAFT (#10297) **Description** Draft addition of cert-manager as an operator chart **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ 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._
2023-07-15 17:22:49 +00:00
elif [[ "$name" =~ "cert-manager" ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/certman.gpg || \
helm dependency update "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/certman.gpg || exit 1
else
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
if [ -f "$cache_path/$repo_dir/$name-$version.tgz" ]; then
echo "✅ Dependency Downloaded!"
feat: add cert-manager operator chart DNM DRAFT (#10297) **Description** Draft addition of cert-manager as an operator chart **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ 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._
2023-07-15 17:22:49 +00:00
if [[ "$name" =~ "cert-manager" ]]; then
helm verify $cache_path/$repo_dir/$name-$version.tgz --keyring $gpg_dir/certman.gpg || \
helm verify $cache_path/$repo_dir/$name-$version.tgz --keyring $gpg_dir/certman.gpg || exit 1
feat(velero): add velero (#14648) **Description** This adds a Velero helm chart. This time we've chosen to directly use the upstream operator helm chart, as it does not contain many problematic bits and would offer more stability. ⚒️ Fixes #14524 **⚙️ Type of change** - [x] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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:** This does not contain any custom resources references backed by common yet. However, those can also be added using velero cli for testing for the time being. It also does not contain any GUI sections for SCALE yet, just like cert-manager it would likely be added on-demand. **✔️ 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. - [x] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [x] 🖼️ 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._
2023-11-14 13:12:27 +00:00
elif [[ "$name" =~ "velero" ]]; then
echo "Velero is not signed..."
feat(metallb/cloudnative-pg/CI): BREAKING CHANGE move to consume upstream helm charts (#14681) **Description** To ensure stability, we've decided to directly use upstream helm-charts from their respective projects for operators specifically. Mostly because they heavily rely on rbac, crds and crs, which could cause conflicts between shipped rbac/crd and container versions. also patches the ci for a few other operators to exclude them from signing requirements ⚒️ Fixes # <!--(issue)--> **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [x] ⚠️ 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ 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. - [x] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [x] 🖼️ 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._
2023-11-15 14:39:03 +00:00
elif [[ "$name" =~ "metallb" ]]; then
echo "metallb is not signed..."
elif [[ "$name" =~ "cloudnative-pg" ]]; then
echo "cloudnative-pg is not signed..."
elif [[ "$name" =~ "kube-prometheus-stack" ]]; then
echo "kube-prometheus-stack is not signed..."
feat: add cert-manager operator chart DNM DRAFT (#10297) **Description** Draft addition of cert-manager as an operator chart **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ 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._
2023-07-15 17:22:49 +00:00
elif [[ ! "$train_chart" =~ incubator\/.* ]]; then
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
else
echo "Skipping dependency signature verification for $train_chart..."
fi
else
echo "❌ Failed to download dependency"
# Try helm dependency build/update or otherwise fail fast if a dep fails to download...
if [[ "$train_chart" =~ incubator\/.* ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml"|| exit 1
feat(velero): add velero (#14648) **Description** This adds a Velero helm chart. This time we've chosen to directly use the upstream operator helm chart, as it does not contain many problematic bits and would offer more stability. ⚒️ Fixes #14524 **⚙️ Type of change** - [x] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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:** This does not contain any custom resources references backed by common yet. However, those can also be added using velero cli for testing for the time being. It also does not contain any GUI sections for SCALE yet, just like cert-manager it would likely be added on-demand. **✔️ 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. - [x] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [x] 🖼️ 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._
2023-11-14 13:12:27 +00:00
elif [[ "$name" =~ "velero" ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml"|| exit 1
feat(metallb/cloudnative-pg/CI): BREAKING CHANGE move to consume upstream helm charts (#14681) **Description** To ensure stability, we've decided to directly use upstream helm-charts from their respective projects for operators specifically. Mostly because they heavily rely on rbac, crds and crs, which could cause conflicts between shipped rbac/crd and container versions. also patches the ci for a few other operators to exclude them from signing requirements ⚒️ Fixes # <!--(issue)--> **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [x] ⚠️ 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ 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. - [x] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [x] 🖼️ 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._
2023-11-15 14:39:03 +00:00
elif [[ "$name" =~ "metallb" ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml"|| exit 1
elif [[ "$name" =~ "cloudnative-pg" ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml"|| exit 1
elif [[ "$name" =~ "kube-prometheus-stack" ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml"|| exit 1
feat: add cert-manager operator chart DNM DRAFT (#10297) **Description** Draft addition of cert-manager as an operator chart **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 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:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ 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._
2023-07-15 17:22:49 +00:00
elif [[ "$name" =~ "cert-manager" ]]; then
helm dependency build "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/certman.gpg || \
helm dependency update "$charts_path/$train_chart/Chart.yaml" --verify --keyring $gpg_dir/certman.gpg || exit 1
else
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
fi
echo ""
mkdir -p "$charts_path/$train_chart/charts"
echo "📝 Copying dependency <$name-$version.tgz> to <$charts_path/$train_chart/charts>..."
cp "$cache_path/$repo_dir/$name-$version.tgz" "$charts_path/$train_chart/charts"
if [ -f "$charts_path/$train_chart/charts/$name-$version.tgz" ]; then
echo "✅ Dependency copied!"
echo ""
else
echo "❌ Failed to copy dependency"
# Try helm dependency build/update or otherwise fail fast if a dep fails to copy...
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._
2023-05-23 08:26:41 +00:00
helm dependency build "$charts_path/$train_chart/Chart.yaml" || \
helm dependency update "$charts_path/$train_chart/Chart.yaml" || exit 1
fi
fi
done
}
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._
2023-05-23 08:26:41 +00:00
export -f download_deps
load_gpg_key
if [ -z "$1" ]; then
for train in "${trains[@]}"; do
for chart in $(ls "$charts_path/$train"); do
download_deps "${train}/${chart}"
done
done
else
download_deps "$1"
fi