chore(ci): fix cp path (#4387)
* chore(ci): fix a visual typo * fix copy.. * its train/chart :D
This commit is contained in:
@@ -8,7 +8,7 @@ command -v go-yq >/dev/null 2>&1 || {
|
|||||||
|
|
||||||
# define defaults
|
# define defaults
|
||||||
cache_path=${cache_path:-./tgz_cache}
|
cache_path=${cache_path:-./tgz_cache}
|
||||||
charts_ath=${charts_ath:-./charts}
|
charts_path=${charts_path:-./charts}
|
||||||
|
|
||||||
mkdir -p "$cache_path"
|
mkdir -p "$cache_path"
|
||||||
|
|
||||||
@@ -20,12 +20,12 @@ trains=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
download_deps() {
|
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')
|
length=$(echo "$deps" | go-yq '. | length')
|
||||||
|
|
||||||
echo "🔨 Processing <$charts_ath/$charttrain>... Dependencies: $length"
|
echo "🔨 Processing <$charts_path/$train_chart>... Dependencies: $length"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
for idx in $(eval echo "{0..$length}"); do
|
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/"
|
wget --quiet "$dep_url" -P "$cache_path/"
|
||||||
if [ ! $? ]; then
|
if [ ! $? ]; then
|
||||||
echo "❌ wget encountered an error..."
|
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
|
fi
|
||||||
|
|
||||||
if [ -f "$cache_path/$name-$version.tgz" ]; then
|
if [ -f "$cache_path/$name-$version.tgz" ]; then
|
||||||
@@ -64,14 +64,14 @@ for idx in $(eval echo "{0..$length}"); do
|
|||||||
else
|
else
|
||||||
echo "❌ Failed to download dependency"
|
echo "❌ Failed to download dependency"
|
||||||
# Try helm dependency build/update or otherwise fail fast if a dep fails to download...
|
# 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
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
mkdir -p "$charts_ath/$charttrain/charts"
|
mkdir -p "$charts_path/$train_chart/charts"
|
||||||
echo "📝 Copying dependency <$name-$version.tgz> to <$charts_ath/$charttrain/charts>..."
|
echo "📝 Copying dependency <$name-$version.tgz> to <$charts_path/$train_chart/charts>..."
|
||||||
cp "$cache_path/$name-$version.tgz" "$charttrain/charts"
|
cp "$cache_path/$name-$version.tgz" "$charts_path/$train_chart/charts"
|
||||||
|
|
||||||
if [ -f "$cache_path/$name-$version.tgz" ]; then
|
if [ -f "$cache_path/$name-$version.tgz" ]; then
|
||||||
echo "✅ Dependency copied!"
|
echo "✅ Dependency copied!"
|
||||||
@@ -79,7 +79,7 @@ for idx in $(eval echo "{0..$length}"); do
|
|||||||
else
|
else
|
||||||
echo "❌ Failed to copy dependency"
|
echo "❌ Failed to copy dependency"
|
||||||
# Try helm dependency build/update or otherwise fail fast if a dep fails to copy...
|
# 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
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -87,9 +87,9 @@ echo "--------"
|
|||||||
}
|
}
|
||||||
export -f download_deps
|
export -f download_deps
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
for train in "${trains[@]}"; do
|
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}"
|
download_deps "${train}/${chart}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ jobs:
|
|||||||
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
|
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
|
||||||
run: |
|
run: |
|
||||||
CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }})
|
CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }})
|
||||||
charts_ath="charts"
|
charts_path="charts"
|
||||||
for changed in ${CHARTS[@]}; do
|
for changed in ${CHARTS[@]}; do
|
||||||
.github/scripts/fetch_helm_deps.sh "${changed}"
|
.github/scripts/fetch_helm_deps.sh "${changed}"
|
||||||
done
|
done
|
||||||
@@ -161,7 +161,7 @@ jobs:
|
|||||||
git push
|
git push
|
||||||
cd -
|
cd -
|
||||||
rm -rf catalog
|
rm -rf catalog
|
||||||
|
|
||||||
- name: set git author
|
- name: set git author
|
||||||
if: |
|
if: |
|
||||||
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
|
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
|
||||||
@@ -169,7 +169,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config user.name "TrueCharts-Bot"
|
git config user.name "TrueCharts-Bot"
|
||||||
git config user.email "bot@truecharts.org"
|
git config user.email "bot@truecharts.org"
|
||||||
|
|
||||||
- name: Run chart-releaser for dependency apps
|
- name: Run chart-releaser for dependency apps
|
||||||
uses: helm/chart-releaser-action@98bccfd32b0f76149d188912ac8e45ddd3f8695f # tag=v1.4.1
|
uses: helm/chart-releaser-action@98bccfd32b0f76149d188912ac8e45ddd3f8695f # tag=v1.4.1
|
||||||
if: |
|
if: |
|
||||||
@@ -180,7 +180,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CR_TOKEN: "${{ secrets.BOT_TOKEN }}"
|
CR_TOKEN: "${{ secrets.BOT_TOKEN }}"
|
||||||
CR_SKIP_EXISTING: "true"
|
CR_SKIP_EXISTING: "true"
|
||||||
|
|
||||||
- name: Tag App Releases
|
- name: Tag App Releases
|
||||||
if: |
|
if: |
|
||||||
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
|
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
|
||||||
|
|||||||
Reference in New Issue
Block a user