Split out puppet logs

To improve troubleshooting and readability, let's not have the puppet
logs print to the console.  This change updates the puppet apply to
output the logs to puppet.log which will still be captured and provided
in the CI results.  When the puppet apply fails, we will grep for
warnings and errors from the puppet log and only print those out which
should simplify troubleshooting failures.

Change-Id: I1084223f805f1960aebb9c5868fdef84ff3667e4
This commit is contained in:
Alex Schultz
2016-10-31 15:15:34 -06:00
parent 5bec5495b2
commit e4c6f48efa
3 changed files with 16 additions and 1 deletions

View File

@@ -203,3 +203,11 @@ function catch_selinux_alerts() {
fi
fi
}
function timestamp_puppet_log() {
mv ${WORKSPACE}/puppet.log ${WORKSPACE}/puppet-$(date +%Y%m%d_%H%M%S).log
}
function catch_puppet_failures() {
grep -iE '(warning|error)' ${WORKSPACE}/puppet.log
}