fix support manual runs
[infrastructure.git] / scripts / all-builds.sh
1 #!/bin/bash
2 # this script is managed under subversion at 
3 # http://svn.one-lab.org/infrastructure/scripts/all-builds.sh
4 # it is triggered every night at 0:05 french time on build.one-lab.org aka blitz.inria.fr
5
6 # tuned for allowing manual re-runs, mostly for tests
7
8 DEFAULT_PLDISTROS="planetlab onelab"
9 DEFAULT_FCDISTROS="f8"
10 DEFAULT_BITS="32 64"
11
12 # export any of these to override - this is for manual use only
13 [ -z "$PLDISTROS" ] &&  { PLDISTROS=$DEFAULT_PLDISTROS ; manual=true ; }
14 [ -z "$FCDISTROS" ] &&  { FCDISTROS=$DEFAULT_FCDISTROS ; manual=true ; }
15 [ -z "$BITS" ] &&       { BITS=$DEFAULT_BITS ; manual=true ; }
16 [ -n "$RETRY" ] &&      { extra_option="$extra_option -o" ; manual=true ; }
17 [ -n "$TEST" ] &&       { extra_option="$extra_option -T" ; manual=true ; }
18 [ -n "$DRY_RUN" ] &&    { manual=true ; }
19
20 for d in $PLDISTROS ; do
21     for f in $FCDISTROS ; do 
22         for bits in $BITS; do
23             p=linux${bits}
24             command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \
25                 -f $f -p $p -d $d \
26                 -t ${d}-tags-4.2.mk \
27                 -b @DATE@--${d}.4.2--${f}-${bits} $test_option"
28             [ -n "$manual" ] && echo $command
29             if [ -n "$DRY_RUN" ] ; then
30                 echo "dry-run: skipped"
31             else
32                 $command
33             fi
34         done
35     done
36 done
37
38 # the following gets skipped in any manual mode 
39 # centos5 : for both archs, make the vserver rpms
40 for d in onelab ; do
41     for bits in 32 64; do
42         p=linux${bits}
43         command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \
44             -f centos5 -p $p -d $d \
45             -t ${d}-tags-4.2.mk \
46             -b @DATE@--${d}.4.2--c5vs-${bits} \
47             -B vserver"
48         if [ -n "$manual" ] ; then
49             echo "manual: skipped"
50         else
51             $command
52         fi
53     done
54 done