File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,22 @@ if [ ! -d "${VENV}" ]; then
1010fi
1111
1212" ${VENV} /bin/python" -m pip install cfn-lint --upgrade --quiet
13- # update cfn schema
14- " ${VENV} /bin/cfn-lint" -u
13+ # update cfn schema with retry logic (can fail due to network issues)
14+ MAX_RETRIES=3
15+ RETRY_COUNT=0
16+ while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
17+ if " ${VENV} /bin/cfn-lint" -u; then
18+ echo " Successfully updated cfn-lint schema"
19+ break
20+ else
21+ RETRY_COUNT=$(( RETRY_COUNT + 1 ))
22+ if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
23+ echo " cfn-lint schema update failed, retrying... (attempt $RETRY_COUNT of $MAX_RETRIES )"
24+ sleep 2
25+ else
26+ echo " cfn-lint schema update failed after $MAX_RETRIES attempts"
27+ exit 1
28+ fi
29+ fi
30+ done
1531" ${VENV} /bin/cfn-lint" --format parseable
You can’t perform that action at this time.
0 commit comments