Alex | 18fc381 | 2021-03-22 09:41:37 -0500 | [diff] [blame^] | 1 | #!/bin/bash |
2 | function get_name() { | ||||
3 | while [[ $pod_name = "none" ]]; do | ||||
4 | name=$(kubectl get pods -n openstack --no-headers -o custom-columns=":metadata.name" | grep openstack-tempest-run-tests || echo none) | ||||
5 | if [[ ${name} != "none" ]]; then | ||||
6 | echo $name | ||||
7 | break | ||||
8 | else | ||||
9 | echo "# Pod not found, waiting" | ||||
10 | sleep 5 | ||||
11 | fi | ||||
12 | done | ||||
13 | } | ||||
14 | |||||
15 | pod_name="none" | ||||
16 | pod_name=$(get_name) | ||||
17 | watch -n 1 "kubectl logs ${pod_name} -c tempest-run-tests -n openstack | tail -40" |