git.delta.rocks / unique-network / refs/commits / 0d647850112d

difftreelog

Added else condition

Alexander Aksenov2022-08-14parent: #b760e7a.patch.diff
in: master

1 file changed

modified.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth
133133
134 - 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.
135 if: success()135 if: success()
136 run: |136 run: |
137 counter=160137 counter=160
138 function check_container_status {138 function check_container_status {
139 docker inspect -f {{.State.Running}} node-parachain139 docker inspect -f {{.State.Running}} node-parachain
140 }140 }
141 function do_docker_logs {141 function do_docker_logs {
142 docker logs --details node-parachain 2>&1142 docker logs --details node-parachain 2>&1
143 }143 }
144 function is_started {144 function is_started {
145 if [ "$(check_container_status)" == "true" ]; then145 if [ "$(check_container_status)" == "true" ]; then
146 echo "Container: node-parachain RUNNING";146 echo "Container: node-parachain RUNNING";
147 echo "Check Docker logs"147 echo "Check Docker logs"
148 DOCKER_LOGS=$(do_docker_logs)148 DOCKER_LOGS=$(do_docker_logs)
149 if [[ ${DOCKER_LOGS} = *"🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"* ]];then149 if [[ ${DOCKER_LOGS} = *"🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"* ]];then
150 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"150 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"
151 return 0151 return 0
152 exit 1152 exit 1
153 fi153 else
154 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE � - Not found in logs output."
155 return 1
156 exit 1
157 fi
154 else158 else
155 echo "Container node-parachain not RUNNING"159 echo "Container node-parachain not RUNNING"
156 echo "Halting all future checks"160 echo "Halting all future checks"
157 exit 1161 exit 1
158 fi162 fi
159 exit 0163 exit 0
160 }164 }
161 while ! is_started; do165 while ! is_started; do
162 echo "Waiting for special message in log files "166 echo "Waiting for special message in log files "
163 sleep 30s167 sleep 30s
164 counter=$(( $counter - 1 ))168 counter=$(( $counter - 1 ))
165 echo "Counter: $counter"169 echo "Counter: $counter"
166 if [ "$counter" -gt "0" ]; then170 if [ "$counter" -gt "0" ]; then
167 continue171 continue
168 else172 else
169 break173 break
170 fi174 fi
171 done175 done
172 echo "Halting script"176 echo "Halting script"
173 exit 1177 exit 1
174 shell: bash178 shell: bash
175179
176 - name: Collect Docker Logs180 - name: Collect Docker Logs