[Buildbot-devel] example of ShellCommands
Timothee Besset
ttimo at idsoftware.com
Sun Jan 11 15:40:33 UTC 2004
Brian Warner wrote:
>ShellCommands takes an argument 'commands', which is a list. Each element of
>the list is either a simple string, or a small dictionary. The dictionary
>form lets you specify a separate working directory for each command, and
>whether the command is "critical": i.e. if that command fails, should the
>entire Step be abandoned?
>
>So to do a single command in a ShellCommands (the degenerate case), you'd do:
>
>f1 = ConfigurableBuildFactory(
> [
> ( ShellCommands, { 'commands' : ['echo foo'] } )
> ] )
>
>To do multiple commands:
>
>f1 = ConfigurableBuildFactory(
> [
> ( ShellCommands, { 'commands' : ['echo foo', 'echo bar'] } )
> ] )
>
>
>ShellCommands is intended for use in places where the multiple shell commands
>are logically all part of the same Step, like a "CVS Checkout" step that is
>really a 'rm -rf tree; cvs checkout tree'. Doing it as a
>ShellCommands(["foo", "bar"]) instead of a ShellCommand("foo; bar") felt a
>little bit cleaner (shell syntax is yucky).
>
>The docstring for ShellCommands has slightly more information.
>
>
>
Ah, it makes more sense now thanks .. I had found the few lines of
documentation in the source, but it didn't make much sense .. how can I
generate the docs in html format from the source tarball btw? Would
probably make things a lot easier (as the website doesn't appear to have
them either)
Also another thing .. (more of a feature request likely). Let's say I
have a custom step similar to an SVN/CVS checkout, but I may need to get
a login/pass to perform the operation. I guess I could store the
login/pass in the .cfg but I don't feel comfortable with it. If that was
possible, I'd rather have the user give it through the web interface
when forcing a build manually (and an automated build triggered by a
source would just fail and wait for someone to re-establish connection
with the source control server). Suggestions ?
TTimo
More information about the devel
mailing list