3 # this script is managed under subversion at
4 # http://svn.onelab.eu/infrastructure/scripts/all-builds.sh
5 # it is triggered every night at 0:05 french time on build.onelab.eu aka blitz.inria.fr
10 echo "Usage: $COMMAND [options [ -- vbuild-nightly-options ]]"
11 echo "In manual mode you should export the following vars (or use related option)"
12 echo "MAJOR_DISTROS (-d) TRUNK_DISTROS (-td) TRUNK_FCDISTROS (-tf) VS_DISTROS (-vd)"
13 echo "FCDISTROS (-f) BITS (-i) BASE (-b)"
14 echo "BUILD_BRANCH (-bb) BUILD_TRUNK (-bt)"
15 echo "RETRY (-O) TEST (-T) DRY_RUN (-n)"
16 echo "Use at least one space for blanking a set of distros"
21 [ -n "$manual" ] && echo "$@" '; \'
22 if [ -z "$DRY_RUN" ] ; then
27 function shortname () {
36 # comment off for usual dailies
41 while [[ -n "$@" ]] ; do
43 -d) shift ; MAJOR_DISTROS="$MAJOR_DISTROS $1" ;;
44 -f) shift ; FCDISTROS="$FCDISTROS $1" ;;
45 -i) shift ; BITS="$BITS $1" ;;
46 -td) shift; TRUNK_DISTROS="$1" ;;
47 -tf) shift; TRUNK_FCDISTROS="$1" ;;
48 -vd) shift; VS_DISTROS="$1" ;;
49 -b) shift; BASE="$1" ;;
50 -bb) BUILD_BRANCH=true ;;
51 -bt) BUILD_TRUNK=true ;;
56 --) shift; extra_option="$@" ; shift $# ;;
63 DEFAULT_FCDISTROS="centos5"
66 function trunk_builds () {
68 DEFAULT_MAJOR_DISTROS=""
70 # 5.0 ready for planetlab distro only so far
71 DEFAULT_TRUNK_DISTROS="planetlab"
72 # DEFAULT_TRUNK_DISTROS="onelab planetlab"
73 DEFAULT_TRUNK_FCDISTROS="f8 f9"
76 function branch_builds () {
78 DEFAULT_MAJOR_DISTROS="onelab planetlab"
81 DEFAULT_TRUNK_DISTROS=""
82 DEFAULT_TRUNK_FCDISTROS=""
85 function tagged_builds () {
87 DEFAULT_MAJOR_DISTROS="onelab planetlab"
88 DEFAULT_VS_DISTROS="onelab"
89 DEFAULT_TRUNK_DISTROS=""
90 DEFAULT_TRUNK_FCDISTROS=""
93 if [ -n "$BUILD_BRANCH" ] ; then
95 BUILDOPT="-s http://svn.planet-lab.org/svn/build/branches/${MAJOR}"
96 elif [ -n "$BUILD_TRUNK" ] ; then
101 BUILDOPT="-s http://svn.planet-lab.org/svn/build/tags/${MAJOR}-${MINOR}"
104 [[ -n "$@" ]] && usage
106 # export any of these to override - this is for manual use only
107 if [ -z "$MAJOR_DISTROS" ] ; then MAJOR_DISTROS=$DEFAULT_MAJOR_DISTROS ; else manual=true ; fi
108 if [ -z "$FCDISTROS" ] ; then FCDISTROS=$DEFAULT_FCDISTROS ; else manual=true ; fi
109 if [ -z "$BITS" ] ; then BITS=$DEFAULT_BITS ; else manual=true ; fi
110 if [ -z "$TRUNK_DISTROS" ] ; then TRUNK_DISTROS=$DEFAULT_TRUNK_DISTROS ; else manual=true ; fi
111 if [ -z "$TRUNK_FCDISTROS" ] ; then TRUNK_FCDISTROS=$DEFAULT_TRUNK_FCDISTROS ; else manual=true ; fi
112 if [ -z "$VS_DISTROS" ] ; then VS_DISTROS=$DEFAULT_VS_DISTROS ; else manual=true ; fi
113 if [ -z "$BASE" ] ; then BASE=$DEFAULT_BASE ; else manual=true ; fi
114 [ -n "$TEST" ] && { extra_option="$extra_option -T" ; }
115 [ -n "$DRY_RUN" ] && { manual=true ; }
117 ############################## ${MAJOR}
118 for bits in $BITS; do
119 for f in $FCDISTROS ; do
120 for d in $MAJOR_DISTROS ; do
123 if [ -n "$BUILD_BRANCH" ] ; then
124 buildname="${d}-${MAJOR}-${BASE}-${f}-${bits}"
125 elif [ -n "$BUILD_TRUNK" ] ; then
126 buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
128 buildname="${d}-${MAJOR}-${MINOR}-${f}-${bits}"
130 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
131 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
132 ${base_option} $buildname $extra_option"
138 ############################## ${MAJOR}/centos5
139 # centos5 : for both archs, make the vserver rpms
140 # does not test, so skip if test is requested
141 if [ -z "$TEST" ] ; then
143 for d in $VS_DISTROS ; do
144 for bits in $BITS ; do
147 if [ -n "$BUILD_BRANCH" ] ; then
148 buildname="${d}-${MAJOR}-${BASE}-vs-${f}-${bits}"
149 elif [ -n "$BUILD_TRUNK" ] ; then
150 buildname="${BASE}--${s}.${MAJOR}--vs-${f}-${bits}"
152 buildname="${d}-${MAJOR}-${MINOR}-vs-${f}-${bits}"
154 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
155 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
156 ${base_option} $buildname -B $extra_option vserver"
162 ############################## TRUNK
163 # raw - std planetlab x f8 x 32bits for deploying on alpha nodes
164 for bits in $BITS; do
166 for d in $TRUNK_DISTROS; do
170 buildname="${BASE}--tr${f}-${s}-${bits}"
171 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
172 -f $f -d $d -p $p ${base_option} $buildname $extra_option"
176 for f in $TRUNK_FCDISTROS; do
180 buildname="${BASE}--tr${f}-${s}-${bits}"
181 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
182 -d $d -p $p -f $f ${base_option} $buildname $extra_option"
186 ##############################