Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Ruiz <[email protected]>
  • Loading branch information
migruiz4 committed Jan 15, 2025
1 parent e094a60 commit 0345b2b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/index-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ jobs:
id: integrity-check
run: |
status="fail"
consecutive_failures=0
attempts=0
# We want to check for consistent failures
# To do so, we will look for 3 consecutive failures with a 30 seconds wait
# A single success is enough to pass
while [[ "${status}" != "ok" && $consecutive_failures -lt 3 ]]; do
while [[ "${status}" != "ok" && $attempts -lt 3 ]]; do
# Check the index.yaml integrity
REMOTE_MD5=($(curl -Ls http://charts.bitnami.com/bitnami/index.yaml | md5sum))
REPOSITORY_MD5=($(md5sum bitnami/index.yaml))
# Compare the index.yaml checksums remote and locally
if [[ "${REPOSITORY_MD5[0]}" == "${REMOTE_MD5[0]}" ]]; then
status='ok'
else
consecutive_failures++
attempts=$((attempts+1))
echo "Integrity check failed. Remote checksum '${REMOTE_MD5[0]}' does not match expected '${REPOSITORY_MD5[0]}'";
fi
# Wait 30 seconds
Expand Down Expand Up @@ -69,17 +69,21 @@ jobs:
run: |
repo="http://charts.bitnami.com/bitnami"
status="fail"
consecutive_failures=0
attempts=0
# We want to check for consistent failures
# To do so, we will look for 3 consecutive failures with a 30 seconds wait
# A single success is enough to pass
while [[ "${status}" != "ok" && $consecutive_failures -lt 3 ]]; do
while [[ "${status}" != "ok" && $attempts -lt 3 ]]; do
# Validates the helm repository can be added and updated
if helm repo add bitnami "${repo}" && helm repo update bitnami; then
status="ok"
else
consecutive_failures++
attempts=$((attempts+1))
echo "Failed to pull charts from helm repository '${repo}'"
# If present, remove repository to allow retries
if helm repo list | grep -q bitnami; then
helm repo remove bitnami
fi
fi
# Wait 30 seconds
sleep 30
Expand Down

0 comments on commit 0345b2b

Please sign in to comment.