git.delta.rocks / unique-network / refs/commits / 058c02236f9d

difftreelog

Merge branch 'ci/locks-to-freezes' of github.com:UniqueNetwork/unique-chain into ci/locks-to-freezes

Max Andreev2023-06-12parents: #9773e5a #fc3f880.patch.diff
in: master

1 file changed

modified.github/workflows/forkless-update-data.ymldiffbeforeafterboth
196196
197 - 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=160
201 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>&1
206 }206 }
207 function is_started {207 function is_started {
208 if [ "$(check_container_status)" == "true" ]; then208 if [ "$(check_container_status)" == "true" ]; then
209 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 🛸"* ]];then
213 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"213 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"
214 return 0214 return 0
215 elif [[ ${DOCKER_LOGS} = *"🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"* ]];then215 elif [[ ${DOCKER_LOGS} = *"🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"* ]];then
216 echo "🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"216 echo "🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"
217 return 1217 return 1
218 else218 else
219 echo "Message not found in logs output, repeating..."219 echo "Message not found in logs output, repeating..."
220 return 1220 return 1
221 fi221 fi
222 else222 else
223 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 1
226 fi226 fi
227 exit 0227 exit 0
228 }228 }
229 while ! is_started; do229 while ! is_started; do
230 echo "Waiting for special message in log files "230 echo "Waiting for special message in log files "
231 sleep 30s231 sleep 30s
232 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" ]; then
235 continue235 continue
236 else236 else
237 echo "Counter reached zero, yet upgrade is not finished"237 echo "Counter reached zero, yet upgrade is not finished"
238 exit 1238 exit 1
239 fi239 fi
240 done240 done
241 echo "Halting script"241 echo "Halting script"
242 exit 0242 exit 0
243 shell: bash243 shell: bash
244244
245 - name: Collect Docker Logs245 - name: Collect Docker Logs
250250
251 - name: Show Docker logs251 - name: Show Docker logs
252 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'
254254
255 - name: Stop running containers255 - name: Stop running containers
256 if: always() # run this step always256 if: always() # run this step always