Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve logging for CI failure in K8s RU Integration test #1141

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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