git.delta.rocks / unique-network / refs/commits / cd63f09a6eb6

difftreelog

test pattern change

Alexander Aksenov2022-08-23parent: #e99a7d7.patch.diff
in: master

1 file changed

modified.github/workflows/nodes-only-update.ymldiffbeforeafterboth
1name: 1name: nodes-only update
22
3# Controls when the action will run.3# Controls when the action will run.
4on:4on:
181 # 🌗 All parachain collators restarted with the new binaries.181 # 🌗 All parachain collators restarted with the new binaries.
182 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.182 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.
183 if: success()183 if: success()
184 run: |184 run: |
185 counter=160185 counter=160
186 function check_container_status {186 function check_container_status {
187 docker inspect -f {{.State.Running}} node-parachain187 docker inspect -f {{.State.Running}} node-parachain
188 }188 }
189 function do_docker_logs {189 function do_docker_logs {
190 docker logs --details node-parachain 2>&1190 docker logs --details node-parachain 2>&1
191 }191 }
192 function is_started {192 function is_started {
193 if [ "$(check_container_status)" == "true" ]; then193 if [ "$(check_container_status)" == "true" ]; then
194 echo "Container: node-parachain RUNNING";194 echo "Container: node-parachain RUNNING";
195 echo "Check Docker logs"195 echo "Check Docker logs"
196 DOCKER_LOGS=$(do_docker_logs)196 DOCKER_LOGS=$(do_docker_logs)
197 if [[ ${DOCKER_LOGS} = *"🌗 All parachain collators restarted with the new binaries."* ]];then197 if [[ ${DOCKER_LOGS} = *"All parachain collators restarted with the new binaries."* ]];then
198 echo "🌗 All parachain collators restarted with the new binaries."198 echo "🌗 All parachain collators restarted with the new binaries."
199 return 0199 return 0
200 else200 else
201 echo "Message not found in logs output, repeating..."201 echo "Message not found in logs output, repeating..."
202 return 1202 return 1
203 fi203 fi
204 else204 else
205 echo "Container node-parachain NOT RUNNING"205 echo "Container node-parachain NOT RUNNING"
206 echo "Halting all future checks"206 echo "Halting all future checks"
207 exit 1207 exit 1
208 fi208 fi
209 echo "something goes wrong"209 echo "something goes wrong"
210 exit 1210 exit 1
211 }211 }
212 while ! is_started; do212 while ! is_started; do
213 echo "Waiting for special message in log files "213 echo "Waiting for special message in log files "
214 sleep 30s214 sleep 30s
215 counter=$(( $counter - 1 ))215 counter=$(( $counter - 1 ))
216 echo "Counter: $counter"216 echo "Counter: $counter"
217 if [ "$counter" -gt "0" ]; then217 if [ "$counter" -gt "0" ]; then
218 continue218 continue
219 else219 else
220 break220 break
221 fi221 fi
222 done222 done
223 echo "Halting script"223 echo "Halting script"
224 exit 0224 exit 0
225 shell: bash225 shell: bash
226226
227 - name: Run tests after Node Parachain upgrade227 - name: Run tests after Node Parachain upgrade