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 # 5.0 ready for planetlab distro only so far
47 DEFAULT_TRUNK_DISTROS="planetlab"
48 # DEFAULT_TRUNK_DISTROS="onelab planetlab"
51 DEFAULT_MAJOR_DISTROS="planetlab onelab"
52 DEFAULT_VS_DISTROS="onelab"
53 DEFAULT_TRUNK_DISTROS=""
54 BUILDOPT="-s http://svn.planet-lab.org/svn/build/tags/${MAJOR}-${MINOR}"
59 [[ -n "$@" ]] && usage
61 # export any of these to override - this is for manual use only
62 if [ -z "$MAJOR_DISTROS" ] ; then MAJOR_DISTROS=$DEFAULT_MAJOR_DISTROS ; else manual=true ; fi
63 if [ -z "$FCDISTROS" ] ; then FCDISTROS=$DEFAULT_FCDISTROS ; else manual=true ; fi
64 if [ -z "$BITS" ] ; then BITS=$DEFAULT_BITS ; else manual=true ; fi
65 if [ -z "$TRUNK_DISTROS" ] ; then TRUNK_DISTROS=$DEFAULT_TRUNK_DISTROS ; else manual=true ; fi
66 if [ -z "$VS_DISTROS" ] ; then VS_DISTROS=$DEFAULT_VS_DISTROS ; else manual=true ; fi
67 if [ -z "$BASE" ] ; then BASE=$DEFAULT_BASE ; else manual=true ; fi
68 [ -n "$RETRY" ] && { extra_option="$extra_option -O" ; manual=true ; }
69 [ -n "$TEST" ] && { extra_option="$extra_option -T" ; manual=true ; }
70 [ -n "$DRY_RUN" ] && { manual=true ; }
73 [ -n "$manual" ] && echo "$@" '; \'
74 if [ -z "$DRY_RUN" ] ; then
79 function shortname () {
88 ############################## ${MAJOR}
89 for d in $MAJOR_DISTROS ; do
90 for f in $FCDISTROS ; do
94 if [ -z "$MINOR" ] ; then
95 buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
97 buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"
99 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
100 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
101 -b $buildname $extra_option"
107 ############################## ${MAJOR}/centos5
108 # centos5 : for both archs, make the vserver rpms
109 # does not test, so skip if test is requested
110 if [ -z "$TEST" ] ; then
112 for d in $VS_DISTROS ; do
113 for bits in $BITS ; do
116 if [ -z "$MINOR" ] ; then
117 buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
119 buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"
121 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
122 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
123 -b $buildname -B vserver"
129 ############################## TRUNK
130 # raw - std planetlab x f8 x 32bits for deploying on alpha nodes
131 for d in $TRUNK_DISTROS; do
132 for bits in $BITS; do
135 buildname="${BASE}--tr${s}-${bits}"
136 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
137 -d $d -p $p -b $buildname $extra_option"
142 ##############################