Create a git status report at the end of build 71/4071/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 8 Feb 2017 20:29:43 +0000 (15:29 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 4 Mar 2017 19:24:29 +0000 (14:24 -0500)
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>
include-raw-deploy-archives.sh

index 86e077e..53d2991 100644 (file)
@@ -1,6 +1,17 @@
 #!/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