X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Finclude-raw-deploy-archives.sh;h=53d2991a54f02308ff1581b09ba1af72cde8722c;hb=ca801d1be6b61432214697060227e01ffbf6924b;hp=3873406ff6ccedca50806228a01f73dae910ab1a;hpb=38c37401e91889f6a7ec4d45df88a6c6e3dbb469;p=releng%2Fbuilder.git diff --git a/jjb/include-raw-deploy-archives.sh b/jjb/include-raw-deploy-archives.sh index 3873406ff..53d2991a5 100644 --- a/jjb/include-raw-deploy-archives.sh +++ b/jjb/include-raw-deploy-archives.sh @@ -2,6 +2,22 @@ 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 +# wget). +echo "verbose=off" > ~/.wgetrc + ARCHIVES_DIR="$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER" [ "$LOGS_SERVER" ] || LOGS_SERVER="https://logs.opendaylight.org" [ "$LOGS_REPO_URL" ] || LOGS_REPO_URL="https://nexus.opendaylight.org/service/local/repositories/logs" @@ -74,7 +90,7 @@ fi mv $WORKSPACE/archives/ $ARCHIVES_DIR > /dev/null 2>&1 touch $ARCHIVES_DIR/_build-details.txt echo "build-url: ${{BUILD_URL}}" >> $ARCHIVES_DIR/_build-details.txt -env > $ARCHIVES_DIR/_build-enviroment-variables.txt +env | grep -v PASSWORD > $ARCHIVES_DIR/_build-enviroment-variables.txt # capture system info touch $ARCHIVES_DIR/_sys-info.txt @@ -90,7 +106,9 @@ touch $ARCHIVES_DIR/_sys-info.txt # Magic string used to trim console logs at the appropriate level during wget echo "-----END_OF_BUILD-----" wget -O $ARCHIVES_DIR/console.log ${{BUILD_URL}}consoleText +wget -O $ARCHIVES_DIR/console-timestamp.log "${{BUILD_URL}}/timestamps?time=HH:mm:ss&appendLog" sed -i '/^-----END_OF_BUILD-----$/,$d' $ARCHIVES_DIR/console.log +sed -i '/^.*-----END_OF_BUILD-----$/,$d' $ARCHIVES_DIR/console-timestamp.log gzip $ARCHIVES_DIR/*.txt $ARCHIVES_DIR/*.log # find and gzip any 'text' files