[users at bb.net] Using Command.extend or interpolate or extract_fn

Pierre Tardy tardyp at gmail.com
Fri Aug 2 18:36:21 UTC 2019


Hi,

I you want to use list based version of ShellCommand, you need to use
one word per string.
Your version probably worked, because of implementation details of the
windows worker.

Then, you need to use util.renderer.

def get_release_function(props):
     return props.getProperty("branch"):

f.addStep(steps.ShellCommand(command=['ccm', 'baseline', '-list',
util.renderer(get_release_function)]))

Not sure where you heard about extract_fn.

Regards
Pierre

Le ven. 2 août 2019 à 00:26, honas grael <honasgraeymael at gmail.com> a écrit :
>
> Hello, I am trying to get to grips with using Buildobt. I am using it with a rather quirky vcs (IBM CM Synergy), which has its own query syntax when you want to checkout code or list baselines.
> To that end I am using ShellCommand. Something like this
>
> f.addStep(steps.ShellCommand(command=['ccm baseline -list local_release_x']))
>
>
> This works and basically lists all the baselines in local_release_x.
>
> Notice that it is a single string.
>
> In the example above local_release_x is a hardcoded string value.
>
> I would like to make it dynamic i.e create a local_release_x property.
>
>
> I think a custom function get_release_function() is what I am looking to implement, where the function returns a variable ('local_release_x')
>
>  that can be plugged into the shell command.
>
>
> f.addStep(steps.ShellCommand(command=['ccm baseline -list extract_fn=get_release_function']))
>
>
> Can anyone suggest how I can do this?
>
> I don't seem to understand how/if I can use command.extend or if I should/could be using interpolate/extract_fn
>
>
> Please advise.
>
>
> Regards
>
> _______________________________________________
> users mailing list
> users at buildbot.net
> https://lists.buildbot.net/mailman/listinfo/users


More information about the users mailing list