Skip to content

Commit

Permalink
ci: fix print logs in int test script
Browse files Browse the repository at this point in the history
  • Loading branch information
efgpinto committed Apr 26, 2023
1 parent bd6c4c1 commit f4c9264
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions integration-test/scripts/rollingupdate-kubernetes-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ do
# Get the list of pods matching the namespace and app name, and are in the Running state
pod_list=$(kubectl get pods -n $NAMESPACE | grep $APP_NAME | grep Running | awk '{ print $1 }')
annotated_count=0
echo "## Pod List:\n$pod_list\n##"

for pod_name in $pod_list
do
Expand All @@ -55,7 +56,7 @@ do
fi
done

if [ $annotated_count -eq $(echo $pod_list | wc -w) ]
if [ ! -z "$pod_list" ] && [ $annotated_count -eq $(echo $pod_list | wc -w) ]
then
echo "All pods were annotated successfully!"
break
Expand All @@ -69,7 +70,7 @@ do

echo "Logs"
echo "=============================="
for POD in $(kubectl get pods -n $NAMESPACE | grep $APP_NAME | grep Running | awk '{ print $1 }')
for POD in $(kubectl get pods -n $NAMESPACE | grep $APP_NAME | awk '{ print $1 }')
do
echo "Logging for $POD"
kubectl logs $POD -n $NAMESPACE
Expand Down

0 comments on commit f4c9264

Please sign in to comment.