New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 81184


Ignore:
Timestamp:
07/26/11 17:36:16 (4 years ago)
Author:
wsiegrist@…
Message:

Support for changes being sent from svn server plus move buildbot behind the proxy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/buildbot/master.cfg

    r80503 r81184  
    6868    from buildbot.changes.svnpoller import SVNPoller 
    6969    c['change_source'] = [SVNPoller( 
    70             'https://svn.macports.org/repository/macports/trunk/base', 
    71             project='base', 
     70            'https://svn.macports.org/repository/macports/trunk', 
    7271            svnbin='/opt/local/bin/svn', 
    7372            pollinterval=300), 
    74         SVNPoller( 
    75             'https://svn.macports.org/repository/macports/trunk/dports', 
    76             project='ports', 
    77             svnbin='/opt/local/bin/svn', 
    78             pollinterval=300) 
    7973        ] 
    8074 
     
    8276 
    8377# consider changes to _resources as unimportant 
    84 def ports_check_importance(change): 
     78def change_has_ports(change): 
    8579    for f in change.files: 
    86         if f.split('/')[0] != "_resources": 
     80        if "_resources" in f: 
     81            continue 
     82        if "dports" in f and "Portfile" in f: 
    8783            return True 
    8884    return False 
    8985 
     86def change_has_base(change): 
     87    for f in change.files: 
     88        if f.startswith('base'): 
     89            return True 
     90    return False 
     91         
     92 
    9093# Configure the Schedulers, which decide how to react to incoming changes. 
    91  
     94from buildbot.schedulers.basic import SingleBranchScheduler 
    9295from buildbot.changes.filter import ChangeFilter 
    93 base_filter = ChangeFilter(project="base") 
    94 ports_filter = ChangeFilter(project="ports") 
    95  
    96 from buildbot.schedulers.basic import SingleBranchScheduler 
     96repofilter = ChangeFilter(repository="/svn/repositories/macports") 
    9797c['schedulers'] = [SingleBranchScheduler( 
    9898                            name="base", 
    99                             treeStableTimer=300, 
    100                             change_filter=base_filter, 
     99                            treeStableTimer=10, 
     100                            fileIsImportant=change_has_base, 
     101                            change_filter = repofilter, 
    101102                            builderNames=["buildbase"]), 
    102103                   SingleBranchScheduler( 
    103104                            name="ports", 
    104                             treeStableTimer=30, 
    105                             change_filter=ports_filter, 
    106                             fileIsImportant=ports_check_importance, 
     105                            treeStableTimer=10, 
     106                            fileIsImportant=change_has_ports, 
     107                            change_filter = repofilter, 
    107108                            builderNames=["buildports"]) 
    108109                ] 
     
    142143 
    143144            portset = set() 
    144             # paths should be category/portdir(/...) 
     145            # paths should be dports/category/portdir(/...) 
    145146            for f in self.build.allFiles(): 
    146147                comps = f.split('/') 
    147                 if len(comps) >= 2 and comps[0] != '_resources': 
     148                if len(comps) >= 3 and comps[0] == 'dports': 
    148149                    portset.add(comps[1]) 
    149150            portlist += ' ' + ' '.join(portset) 
     
    158159    dlhost='' 
    159160    dlpath='/www/hosts/packages.macports.org' 
     161    ulpath='archive_staging' 
    160162else: 
    161163    prefix='%(workdir)s/opt/local' 
     
    163165    dlhost='' 
    164166    dlpath='./deployed_archives' 
     167    ulpath='archive_staging' 
     168 
    165169 
    166170ports_factory = BuildFactory() 
     
    180184                           'SRC_PREFIX': WithProperties(src_prefix)})) 
    181185 
    182 ulpath='archive_staging' 
    183186ports_factory.addStep(ShellCommand(command=["./gather_archives.sh"], 
    184187                                   name="gather archives", 
    185188                                   description="gather distributable archives", 
    186189                      env={'PREFIX': WithProperties(prefix), 
     190                           'HOME': '/tmp/', 
    187191                           'ULPATH': ulpath})) 
    188192# upload archives from build slave to master 
     
    203207                                   name="status", 
    204208                                   description="status", 
    205                         env={'PREFIX': WithProperties(prefix)}, 
     209                        env={'PREFIX': WithProperties(prefix), 
     210                             'HOME': '/tmp/', 
     211                             }, 
    206212                        logfiles={"portstatus": "portstatus.log"})) 
    207213# TODO: do we want to upload the individual logs so maintainers can review them? 
     
    263269if production: 
    264270    c['buildbotURL'] = "http://build.macports.org/" 
    265     c['status'].append(html.WebStatus(http_port=80, authz=authz_cfg)) 
     271    c['status'].append(html.WebStatus(http_port=8710, authz=authz_cfg)) 
    266272else: 
    267273    c['buildbotURL'] = "http://localhost:8010/" 
Note: See TracChangeset for help on using the changeset viewer.