improve logging
All checks were successful
lint-test-helm / lint-helm (push) Successful in 12s
render-manifests-push / render-manifests-push (push) Successful in 37s
renovate / renovate (push) Successful in 48s

This commit is contained in:
2025-12-20 00:30:20 -06:00
parent 87d20e32e2
commit 0c8d733408
2 changed files with 43 additions and 3 deletions

View File

@@ -13,39 +13,54 @@ data:
MAX_RETRIES=5
SUCCESS=false
echo " "
echo ">> Running Update Port Script ..."
echo " "
echo ">> Verifying required commands ..."
for i in $(seq 1 "$MAX_RETRIES"); do
if apk update 2>&1 >/dev/null; then
echo " "
echo ">> Attempt $i: Repositories are reachable"
SUCCESS=true
break
else
echo " "
echo ">> Attempt $i: Connection failed, retrying in 5 seconds ..."
sleep 5
fi
done
if [ "$SUCCESS" = false ]; then
echo " "
echo ">> ERROR: Could not connect to apk repositories after $MAX_RETRIES attempts, exiting ..."
exit 1
fi
if ! command -v curl 2>&1 >/dev/null; then
echo " "
echo ">> Command curl could not be found, installing";
apk add --no-cache -q curl;
if [ $? -eq 0 ]; then
echo " "
echo ">> Installation successful"
else
echo " "
echo ">> Installation failed with exit code $?"
exit 1
fi
fi;
if ! command -v jq 2>&1 >/dev/null; then
echo "jq could not be found, installing";
echo " "
echo ">> Command jq could not be found, installing";
apk add --no-cache -q jq;
if [ $? -eq 0 ]; then
echo " "
echo ">> Installation successful"
else
echo " "
echo ">> Installation failed with exit code $?"
exit 1
fi