difftreelog
Added docker container state verification
in: master
1 file changed
.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth64 strategy:64 strategy:65 matrix:65 matrix:66 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}66 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}67# include:68# - network: "Opal"69# features: "opal-runtime"70# runtime: "opal"71# mainnet_branch: v92401072# mainnet_tag: v92401073# - network: "Quartz" # KUSAMA_MAINNET_BRANCH для quartz-runtime74# features: "quartz-runtime"75# runtime: "quartz"76# mainnet_branch: quartz-v924012-277# mainnet_tag: v92401278# - network: "Unique" # POLKADOT_MAINNET_BRANCH для unique-runtime79# features: "unique-runtime"80# runtime: "unique"81# mainnet_branch: v92401082# mainnet_tag: v9240108384678568150133151 - name: Check if docker logs consist logs related to Runtime Upgrade testing.134 - name: Check if docker logs consist logs related to Runtime Upgrade testing.152 if: success()135 if: success()153 run: |136 run: |154 counter=160137 counter=180155 function do_docker_logs {138 function check_container_status {139 docker inspect -f {{.State.Running}} node-parachain140 }141 function do_docker_logs {156 docker logs --details node-parachain 2>&1142 docker logs --details node-parachain 2>&1157 }143 }158 function is_started {144 function is_started {159 echo "Check Docker logs"145 if [ "$(check_container_status)" == "true" ]; then146 echo "Container: node-parachain RUNNING";147 echo "Check Docker logs"160 DOCKER_LOGS=$(do_docker_logs)148 DOCKER_LOGS=$(do_docker_logs)161 if [[ ${DOCKER_LOGS} = *"🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"* ]];then149 if [[ ${DOCKER_LOGS} = *"🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"* ]];then162 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"150 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"163 return 0151 exit 0164 exit 0152 fi165 fi153 else166 echo "Function is_started: Return 1"154 echo "Container node-parachain not RUNNING";167 return 1155 exit 1168 }156 fi157 }158169 while ! is_started; do159 while ! is_started; do170 echo "Waiting for special message in log files "160 echo "Waiting for special message in log files "171 sleep 30s161 sleep 30s172 counter=$(( $counter - 1 ))162 counter=$(( $counter - 1 ))173 echo "Counter: $counter"163 echo "Counter: $counter"174 if [ "$counter" -gt "0" ]; then164 if [ "$counter" -gt "0" ]; then175 continue165 continue176 else166 else177 break167 break178 fi168 fi179 done169 done180 exit 1170 exit 1181 shell: bash171 shell: bash182172183 - name: Collect Docker Logs173 - name: Collect Docker Logs198 name: forkless-parachain-update-nodata-logs.${{ matrix.features }}.tgz188 name: forkless-parachain-update-nodata-logs.${{ matrix.features }}.tgz199 path: ./forkless-parachain-update-nodata-logs.${{ matrix.features }}.tgz189 path: ./forkless-parachain-update-nodata-logs.${{ matrix.features }}.tgz200190201# - name: Stop running containers191 - name: Stop running containers202# if: always() # run this step always192 if: always() # run this step always203# run: docker-compose -f ".docker/docker-compose-forkless.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down193 run: docker-compose -f ".docker/docker-compose-forkless.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down204194