chore(ci): fix cp path (#4387)

* chore(ci): fix a visual typo

* fix copy..

* its train/chart :D
This commit is contained in:
Stavros Kois 2022-11-12 17:58:44 +02:00 committed by GitHub
parent 37ea4a1920
commit dcc7fe5ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 16 deletions

View File

@ -8,7 +8,7 @@ command -v go-yq >/dev/null 2>&1 || {
# define defaults
cache_path=${cache_path:-./tgz_cache}
charts_ath=${charts_ath:-./charts}
charts_path=${charts_path:-./charts}
mkdir -p "$cache_path"
@ -20,12 +20,12 @@ trains=(
)
download_deps() {
local charttrain="$1"
local train_chart="$1"
deps=$(go-yq '.dependencies' "$charts_ath/$charttrain/Chart.yaml")
deps=$(go-yq '.dependencies' "$charts_path/$train_chart/Chart.yaml")
length=$(echo "$deps" | go-yq '. | length')
echo "🔨 Processing <$charts_ath/$charttrain>... Dependencies: $length"
echo "🔨 Processing <$charts_path/$train_chart>... Dependencies: $length"
echo ""
for idx in $(eval echo "{0..$length}"); do
@ -56,7 +56,7 @@ for idx in $(eval echo "{0..$length}"); do
wget --quiet "$dep_url" -P "$cache_path/"
if [ ! $? ]; then
echo "❌ wget encountered an error..."
helm dependency build "$charts_ath/$charttrain/Chart.yaml" || helm dependency update "$charts_ath/$charttrain/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
if [ -f "$cache_path/$name-$version.tgz" ]; then
@ -64,14 +64,14 @@ for idx in $(eval echo "{0..$length}"); do
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_ath/$charttrain/Chart.yaml" || helm dependency update "$charts_ath/$charttrain/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
echo ""
mkdir -p "$charts_ath/$charttrain/charts"
echo "📝 Copying dependency <$name-$version.tgz> to <$charts_ath/$charttrain/charts>..."
cp "$cache_path/$name-$version.tgz" "$charttrain/charts"
mkdir -p "$charts_path/$train_chart/charts"
echo "📝 Copying dependency <$name-$version.tgz> to <$charts_path/$train_chart/charts>..."
cp "$cache_path/$name-$version.tgz" "$charts_path/$train_chart/charts"
if [ -f "$cache_path/$name-$version.tgz" ]; then
echo "✅ Dependency copied!"
@ -79,7 +79,7 @@ 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_ath/$charttrain/Chart.yaml" || helm dependency update "$charts_ath/$charttrain/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
@ -87,9 +87,9 @@ echo "--------"
}
export -f download_deps
if [ -z "$1" ]; then
if [ -z "$1" ]; then
for train in "${trains[@]}"; do
for chart in $(ls "$charts_ath/$train"); do
for chart in $(ls "$charts_path/$train"); do
download_deps "${train}/${chart}"
done
done

View File

@ -141,7 +141,7 @@ jobs:
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
run: |
CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }})
charts_ath="charts"
charts_path="charts"
for changed in ${CHARTS[@]}; do
.github/scripts/fetch_helm_deps.sh "${changed}"
done
@ -161,7 +161,7 @@ jobs:
git push
cd -
rm -rf catalog
- name: set git author
if: |
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
@ -169,7 +169,7 @@ jobs:
run: |
git config user.name "TrueCharts-Bot"
git config user.email "bot@truecharts.org"
- name: Run chart-releaser for dependency apps
uses: helm/chart-releaser-action@98bccfd32b0f76149d188912ac8e45ddd3f8695f # tag=v1.4.1
if: |
@ -180,7 +180,7 @@ jobs:
env:
CR_TOKEN: "${{ secrets.BOT_TOKEN }}"
CR_SKIP_EXISTING: "true"
- name: Tag App Releases
if: |
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'