Compress logs before Jenkins can copy them.

Compress the various logs devstack gate collects before Jenkins can copy
them. This reduces the headroom necessary for all of the files on the
logs server by a significant amount. Also, to save even more space on
the logs server stop copying the screen logs as syslog appears to
capture all of this data.

Change-Id: I78f5bfc436c288d52aac2083ba8c24cff4a67648
This commit is contained in:
Clark Boylan
2013-02-04 13:44:58 -08:00
parent 1ec174c898
commit 4351d63b9b

View File

@@ -248,7 +248,6 @@ function cleanup_host {
mkdir -p $WORKSPACE/logs/old/
mkdir -p $WORKSPACE/logs/new/
mkdir -p $WORKSPACE/logs/grenade/
sudo cp $BASE/old/screen-logs/* $WORKSPACE/logs/old/
sudo cp $BASE/old/devstacklog.txt $WORKSPACE/logs/old/
sudo cp $BASE/old/devstack/localrc $WORKSPACE/logs/old/localrc.txt
sudo cp $BASE/logs/* $WORKSPACE/logs/
@@ -257,7 +256,6 @@ function cleanup_host {
else
NEWLOGTARGET=$WORKSPACE/logs
fi
sudo cp $BASE/new/screen-logs/* $NEWLOGTARGET/
sudo cp $BASE/new/devstacklog.txt $NEWLOGTARGET/
sudo cp $BASE/new/devstack/localrc $NEWLOGTARGET/localrc.txt
@@ -276,6 +274,9 @@ function cleanup_host {
# Remove duplicate logs
rm $WORKSPACE/logs/*.*.txt
# Compress all text logs
find $WORKSPACE/logs -iname '*.txt' -execdir gzip -9 {} \+
# Save the tempest nosetests results
sudo cp $BASE/new/tempest/nosetests*.xml $WORKSPACE/
sudo chown jenkins:jenkins $WORKSPACE/nosetests*.xml