Add f8 to k27 build
[build.git] / build-conf-planetlab.py
1 #!/usr/bin/python
2
3 ###
4 # Nightly build spec HOWTO
5 #
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.
8 #
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:
12 #
13 # my_build = {
14 #   'fcdistro':['centos5','f8','f10'],
15 #   'personality':['linux32','linux65']
16 #
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']
19 #
20
21
22 marcs_trunk_build = {
23         'tags':'planetlab-tags.mk',
24         'fcdistro':['centos5','f8'],
25         'personality':['linux32','linux64'],
26         'test': 0,
27         'release':'k22',
28 }
29                 
30 sapans_k27_build = {
31         'tags':'k27-tags.mk',
32         'fcdistro':['centos5','f8'],
33         'personality':'linux32',
34         'test':1,
35         'release':'k27'
36 }
37
38 ###
39 #
40 # DEFAULTS 
41 #
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
44
45 __personality_to_arch__={'linux32':'i386','linux64':'x86_64'}
46 __flag_to_test__={0:'-B', 1:''}
47
48 def __check_out_build_script__(build):
49     import os
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))
52     return tmpname
53
54 def __today__():
55     import datetime
56     return datetime.datetime.now().strftime("%Y-%m-%d")
57
58 __default_build__ = {
59
60 ### Simple parameters
61     'tags':'planetlabs-tags.mk',
62     'fcdistro':'centos5',
63     'personality':'linux32',
64     'test':0,
65     'release':'k22',
66         'path':'/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin',
67         'sh':'/bin/bash',
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',
72         'date': __today__(),
73         'svnpath':'http://svn.planet-lab.org/svn/build/trunk',
74     'personality':'linux32',
75     'myplcversion':'4.3',
76
77
78 ### Parameters with dependencies: define paramater mappings as lambdas here
79
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)
83
84 }