[Buildbot-devel] [Need help] with "got_revision" for multi-codebase builds in build steps
Jared Grubb
jared.grubb at gmail.com
Mon Jan 5 13:45:11 UTC 2015
Interpolate works well for simple substitution.
However, for this purpose, you probably would do better doing a custom render function:
from buildbot.process import properties
@properties.renderer
def create_filename(props):
got_revision = props.getProperty(‘got_revision’)
rev = got_revision.get(‘Repo3’, ‘(unknown)’)
# If you need the sourcestamp, you can do something like:
# ss = props.getBuild().getSourceStamp(‘Repo3’)
return rev
Jared
> On Jan 5, 2015, at 04:26, sanjuro at openmailbox.org wrote:
>
> I need to generate build filename string in a buildstep.
>
> Interpolate("%(prop:got_revision)s")
>
> produces just a dictionary:
>
> { 'Repo1': '12345',
> 'Repo2': '54321',
> 'Repo3': '56789' }
>
> But how can I directly use this dictionary to generate such filename?
>
> "Repo1_12345_Repo3_56789"
>
> Note: I also need to exclude 'Repo2' part.
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> 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