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
10 echo "In manual mode you should export the following vars (or use related option)"
11 echo "MAJOR_DISTROS (-d) TRUNK_DISTROS (-td) VS_DISTROS (-vd)"
12 echo "FCDISTROS (-f) BITS (-i) BASE (-b)"
13 echo "RETRY (-O) TEST (-T) DRY_RUN (-n)"
14 echo "Use at least one space for blanking a set of distros"
18 # comment off for usual dailies
22 while [[ -n "$@" ]] ; do
24 -d) shift ; MAJOR_DISTROS="$MAJOR_DISTROS $1" ;;
25 -f) shift ; FCDISTROS="$FCDISTROS $1" ;;
26 -i) shift ; BITS="$BITS $1" ;;
27 -td) shift; TRUNK_DISTROS="$1" ;;
28 -vd) shift; VS_DISTROS="$1" ;;
29 -b) shift; BASE="$1" ;;
39 DEFAULT_FCDISTROS="f8"
43 if [ -z "$MINOR" ] ; then
44 DEFAULT_MAJOR_DISTROS=""
46 DEFAULT_TRUNK_DISTROS="onelab planetlab"
49 DEFAULT_MAJOR_DISTROS="planetlab onelab"
50 DEFAULT_VS_DISTROS="onelab"
51 DEFAULT_TRUNK_DISTROS=""
52 BUILDOPT="-s http://svn.planet-lab.org/svn/build/tags/${MAJOR}-${MINOR}"
57 [[ -n "$@" ]] && usage
59 # export any of these to override - this is for manual use only
60 if [ -z "$MAJOR_DISTROS" ] ; then MAJOR_DISTROS=$DEFAULT_MAJOR_DISTROS ; else manual=true ; fi
61 if [ -z "$FCDISTROS" ] ; then FCDISTROS=$DEFAULT_FCDISTROS ; else manual=true ; fi
62 if [ -z "$BITS" ] ; then BITS=$DEFAULT_BITS ; else manual=true ; fi
63 if [ -z "$TRUNK_DISTROS" ] ; then TRUNK_DISTROS=$DEFAULT_TRUNK_DISTROS ; else manual=true ; fi
64 if [ -z "$VS_DISTROS" ] ; then VS_DISTROS=$DEFAULT_VS_DISTROS ; else manual=true ; fi
65 if [ -z "$BASE" ] ; then BASE=$DEFAULT_BASE ; else manual=true ; fi
66 [ -n "$RETRY" ] && { extra_option="$extra_option -o" ; manual=true ; }
67 [ -n "$TEST" ] && { extra_option="$extra_option -T" ; manual=true ; }
68 [ -n "$DRY_RUN" ] && { manual=true ; }
71 [ -n "$manual" ] && echo "$@" '; \'
72 if [ -z "$DRY_RUN" ] ; then
77 function shortname () {
86 ############################## ${MAJOR}
87 for d in $MAJOR_DISTROS ; do
88 for f in $FCDISTROS ; do
92 if [ -z "$MINOR" ] ; then
93 buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
95 buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"
97 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
98 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
99 -b $buildname $extra_option"
105 ############################## ${MAJOR}/centos5
106 # centos5 : for both archs, make the vserver rpms
107 # does not test, so skip if test is requested
108 if [ -z "$TEST" ] ; then
110 for d in $VS_DISTROS ; do
111 for bits in $BITS ; do
114 if [ -z "$MINOR" ] ; then
115 buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
117 buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"
119 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
120 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
121 -b $buildname -B vserver"
127 ############################## TRUNK
128 # raw - std planetlab x f8 x 32bits for deploying on alpha nodes
129 for d in $TRUNK_DISTROS; do
130 for bits in $BITS; do
133 buildname="${BASE}--tr${s}-${bits}"
134 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
135 -d $d -p $p -b $buildname $extra_option"
140 ##############################