[Buildbot-devel] Getting changes and git commit comments in properties
Jared Grubb
jared.grubb at gmail.com
Thu Jul 10 06:58:25 UTC 2014
This information is not available as a property.
However, if you have access to the build object, then it will be part of the ‘changes’. For example:
changes = build.getChanges()
if changes:
for change in changes:
cd = change.asDict()
# cd['who']
# cd['comments']
# cd['files’]
To get this ‘build’ object, I think you would need to subclass ShellCommand (in your case here) to build the command. I think there was a recent change making it easier to do stuff with shell commands, but I havent really done much with that yet.
Sorry this is only half-helpful .. but I figured I’d put this out there to get you started.
Jared
> On Jul 9, 2014, at 17:47, Vahid Kowsari <vahid at kowsari.com> wrote:
>
> I have setup a buildbot configuration where I poll a git repo for changes and start a make after a change.
> I would like to get the git commit comments and or who committed the change as Buildbot properties, but I have been unable to find any documentation regarding how to do this.
>
> I currently have a step similar to this which works, but I cannot find what what properties I should use to get the commit comments and the person who changed it.
>
> factory.addStep(ShellCommand(command=[ "curl", "--data", WithProperties("Buildbot Automated Build:\nbuildername:%s\nrepository: %s\nrevision: %s\nbuildnumber %s", "buildername", "repository", "got_revision", "buildnumber"), SLACK_URL]))
>
> This is available in the Buildbot Web UI, but somehow is not available as properties. Any help is much appreciated.
>
> Thanks
>
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> 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