difftreelog
fix forkless-update-data zombienet
in: master
1 file changed
.github/workflows/forkless-update-data.ymldiffbeforeafterboth196196197 - name: Check if docker logs consist logs related to Runtime Upgrade testing.197 - name: Check if docker logs consist logs related to Runtime Upgrade testing.198 if: success()198 if: success()199 run: |199 run: |200 counter=160200 counter=160201 function check_container_status {201 function check_container_status {202 docker inspect -f {{.State.Running}} forkless-data202 docker inspect -f {{.State.Running}} forkless-data-${{ matrix.network }}203 }203 }204 function do_docker_logs {204 function do_docker_logs {205 docker logs --details forkless-data 2>&1205 docker logs --details forkless-data-${{ matrix.network }} 2>&1206 }206 }207 function is_started {207 function is_started {208 if [ "$(check_container_status)" == "true" ]; then208 if [ "$(check_container_status)" == "true" ]; then209 echo "Container: forkless-data RUNNING";209 echo "Container: forkless-data-${{ matrix.network }} RUNNING";210 echo "Check Docker logs"210 echo "Check Docker logs"211 DOCKER_LOGS=$(do_docker_logs)211 DOCKER_LOGS=$(do_docker_logs)212 if [[ ${DOCKER_LOGS} = *"๐ธ PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE ๐ธ"* ]];then212 if [[ ${DOCKER_LOGS} = *"๐ธ PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE ๐ธ"* ]];then213 echo "๐ธ PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE ๐ธ"213 echo "๐ธ PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE ๐ธ"214 return 0214 return 0215 elif [[ ${DOCKER_LOGS} = *"๐ง PARACHAINS' RUNTIME UPGRADE TESTING FAILED ๐ง"* ]];then215 elif [[ ${DOCKER_LOGS} = *"๐ง PARACHAINS' RUNTIME UPGRADE TESTING FAILED ๐ง"* ]];then216 echo "๐ง PARACHAINS' RUNTIME UPGRADE TESTING FAILED ๐ง"216 echo "๐ง PARACHAINS' RUNTIME UPGRADE TESTING FAILED ๐ง"217 return 1217 return 1218 else218 else219 echo "Message not found in logs output, repeating..."219 echo "Message not found in logs output, repeating..."220 return 1220 return 1221 fi221 fi222 else222 else223 echo "Container forkless-data not RUNNING"223 echo "Container forkless-data-${{ matrix.network }} not RUNNING"224 echo "Halting all future checks"224 echo "Halting all future checks"225 exit 1225 exit 1226 fi226 fi227 exit 0227 exit 0228 }228 }229 while ! is_started; do229 while ! is_started; do230 echo "Waiting for special message in log files "230 echo "Waiting for special message in log files "231 sleep 30s231 sleep 30s232 counter=$(( $counter - 1 ))232 counter=$(( $counter - 1 ))233 echo "Counter: $counter"233 echo "Counter: $counter"234 if [ "$counter" -gt "0" ]; then234 if [ "$counter" -gt "0" ]; then235 continue235 continue236 else236 else237 echo "Counter reached zero, yet upgrade is not finished"237 echo "Counter reached zero, yet upgrade is not finished"238 exit 1238 exit 1239 fi239 fi240 done240 done241 echo "Halting script"241 echo "Halting script"242 exit 0242 exit 0243 shell: bash243 shell: bash244244245 - name: Collect Docker Logs245 - name: Collect Docker Logs250250251 - name: Show Docker logs251 - name: Show Docker logs252 if: success() || failure()252 if: success() || failure()253 run: cat './forkless-parachain-upgrade-data-logs.${{ matrix.network }}/forkless-data.log'253 run: cat './forkless-parachain-upgrade-data-logs.${{ matrix.network }}/forkless-data-${{ matrix.network }}.log'254254255 - name: Stop running containers255 - name: Stop running containers256 if: always() # run this step always256 if: always() # run this step always