[Buildbot-devel] 'interlock' on bot?

Stephen Davis sdavis at stanfordalumni.org
Thu Dec 11 18:05:29 UTC 2003


On Dec 11, 2003, at 4:13 AM, Jeroen Janssen wrote:

> Is it possible to somehow specify that a bot can only perform one 
> build/test at a time?
>
> At the moment it is possible to trigger multiple build/test on the 
> same bot using the webinterface.
> However, only one 'instance' of the software can run at the same time, 
> I would like to postpone a next build one the same bot until the 
> previous one is done.
>
> Any idea how I can do this? (the current interlock seems written for 
> usage with a Source / ChangeSet?)

The interlock can definitely be used for this purpose.  Using the 0.4.1 
release syntax for master.cfg you would do this:

BuildmasterConfig['builders'] = []

f1 = QuickBuildFactory(repository, cvsmodule,
                        #configure="./configure --disable-shared",
                        #configureEnv={'CFLAGS': '-O0'},
                        configure=None
                        )
BuildmasterConfig['builders'].append(("glib-quick", "bot1", 
"glib-quick", f1))

f2 = BasicBuildFactory(repository, cvsmodule,
                        configure="./configure --disable-shared",
                        configureEnv={'CFLAGS': '-O0'},
                        cvsCopy=1)
BuildmasterConfig['builders'].append(("glib-full", "bot1", "glib-full", 
f2))

#  interlocks: a list of (name, [feeders], [watchers]) tuples:
#     name: the name of the interlock, must be unique
#     feeders: the names of the Builders which feed this interlock
#     watchers: the names of the Builders which watch this interlock

BuildmasterConfig['builders']
BuildmasterConfig['interlocks'] = [ ("glib-lock", ["glib-quick"], 
["glib-full"]) ]

"glib-full" will build after "glib-quick".  Since the  the "glib-quick" 
and "glib-full" builds are assigned to the same build bot, that bot 
will only run one of them at a time.  In addition, "glib-full" will 
only build if "glib-quick" completes successfully so they are really 
dependencies.

stephen





More information about the devel mailing list