[Buildbot-devel] Get build info in mail
Bhavik
bhavikdbavishi at gmail.com
Fri Jul 29 20:45:55 UTC 2011
Amber Yust <ayust at ...> writes:
>
>
> Have you tried build.getProperty() ?
>
> ~AmberOn Fri, Jul 29, 2011 at 12:46 PM, Bhavik <bhavikdbavishi <at> gmail.com>
wrote:Hi,
> I am trying to get build information like workdir, starttime,
> endtime and property
> values which are passed using "Force Build" on webpage.
> I am able print using build.__dict__ but when try to access from it,
> throws an
> exception ...
> =======================================================================
> exec f in localDict exceptions.SyntaxError: invalid syntax (master.cfg
> =======================================================================
> I am using mail format function which is ..
> =======================================================================
> def html_message_formatter(mode, name, build, results, master_status):
> ....
> =======================================================================
> I tried to get value using WithProperties("%s", "build_version") ...
> but it returns object like ..
> =======================================================================
> <buildbot.process.properties.WithProperties instance at 0x1385760>
> =======================================================================
> Could you please guide me to retrieve those information ?
> thanks in advance.
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on
ThinkGeek.http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Buildbot-devel mailing listBuildbot-devel <at>
lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
>
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at ...
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
Hi,
Thanks for reply, it just worked ...
I am able to get below information using build.getProperty().
But how to get values of 'started' and 'finished' ???
=======================================================================
...
'properties': Properties(**{u'build_seversion': u'TEST1',
'workdir': '/root/slave/api', 'repository': '',
'buildername': 'Test Build', 'project': '', 'slavename': 'slavehost',
'branch': None, 'buildnumber': 52, 'revision': None})
...
=======================================================================
=======================================================================
{'watchers': [],
'source': <buildbot.sourcestamp.SourceStamp instance at 0x148f0f8>,
'started': 1311971709.917141, 'text': ['build', 'successful'],
'builder': <buildbot.status.builder.BuilderStatus instance at 0x13405a8>,
'results': 0, 'finishedWatchers': [], 'currentStep': None,
'number': 52, 'slavename': 'slavehost', 'reason': u"The web-page 'force build'
button was pressed by '': \n",
'steps': [<buildbot.status.builder.BuildStepStatus instance at 0x431e18>],
'updates': {},
'progress': <buildbot.status.progress.BuildProgress instance at 0x148f3c8>,
'blamelist': [], 'finished': 1311971710.023854, 'changes': (),
'properties': Properties(**{u'build_version': u'TEST1',
'workdir': '/root/slave/api', 'repository': '',
'buildername': 'Test Build', 'project': '', 'slavename': 'slavehost',
'branch': None, 'buildnumber': 52, 'revision': None}),
'testResults': {}
}
=======================================================================
More information about the devel
mailing list