Don't attach logs for successful builds and archive the logs for the rest

This is for issue #52