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

Fixup debug line to target regular files and print file name #762

Merged
merged 1 commit into from
Jun 20, 2019
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
25 changes: 23 additions & 2 deletions travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,29 @@ if [ $e2eCode -ne 0 ]; then
./sonobuoy status
./sonobuoy logs
mkdir results; tar xzf $outFile -C results
find results
find results/plugins -exec cat {} \;

echo "Full contents of tarball:"
find results

echo "Printing data on the following files:"
find results/plugins -type f
find results/plugins -type f \
-exec echo Printing file info and contents of {} \; \
-exec ls -lah {} \; \
-exec cat {} \; \
-exec echo \; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you could echo \n directly here using echo -e "\n\n"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seemed like 6 on one hand, half a dozen on the other.

I wasn't sure if the -e flag was as cross-platform supported. If you know one way or the other I'd be curious.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I don't know :( In that case, probably just best to leave it as is.

-exec echo \;
echo "[Exit code of find was: $?]"

echo "Printing data on the following files:"
find results/podlogs -type f
find results/podlogs -type f \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I also added the podlogs since those can be vital for debugging.

-exec echo Printing file info and contents of {} \; \
-exec ls -lah {} \; \
-exec cat {} \; \
-exec echo \; \
-exec echo \;
echo "[Exit code of find was: $?]"
exit $e2eCode
fi

Expand Down