From 9d8d735c9903bb05377fb50c4deaac3af547877a Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Wed, 8 Feb 2017 15:29:43 -0500 Subject: [PATCH] Create a git status report at the end of build 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 --- include-raw-deploy-archives.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include-raw-deploy-archives.sh b/include-raw-deploy-archives.sh index 86e077eb..53d2991a 100644 --- a/include-raw-deploy-archives.sh +++ b/include-raw-deploy-archives.sh @@ -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 -- 2.16.6