3 # this script is managed under subversion at
4 # http://svn.one-lab.org/infrastructure/scripts/all-builds.sh
5 # it is triggered every night at 0:05 french time on build.one-lab.org aka blitz.inria.fr
10 echo "Usage: $COMMAND"
11 echo "In manual mode you should export the following vars (or use related option)"
12 echo "MAJOR_DISTROS (-d) TRUNK_DISTROS (-td) 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
40 while [[ -n "$@" ]] ; do
42 -d) shift ; MAJOR_DISTROS="$MAJOR_DISTROS $1" ;;
43 -f) shift ; FCDISTROS="$FCDISTROS $1" ;;
44 -i) shift ; BITS="$BITS $1" ;;
45 -td) shift; TRUNK_DISTROS="$1" ;;
46 -vd) shift; VS_DISTROS="$1" ;;
47 -b) shift; BASE="$1" ;;
48 -bb) BUILD_BRANCH=true ;;
49 -bt) BUILD_TRUNK=true ;;
59 DEFAULT_FCDISTROS="f8"
63 function trunk_builds () {
64 DEFAULT_MAJOR_DISTROS=""
66 # 5.0 ready for planetlab distro only so far
67 DEFAULT_TRUNK_DISTROS="planetlab"
68 # DEFAULT_TRUNK_DISTROS="onelab planetlab"
71 function branch_builds () {
72 DEFAULT_MAJOR_DISTROS="onelab planetlab"
75 DEFAULT_TRUNK_DISTROS=""
78 function tagged_builds () {
79 DEFAULT_MAJOR_DISTROS="onelab planetlab"
80 DEFAULT_VS_DISTROS="onelab"
81 DEFAULT_TRUNK_DISTROS=""
84 if [ -n "$BUILD_BRANCH" ] ; then
86 BUILDOPT="-s http://svn.planet-lab.org/svn/build/branches/${MAJOR}"
87 elif [ -n "$BUILD_TRUNK" ] ; then
92 BUILDOPT="-s http://svn.planet-lab.org/svn/build/tags/${MAJOR}-${MINOR}"
95 [[ -n "$@" ]] && usage
97 # export any of these to override - this is for manual use only
98 if [ -z "$MAJOR_DISTROS" ] ; then MAJOR_DISTROS=$DEFAULT_MAJOR_DISTROS ; else manual=true ; fi
99 if [ -z "$FCDISTROS" ] ; then FCDISTROS=$DEFAULT_FCDISTROS ; else manual=true ; fi
100 if [ -z "$BITS" ] ; then BITS=$DEFAULT_BITS ; else manual=true ; fi
101 if [ -z "$TRUNK_DISTROS" ] ; then TRUNK_DISTROS=$DEFAULT_TRUNK_DISTROS ; else manual=true ; fi
102 if [ -z "$VS_DISTROS" ] ; then VS_DISTROS=$DEFAULT_VS_DISTROS ; else manual=true ; fi
103 if [ -z "$BASE" ] ; then BASE=$DEFAULT_BASE ; else manual=true ; fi
104 [ -n "$RETRY" ] && { extra_option="$extra_option -O" ; manual=true ; }
105 [ -n "$TEST" ] && { extra_option="$extra_option -T" ; manual=true ; }
106 [ -n "$DRY_RUN" ] && { manual=true ; }
108 ############################## ${MAJOR}
109 for bits in $BITS; do
110 for f in $FCDISTROS ; do
111 for d in $MAJOR_DISTROS ; do
114 if [ -n "$BUILD_BRANCH" ] ; then
115 buildname="${d}-${MAJOR}-@DATE@.1lab-${f}-${bits}"
116 elif [ -n "$BUILD_TRUNK" ] ; 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 $extra_option"
129 ############################## ${MAJOR}/centos5
130 # centos5 : for both archs, make the vserver rpms
131 # does not test, so skip if test is requested
132 if [ -z "$TEST" ] ; then
134 for d in $VS_DISTROS ; do
135 for bits in $BITS ; do
138 if [ -n "$BUILD_BRANCH" ] ; then
139 buildname="${d}-${MAJOR}-@DATE@.1lab-${f}-${bits}"
140 elif [ -n "$BUILD_TRUNK" ] ; then
141 buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
143 buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"
145 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
146 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
147 -b $buildname -B vserver"
153 ############################## TRUNK
154 # raw - std planetlab x f8 x 32bits for deploying on alpha nodes
155 for d in $TRUNK_DISTROS; do
156 for bits in $BITS; do
159 buildname="${BASE}--tr${s}-${bits}"
160 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
161 -d $d -p $p -b $buildname $extra_option"
166 ##############################