4 # Nightly build spec HOWTO
6 # * To add a 'build spec', define a dictionary as in the following examples, filling in the values you would like to override in the defaults. Any values you leave out
7 # will get picked up from the defaults at the bottom of this fiel.
9 # * A build spec may define multiple builds encapsulating various combinations of the available parameter options. To do so,
10 # set a parameter to a list, and the parent script will automatically turn it into the combinations it encloses. e.g., the following
11 # build spec defines 6 separate builds:
14 # 'fcdistro':['centos5','f8','f10'],
15 # 'personality':['linux32','linux65']
17 # * If your parameters have dependencies - e.g. you only want to build the linu64 personality on f10, then define the parameter as a lambda operating
18 # on the current build spec. e.g. in this case, it would be to the effect of lambda (build): if (build['fcdistro']=='f10') then ['linux32','linux64'] else ['linux32']
23 'tags':'planetlab-tags.mk',
24 'fcdistro':['centos5','f8'],
25 'personality':['linux32','linux64'],
32 'fcdistro':['centos5','f8'],
33 'personality':'linux32',
42 # Any values that you leave out from the above specs will get filled in by the defaults specified below.
43 # You shouldn't need to modify these values to add new builds
45 __personality_to_arch__={'linux32':'i386','linux64':'x86_64'}
46 __flag_to_test__={0:'-B', 1:''}
48 def __check_out_build_script__(build):
50 tmpname = os.popen('mktemp /tmp/'+build['build-script']+'.XXXXXX').read().rstrip('\n')
51 os.system("svn cat %s/%s > %s 2>/dev/null"%(build['svnpath'],build['build-script'],tmpname))
56 return datetime.datetime.now().strftime("%Y-%m-%d")
61 'tags':'planetlabs-tags.mk',
63 'personality':'linux32',
66 'path':'/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin',
68 'mailto':'build@lists.planet-lab.org',
69 'build-script':'vbuild-nightly.sh',
70 'webpath':'/vservers/build.planet-lab.org/var/www/html/install-rpms/archive',
71 'pldistro':'planetlab',
73 'svnpath':'http://svn.planet-lab.org/svn/build/trunk',
74 'personality':'linux32',
78 ### Parameters with dependencies: define paramater mappings as lambdas here
80 'arch':lambda build: __personality_to_arch__[build['personality']],
81 'runtests':lambda build: __flag_to_test__[build['test']],
82 'vbuildnightly':lambda build: __check_out_build_script__(build)