[Buildbot-devel] How to integrate multiple commands into one BuildStep?

Ben Hearsum bhearsum at wittydomain.com
Fri Dec 7 01:44:23 UTC 2007


That's a really cool tip!

Aaron_Hsieh at PlayStation.Sony.Com wrote:
> 
> I actually had this exact same problem a couple months ago.  I actually 
> got the answer to this on this forum, as a matter of fact.  If you use 
> Python's triple quoting mechanism, you can actually fit multiple 
> commands into one buildstep if you'd rather not use an external script. 
>  So, instead of :
> 
> full_factory.addStep(step.ShellCommand, **basic_args(
> command="for i in dist/*; do mv $i /var/www/packages; done && rake
> clean && rm -rf /var/www/packages/foobar-current.tgz && cd
> /var/www/packages && ln -s *.tar.gz foobar-current.tgz",
> description="Publishing packages",
> descriptionDone="Published packages"))
> 
> 
> You could have:
> 
> full_factory.addStep(step.ShellCommand, **basic_args(
> command="""for i in dist/*; do mv $i /var/www/packages; done
> rake clean
> rm -rf /var/www/packages/foobar-current.tgz
> cd /var/www/packages
> ln -s *.tar.gz foobar-current.tgz""",
> description="Publishing packages",
> descriptionDone="Published packages"))
> 
> 
> The reason why you might want to put everything into a single buildstep 
> is that you preserve the same shell for every command that you run and 
> you do not have to keep up with random external scripts all over the 
> place in case you would want to mirror this system on a different box.
> 
> Aaron Hsieh
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel




More information about the devel mailing list