Piping to stdout when using BuildBot

Just a quick tidbit for anyone googling like I have been all morning:

If you're attempting to pipe a command in a buildbot script, you need to issue it as a single string, not a list of strings. By using a single string, buildbot uses a shell, otherwise it doesn't. The > necessary for output redirection is a shell thing, which will only work in this method.

To recap:

f1.addStep(ShellCommand(command=['/home/www/bin/django', 'build_solr_schema', '>', '/etc/solr/conf/schema.xml'],
                    description=['building', 'schema'], descriptionDone=['schema','built']))

becomes:

f1.addStep(ShellCommand(command="/home/www/bin/django build_solr_schema > /etc/solr/conf/schema.xml",
                    description=['building', 'schema'], descriptionDone=['schema','built']))
© 2012 - 2023 · Home — Theme Simpleness