phase = 1
name = example-worker-2
password = example2
+# for workers which share a common pipe, ul/dl resource-access locks can be defined.
+# if the identifier is the same for both ul/dl, then all ul/dl operations will be serialized between workers having the same id.
+# if the identifier differs for ul and dl, then dl operations will be serialized independently of ul operations.
+ul_lock = host1
+dl_lock = host1
+# tag_only workers will only build forced tag buildrequests (i.e. release builds)
+tag_only = yes
name = section.get("name")
password = section.get("password")
phase = section.getint("phase")
+ tagonly = section.getboolean("tag_only")
if not name or not password or not phase == 1:
log.msg("invalid worker configuration ignored: {}".format(repr(section)))
return
- sl_props = { 'dl_lock':None, 'ul_lock':None }
+ sl_props = { 'dl_lock':None, 'ul_lock':None, 'tag_only':tagonly }
if "dl_lock" in section:
lockname = section.get("dl_lock")
sl_props['dl_lock'] = lockname
base64.b64encode(seckey[0:2] + seckey[32:40] + seckey[72:]))
+def canStartBuild(builder, wfb, request):
+ """ filter out non tag requests for tag_only workers. """
+ wtagonly = wfb.worker.properties.getProperty('tag_only')
+ tag = request.properties.getProperty('tag')
+
+ if wtagonly and not tag:
+ return False
+
+ return True
+
c['builders'] = []
workerNames = [ ]
for brname in branchNames:
bldrname = brname + "_" + target
- c['builders'].append(BuilderConfig(name=bldrname, workernames=workerNames, factory=factory, nextBuild=GetNextBuild))
+ c['builders'].append(BuilderConfig(name=bldrname, workernames=workerNames, factory=factory, nextBuild=GetNextBuild, canStartBuild=canStartBuild))
####### STATUS TARGETS