3 # Nightly build spec HOWTO
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.
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:
13 # 'fcdistro':['centos5','f8','f10'],
14 # 'personality':['linux32','linux65']
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']
21 # 'tags':'planetlab-k32-tags.mk',
22 # 'fcdistro':['f12', 'centos5','f8'],
23 # 'personality':['linux32','linux64'],
29 'tags':'planetlab-k27-tags.mk',
30 'fcdistro':['f12', 'centos5','f8'],
31 'personality':['linux32','linux64'],
37 'tags':'planetlab-tags.mk',
38 'fcdistro':['f12', 'centos5','f8'],
39 'personality':['linux32','linux64'],
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
51 __personality_to_arch__={'linux32':'i386','linux64':'x86_64'}
52 __flag_to_test__={0:'-B', 1:''}
54 def __check_out_build_script__(build):
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'])
62 return datetime.datetime.now().strftime("%Y-%m-%d")
67 'tags':'planetlabs-tags.mk',
69 'personality':'linux32',
72 'path':'/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin',
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',
79 'scmpath':'git://git.planet-lab.org/build.git',
80 'personality':'linux32',
83 ### Parameters with dependencies: define paramater mappings as lambdas here
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)