git.delta.rocks / unique-network / refs/commits / 98307afa9ae6

difftreelog

ci fail on forkless-with-data failure

Yaroslav Bolyukin2023-06-05parent: #ca48a24.patch.diff
in: master

1 file changed

modified.github/workflows/forkless-update-data.ymldiffbeforeafterboth
206206
207 - 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=160
211 function check_container_status {211 function check_container_status {
212 docker inspect -f {{.State.Running}} forkless-data212 docker inspect -f {{.State.Running}} forkless-data
213 }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>&1
216 }216 }
217 function is_started {217 function is_started {
218 if [ "$(check_container_status)" == "true" ]; then218 if [ "$(check_container_status)" == "true" ]; then
219 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 🛸"* ]];then
223 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"223 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"
224 return 0224 return 0
225 elif [[ ${DOCKER_LOGS} = *"🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"* ]];then225 elif [[ ${DOCKER_LOGS} = *"🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"* ]];then
226 echo "🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"226 echo "🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"
227 return 1227 return 1
228 else228 else
229 echo "Message not found in logs output, repeating..."229 echo "Message not found in logs output, repeating..."
230 return 1230 return 1
231 fi231 fi
232 else232 else
233 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 1
236 fi236 fi
237 exit 0237 exit 0
238 }238 }
239 while ! is_started; do239 while ! is_started; do
240 echo "Waiting for special message in log files "240 echo "Waiting for special message in log files "
241 sleep 30s241 sleep 30s
242 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" ]; then
245 continue245 continue
246 else246 else
247 break247 echo "Counter reached zero, yet upgrade is not finished"
248 exit 1
248 fi249 fi
249 done250 done
250 echo "Halting script"251 echo "Halting script"
251 exit 0252 exit 0
252 shell: bash253 shell: bash
253254
254 - name: Collect Docker Logs255 - name: Collect Docker Logs