difftreelog
ci fail on forkless-with-data failure
in: master
1 file changed
.github/workflows/forkless-update-data.ymldiffbeforeafterboth206206207 - name: Check if docker logs consist logs related to Runtime Upgrade testing.207 - name: Check if docker logs consist logs related to Runtime Upgrade testing.208 if: success()208 if: success()209 run: |209 run: |210 counter=160210 counter=160211 function check_container_status {211 function check_container_status {212 docker inspect -f {{.State.Running}} forkless-data212 docker inspect -f {{.State.Running}} forkless-data213 }213 }214 function do_docker_logs {214 function do_docker_logs {215 docker logs --details forkless-data 2>&1215 docker logs --details forkless-data 2>&1216 }216 }217 function is_started {217 function is_started {218 if [ "$(check_container_status)" == "true" ]; then218 if [ "$(check_container_status)" == "true" ]; then219 echo "Container: forkless-data RUNNING";219 echo "Container: forkless-data RUNNING";220 echo "Check Docker logs"220 echo "Check Docker logs"221 DOCKER_LOGS=$(do_docker_logs)221 DOCKER_LOGS=$(do_docker_logs)222 if [[ ${DOCKER_LOGS} = *"๐ธ PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE ๐ธ"* ]];then222 if [[ ${DOCKER_LOGS} = *"๐ธ PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE ๐ธ"* ]];then223 echo "๐ธ PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE ๐ธ"223 echo "๐ธ PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE ๐ธ"224 return 0224 return 0225 elif [[ ${DOCKER_LOGS} = *"๐ง PARACHAINS' RUNTIME UPGRADE TESTING FAILED ๐ง"* ]];then225 elif [[ ${DOCKER_LOGS} = *"๐ง PARACHAINS' RUNTIME UPGRADE TESTING FAILED ๐ง"* ]];then226 echo "๐ง PARACHAINS' RUNTIME UPGRADE TESTING FAILED ๐ง"226 echo "๐ง PARACHAINS' RUNTIME UPGRADE TESTING FAILED ๐ง"227 return 1227 return 1228 else228 else229 echo "Message not found in logs output, repeating..."229 echo "Message not found in logs output, repeating..."230 return 1230 return 1231 fi231 fi232 else232 else233 echo "Container forkless-data not RUNNING"233 echo "Container forkless-data not RUNNING"234 echo "Halting all future checks"234 echo "Halting all future checks"235 exit 1235 exit 1236 fi236 fi237 exit 0237 exit 0238 }238 }239 while ! is_started; do239 while ! is_started; do240 echo "Waiting for special message in log files "240 echo "Waiting for special message in log files "241 sleep 30s241 sleep 30s242 counter=$(( $counter - 1 ))242 counter=$(( $counter - 1 ))243 echo "Counter: $counter"243 echo "Counter: $counter"244 if [ "$counter" -gt "0" ]; then244 if [ "$counter" -gt "0" ]; then245 continue245 continue246 else246 else247 break247 echo "Counter reached zero, yet upgrade is not finished"248 exit 1248 fi249 fi249 done250 done250 echo "Halting script"251 echo "Halting script"251 exit 0252 exit 0252 shell: bash253 shell: bash253254254 - name: Collect Docker Logs255 - name: Collect Docker Logs