git-status report can be useful at the end of a build to identify
projects that left their project repo either with modified files or
untracked files.
Change-Id: I3f9f9c01991699574e1a9ca81885728117144b26
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
#!/bin/bash
set +e # Do not affect the build result if some part of archiving fails.
+
+# Print out git status at the end of the build before we archive if $WORKSPACE
+# is a git repo.
+if [ -d $WORKSPACE/.git ]; then
+ echo ""
+ echo "----------> Git Status Report"
+ git status
+fi
+
+echo ""
+echo "----------> Archiving build to logs server"
# Configure wget to not print download status when we download logs or when
# Jenkins is installing Maven (To be clear this is the Jenkins Maven plugin
# using a shell script itself that we are unable to modify directly to affect