File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 7
7
pull_request :
8
8
paths :
9
9
- ' .github/workflows/sdk-execution.yml'
10
+ - ' scripts/deploy/github/**'
10
11
- ' sdk/python/**'
11
12
- ' api/v2alpha1/**'
12
13
Original file line number Diff line number Diff line change @@ -74,20 +74,14 @@ wait_for_pods () {
74
74
local statuses
75
75
local num_pods
76
76
local num_running
77
- pods=$( kubectl get pod -n " $namespace " )
78
- # echo "$pods"
79
- # kubectl get pvc -n "$namespace"
77
+ pods=$( kubectl get pod -n " $namespace " --no-headers 2> /dev/null)
80
78
81
- if [[ -z $pods ]]
82
- then
83
- echo " no pod is up yet"
79
+ if [[ -z $pods ]]; then
80
+ echo " No pods found or error retrieving pods."
84
81
else
85
- # Using quotations around variables to keep column format in echo
86
- # Remove 1st line (header line) -> trim whitespace -> cut statuses column (3rd column)
87
- # Might be overkill to parse down to specific columns :).
88
- statuses=$( echo " $pods " | tail -n +2 | tr -s ' ' | cut -d ' ' -f 3)
82
+ statuses=$( echo " $pods " | awk ' {print $3}' )
89
83
num_pods=$( echo " $statuses " | wc -l | xargs)
90
- num_running=$( echo " $statuses " | grep -ow " Running\ |Completed" | wc -l | xargs )
84
+ num_running=$( echo " $statuses " | grep -cE ' Running|Completed' )
91
85
92
86
local msg=" ${num_running} /${num_pods} pods running in \" ${namespace} \" ."
93
87
You can’t perform that action at this time.
0 commit comments