Skip to content

Commit

Permalink
Merge pull request #1002 from UniqueNetwork/ci/fix-try-runtime
Browse files Browse the repository at this point in the history
fixed positive output in case of error
  • Loading branch information
CertainLach authored Sep 27, 2023
2 parents 448629b + 2244ff0 commit f2a1159
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/try-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,31 +210,21 @@ jobs:
return 1
fi
else
DOCKER_LOGS=$(do_docker_logs)
while [ $counter_life -lt 3 ]
do
(( counter_life++ ))
if [[ -n ${DOCKER_LOGS} ]]; then
echo "TryRuntime_on_runtime_upgrade executed without errors"
return 0
else
echo "Container try-runtime not RUNNING"
return 1
fi
done
(( counter_life++ ))
echo "Container try-runtime not RUNNING" $counter_life "time"
return 1
fi
exit 0
}
while ! is_started; do
echo "Waiting for special message in log files "
sleep 30s
counter=$(( $counter - 1 ))
echo "Counter: $counter"
if [ "$counter" -gt "0" ]; then
if [ "$counter" -gt "0" ] && [ "$counter_life" -lt "3" ]; then
continue
else
echo "Counter reached zero, yet upgrade is not finished"
echo "Counter reached zero, yet upgrade is not finished correctly or Container try-runtime is not RUNNING"
exit 1
fi
done
Expand Down

0 comments on commit f2a1159

Please sign in to comment.