Message ID | 20171107172118.11613-1-igortorrente@outlook.com |
---|---|
State | New |
Headers | show |
Series | Add multi-slave builders | expand |
On 11/07/2017 09:21 AM, Igor Torrente wrote: > Implementation of muiti-slave builders. > This patch will make easy creation of multi-slave builders. Are we looking for a review of this? I think if Igor tested this out, then we should commit this. > --- > master.cfg | 30 ++++++++++++++++++------------ > 1 file changed, 18 insertions(+), 12 deletions(-) > > diff --git a/master.cfg b/master.cfg > index 9ecb3f4..164d309 100644 > --- a/master.cfg > +++ b/master.cfg > @@ -18,18 +18,21 @@ import slavepasswd > # a shorter alias to save typing. > c = BuildmasterConfig = {} > > +# Map builders to a set of slaves(workers). > builder_map = { > - 'glibc-x86_64-linux': 'glibc-ubuntu-trusty-slave2', > - 'glibc-i686-linux': 'glibc-ubuntu-trusty-slave2', > - 'glibc-power8-linux': 'fedora25-ppc64-power8-1', > - 'glibc-ppc-linux': 'debian8-ppc-power8-1', > - 'glibc-ppc64le-linux': 'fedora25-ppc64le-power8-1', > - 'glibc-s390x-linux': 'marist-fedora-s390x', > - 'glibc-aarch64-linux': 'reservedbit-xgene-ubuntu-aarch64', > + 'glibc-x86_64-linux':['glibc-ubuntu-trusty-slave2'], > + 'glibc-i686-linux': ['glibc-ubuntu-trusty-slave2'], > + 'glibc-power8-linux': ['fedora25-ppc64-power8-1'], > + 'glibc-ppc-linux': ['debian8-ppc-power8-1'], > + 'glibc-ppc64le-linux': ['fedora25-ppc64le-power8-1'], > + 'glibc-s390x-linux': ['marist-fedora-s390x'], > + 'glibc-aarch64-linux': ['reservedbit-xgene-ubuntu-aarch64'], > } > > +# Sets with all builders and all slaves. > builders = sorted(set(builder_map.iterkeys())) > -slaves = sorted(set(builder_map.itervalues())) > +slaves = sorted(set(slave for slave_list in (builder_map.itervalues()) > + for slave in slave_list)) > > > ####### BUILDSLAVES > @@ -68,10 +71,13 @@ c['schedulers'].append(ForceScheduler( > from AnnotatedFactory import getGlibcAnnotatedFactory > from buildbot.config import BuilderConfig > > -c['builders'] = [BuilderConfig(name = builder, > - slavename = slave, > - factory = getGlibcAnnotatedFactory()) > - for builder, slave in builder_map.iteritems()] > +# Creation of all builders. > +c['builders'] = [] > +for builder in builder_map: > + c['builders'].append(BuilderConfig( > + name = builder, > + slavenames= builder_map[builder], > + factory = getGlibcAnnotatedFactory())) > > ####### STATUS TARGETS > >
diff --git a/master.cfg b/master.cfg index 9ecb3f4..164d309 100644 --- a/master.cfg +++ b/master.cfg @@ -18,18 +18,21 @@ import slavepasswd # a shorter alias to save typing. c = BuildmasterConfig = {} +# Map builders to a set of slaves(workers). builder_map = { - 'glibc-x86_64-linux': 'glibc-ubuntu-trusty-slave2', - 'glibc-i686-linux': 'glibc-ubuntu-trusty-slave2', - 'glibc-power8-linux': 'fedora25-ppc64-power8-1', - 'glibc-ppc-linux': 'debian8-ppc-power8-1', - 'glibc-ppc64le-linux': 'fedora25-ppc64le-power8-1', - 'glibc-s390x-linux': 'marist-fedora-s390x', - 'glibc-aarch64-linux': 'reservedbit-xgene-ubuntu-aarch64', + 'glibc-x86_64-linux':['glibc-ubuntu-trusty-slave2'], + 'glibc-i686-linux': ['glibc-ubuntu-trusty-slave2'], + 'glibc-power8-linux': ['fedora25-ppc64-power8-1'], + 'glibc-ppc-linux': ['debian8-ppc-power8-1'], + 'glibc-ppc64le-linux': ['fedora25-ppc64le-power8-1'], + 'glibc-s390x-linux': ['marist-fedora-s390x'], + 'glibc-aarch64-linux': ['reservedbit-xgene-ubuntu-aarch64'], } +# Sets with all builders and all slaves. builders = sorted(set(builder_map.iterkeys())) -slaves = sorted(set(builder_map.itervalues())) +slaves = sorted(set(slave for slave_list in (builder_map.itervalues()) + for slave in slave_list)) ####### BUILDSLAVES @@ -68,10 +71,13 @@ c['schedulers'].append(ForceScheduler( from AnnotatedFactory import getGlibcAnnotatedFactory from buildbot.config import BuilderConfig -c['builders'] = [BuilderConfig(name = builder, - slavename = slave, - factory = getGlibcAnnotatedFactory()) - for builder, slave in builder_map.iteritems()] +# Creation of all builders. +c['builders'] = [] +for builder in builder_map: + c['builders'].append(BuilderConfig( + name = builder, + slavenames= builder_map[builder], + factory = getGlibcAnnotatedFactory())) ####### STATUS TARGETS