Changeset 79961
- Timestamp:
- 06/30/11 16:08:03 (4 years ago)
- File:
-
- 1 edited
-
users/jmr/master.cfg (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
users/jmr/master.cfg
r79896 r79961 8 8 # a shorter alias to save typing. 9 9 c = BuildmasterConfig = {} 10 11 # Master variable to toggle config between testing on your personal system 12 # (where /opt/local shouldn't be messed with) and the production server (where 13 # it has to be) 14 production = False 10 15 11 16 ####### BUILDSLAVES … … 15 20 # slave name and password must be configured on the slave. 16 21 from buildbot.buildslave import BuildSlave 17 c['slaves'] = [BuildSlave("snowleopard-x86_64", "pass")] 22 if production: 23 # FIXME 24 c['slaves'] = [] 25 else: 26 c['slaves'] = [BuildSlave("snowleopard-x86_64", "pass")] 18 27 19 28 # 'slavePortnum' defines the TCP port to listen on for connections from slaves. … … 30 39 # notifications from a post-commit script) should be used in production 31 40 32 from buildbot.changes.svnpoller import SVNPoller 33 c['change_source'] = [SVNPoller( 34 'https://svn.macports.org/repository/macports/trunk/base', 35 project='base', 36 svnbin='/opt/local/bin/svn', 37 pollinterval=300), 38 SVNPoller( 39 'https://svn.macports.org/repository/macports/trunk/dports', 40 project='ports', 41 svnbin='/opt/local/bin/svn', 42 pollinterval=300) 43 ] 44 45 # from buildbot.changes.pb import PBChangeSource 46 # c['change_source'] = PBChangeSource(user='change', passwd='changepw') 41 if production: 42 from buildbot.changes.pb import PBChangeSource 43 # FIXME: real username and password 44 c['change_source'] = PBChangeSource(user='change', passwd='changepw') 45 else: 46 from buildbot.changes.svnpoller import SVNPoller 47 c['change_source'] = [SVNPoller( 48 'https://svn.macports.org/repository/macports/trunk/base', 49 project='base', 50 svnbin='/opt/local/bin/svn', 51 pollinterval=300), 52 SVNPoller( 53 'https://svn.macports.org/repository/macports/trunk/dports', 54 project='ports', 55 svnbin='/opt/local/bin/svn', 56 pollinterval=300) 57 ] 47 58 48 59 ####### SCHEDULERS … … 108 119 self.setProperty('portlist', portlist) 109 120 121 122 # can't run with PREFIX/SRC_PREFIX inside the workdir in production, 123 # because archives must be built with prefix=/opt/local 124 if production: 125 prefix='/opt/local' 126 src_prefix='/opt/mports' 127 # FIXME 128 dlhost='mparchives.local' 129 dlpath='/archives' 130 else: 131 prefix='%(workdir)s/opt/local' 132 src_prefix='%(workdir)s/opt/mports' 133 dlhost='' 134 dlpath='.' 135 110 136 ports_factory = BuildFactory() 111 137 # get MPAB itself; we'll do the checkout of base and dports via MPAB's script 112 138 ports_factory.addStep(SVN(svnurl='https://svn.macports.org/repository/macports/contrib/mpab', 113 139 mode="update")) 114 # XXX can't run with PREFIX/SRC_PREFIX inside the workdir in production,115 # because archives must be built with prefix=/opt/local116 140 ports_factory.addStep(ShellCommand(command=["./mpsync.sh"], 117 env={'PREFIX': WithProperties( "%(workdir)s/opt/local"),118 'SRC_PREFIX': WithProperties( "%(workdir)s/opt/mports")}))141 env={'PREFIX': WithProperties(prefix), 142 'SRC_PREFIX': WithProperties(src_prefix)})) 119 143 ports_factory.addStep(ShellCommandWithPortList(command=WithProperties('echo %(portlist)s | tr " " "\n" > portlist'))) 120 144 # run MPAB on the port list 121 145 ports_factory.addStep(Compile(command=["./mpab", "buildports", "portlist"], 122 env={'PREFIX': WithProperties( "%(workdir)s/opt/local"),123 'SRC_PREFIX': WithProperties( "%(workdir)s/opt/mports")}))146 env={'PREFIX': WithProperties(prefix), 147 'SRC_PREFIX': WithProperties(src_prefix)})) 124 148 # sign generated binaries and sync to download server (if distributable) 125 ports_factory.addStep(ShellCommand(command=["./deploy_archives.sh"])) 149 ports_factory.addStep(ShellCommand(command=["./deploy_archives.sh"], 150 env={'PREFIX': WithProperties(prefix), 151 'DLHOST': dlhost, 152 'DLPATH': dlpath})) 126 153 127 154 # make a logfile summarising the success/failure status for each port 128 155 ports_factory.addStep(ShellCommand(command=["./do_status.sh"], 156 env={'PREFIX': WithProperties(prefix)}, 129 157 logfiles={"portstatus": "portstatus.log"})) 130 158 # do we want to upload the individual logs so maintainers can review them? … … 133 161 from buildbot.config import BuilderConfig 134 162 135 c['builders']= [ 136 BuilderConfig(name="buildbase", 137 slavenames=["snowleopard-x86_64"], 138 factory=base_factory), 139 BuilderConfig(name="buildports", 140 slavenames=["snowleopard-x86_64"], 141 factory=ports_factory) 142 ] 163 if production: 164 # FIXME 165 c['builders']= [] 166 else: 167 c['builders']= [ 168 BuilderConfig(name="buildbase", 169 slavenames=["snowleopard-x86_64"], 170 factory=base_factory), 171 BuilderConfig(name="buildports", 172 slavenames=["snowleopard-x86_64"], 173 factory=ports_factory) 174 ] 143 175 144 176 ####### STATUS TARGETS
Note: See TracChangeset
for help on using the changeset viewer.

