[Buildbot-devel] triggering ForceScheduler build via email?

Stephen Davis buildbot at soundgeek.org
Fri Mar 21 06:07:02 UTC 2014


Close but not quite.

I added the scheduler like so:

def IsJingleChange( change ):
	""" Determine if a change is a forced Jingle Upload build."""
	isImportant = False
	props = change.properties

	print "jingle change: ", change.comments, props		<-- never shows up in the master's log

	if props is not None:
		if props['is_jingle_upload'] is not None:
			isImportant = True

	return isImportant

# email-triggered jingle upload build
schedulers.append( SingleBranchScheduler( name="jingle_upload", branch=None, treeStableTimer=0,
					builderNames=[MacJingleUploadBuilderName, WinJingleUploadBuilderName],
					fileIsImportant=IsJingleChange ) )

I created the change like so (shortened):

	... parse email ...

	props = { 'is_jingle_upload' : True, 'is_trunk' : is_trunk }

	return ( 'svn', dict( author=name, comments="Jingle Upload", branch=tag, properties=props ) )

In the master log, one of these custom changes creates a log entry like:

2014-03-20 22:53:02-0700 [-] added change Change(revision=None, who=u'Stephen Davis', branch=u'tags/JingleTest1', comments=u'Jingle Upload', when=1395381182, category=None, project=u'', repository=u'', codebase=u'') to database

but nothing happens.  A regular change looks like this:

2014-03-20 18:44:49-0700 [-] added change Change(revision=u'168033', who=u'stephend', branch=None, comments=u"Add doxygen class block for ITView.  Hopefully this will help Xcode's code documentation parser which seems to be missing some stuff.\n", when=1395366289, category=None, project=u'', repository=u'', codebase=u'') to database
2014-03-20 18:44:49-0700 [-] added buildset 932 to database		<-- this missing seems to be the reason no build happens

The "IsJingleChange" validator never gets called.  Is there any way to turn on some debug logging in the master to figure out why it ate the Change?  Do Changes require a "revision" property?

thanks again,
stephen

On Mar 20, 2014, at 7:36 PM, Stephen Davis <buildbot at soundgeek.org> wrote:

> Ah, I think I can create one of those schedulers and then use a custom (misnamed :-) "fileIsImportant" handler to decide if the constructed Change is for that build and ignore the regular source file changes.
> 
> I'll give that a whirl.
> 
> thanks,
> stephen
> 
> On Mar 20, 2014, at 7:21 PM, Dustin J. Mitchell <dustin at v.igoro.us> wrote:
> 
>> Well, ForceSchedulers don't pay attention to Changes, but regular
>> SingleBranchSchedulers and MultiBranchSchedulers do.  So if you have
>> an incoming mail that generates a change, you'll just need to add one
>> of those to your configuration, with builderNames set to match that of
>> the force scheduler.
>> 
>> Dustin
>> 
>> On Wed, Mar 19, 2014 at 2:45 PM, Stephen Davis <buildbot at soundgeek.org> wrote:
>>> I have a particular build that is normally triggered by a person via the web page controller by a ForceScheduler instance.  My ChangeSource is a custom MaildirSource.  I'd like to automate but it's not a source-change-triggered event.  Is it possible to trigger the ForceScheduler's build via a Change dict vended by my MaildirSource?  I've been looking at the various Change object parameters (files, revlink, author, revision, etc.) but I don't see anything that would let me explicitly trigger the scheduler that I want.
>>> 
>>> thanks,
>>> stephen
>>> 
>>> ------------------------------------------------------------------------------
>>> Learn Graph Databases - Download FREE O'Reilly Book
>>> "Graph Databases" is the definitive new guide to graph databases and their
>>> applications. Written by three acclaimed leaders in the field,
>>> this first edition is now available. Download your free book today!
>>> http://p.sf.net/sfu/13534_NeoTech
>>> _______________________________________________
>>> Buildbot-devel mailing list
>>> Buildbot-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
> 
> 
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> 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