Disable openvswitch for rc26 build
[build.git] / build-conf-planetlab.py
1 #!/usr/bin/python
2 ###
3 # Nightly build spec HOWTO
4 #
5 # *  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
6 # will get picked up from the defaults at the bottom of this fiel.
7 #
8 # *  A build spec may define multiple builds encapsulating various combinations of the available parameter options. To do so, 
9 # set a parameter to a list, and the parent script will automatically turn it into the combinations it encloses. e.g., the following
10 # build spec defines 6 separate builds:
11 #
12 # my_build = {
13 #   'fcdistro':['centos5','f8','f10'],
14 #   'personality':['linux32','linux65']
15 #
16 # * 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
17 # 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']
18 #
19
20 #caglar_k32_build = {
21 #       'tags':'planetlab-k32-tags.mk',
22 #       'fcdistro':['f12', 'centos5','f8'],
23 #       'personality':['linux32','linux64'],
24 #       'test':0,
25 #       'release':'k32'
26 #}
27
28 sapans_k27_build = {
29         'tags':'planetlab-k27-tags.mk',
30         'fcdistro':['f12', 'centos5','f8'],
31         'personality':['linux32','linux64'],
32         'test':0,
33         'release':'k27'
34 }
35
36 marcs_k22_build = {
37         'tags':'planetlab-tags.mk',
38         'fcdistro':['f12', 'centos5','f8'],
39         'personality':['linux32','linux64'],
40         'test': 0,
41         'release':'k22',
42 }
43
44 ###
45 #
46 # DEFAULTS 
47 #
48 # Any values that you leave out from the above specs will get filled in by the defaults specified below.
49 # You shouldn't need to modify these values to add new builds
50
51 __personality_to_arch__={'linux32':'i386','linux64':'x86_64'}
52 __flag_to_test__={0:'-B', 1:''}
53
54 def __check_out_build_script__(build):
55     import os
56     tmpname = os.popen('mktemp -d /tmp/'+build['build-script']+'.XXXXXX').read().rstrip('\n')
57     os.system("git clone --depth 1 %s %s" % (build['scmpath'], tmpname))
58     return "%s/%s" % (tmpname, build['build-script'])
59
60 def __today__():
61     import datetime
62     return datetime.datetime.now().strftime("%Y-%m-%d")
63
64 __default_build__ = {
65
66 ### Simple parameters
67     'tags':'planetlabs-tags.mk',
68     'fcdistro':'centos5',
69     'personality':'linux32',
70     'test':0,
71     'release':'k22',
72         'path':'/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin',
73         'sh':'/bin/bash',
74         'mailto':'build@lists.planet-lab.org',
75         'build-script':'vbuild-nightly.sh',
76         'webpath':'/vservers/build.planet-lab.org/var/www/html/install-rpms/archive',
77         'pldistro':'planetlab',
78         'date': __today__(),
79         'scmpath':'git://git.planet-lab.org/build.git',
80     'personality':'linux32',
81     'myplcversion':'4.3',
82
83 ### Parameters with dependencies: define paramater mappings as lambdas here
84
85     'arch':lambda build: __personality_to_arch__[build['personality']],
86     'runtests':lambda build: __flag_to_test__[build['test']],
87     'vbuildnightly':lambda build: __check_out_build_script__(build)
88 }