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) 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
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 -tf) shift; TRUNK_FCDISTROS="$1" ;;
47 -vd) shift; VS_DISTROS="$1" ;;
48 -b) shift; BASE="$1" ;;
49 -bb) BUILD_BRANCH=true ;;
50 -bt) BUILD_TRUNK=true ;;
60 DEFAULT_FCDISTROS="f8"
63 function trunk_builds () {
65 DEFAULT_MAJOR_DISTROS=""
67 # 5.0 ready for planetlab distro only so far
68 DEFAULT_TRUNK_DISTROS="planetlab"
69 # DEFAULT_TRUNK_DISTROS="onelab planetlab"
70 DEFAULT_TRUNK_FCDISTROS="centos5 f9"
73 function branch_builds () {
75 DEFAULT_MAJOR_DISTROS="onelab planetlab"
78 DEFAULT_TRUNK_DISTROS=""
79 DEFAULT_TRUNK_FCDISTROS=""
82 function tagged_builds () {
84 DEFAULT_MAJOR_DISTROS="onelab planetlab"
85 DEFAULT_VS_DISTROS="onelab"
86 DEFAULT_TRUNK_DISTROS=""
87 DEFAULT_TRUNK_FCDISTROS=""
90 if [ -n "$BUILD_BRANCH" ] ; then
92 BUILDOPT="-s http://svn.planet-lab.org/svn/build/branches/${MAJOR}"
93 elif [ -n "$BUILD_TRUNK" ] ; then
98 BUILDOPT="-s http://svn.planet-lab.org/svn/build/tags/${MAJOR}-${MINOR}"
101 [[ -n "$@" ]] && usage
103 # export any of these to override - this is for manual use only
104 if [ -z "$MAJOR_DISTROS" ] ; then MAJOR_DISTROS=$DEFAULT_MAJOR_DISTROS ; else manual=true ; fi
105 if [ -z "$FCDISTROS" ] ; then FCDISTROS=$DEFAULT_FCDISTROS ; else manual=true ; fi
106 if [ -z "$BITS" ] ; then BITS=$DEFAULT_BITS ; else manual=true ; fi
107 if [ -z "$TRUNK_DISTROS" ] ; then TRUNK_DISTROS=$DEFAULT_TRUNK_DISTROS ; else manual=true ; fi
108 if [ -z "$TRUNK_FCDISTROS" ] ; then TRUNK_FCDISTROS=$DEFAULT_TRUNK_FCDISTROS ; else manual=true ; fi
109 if [ -z "$VS_DISTROS" ] ; then VS_DISTROS=$DEFAULT_VS_DISTROS ; else manual=true ; fi
110 if [ -z "$BASE" ] ; then BASE=$DEFAULT_BASE ; else manual=true ; fi
111 [ -n "$RETRY" ] && { extra_option="$extra_option -O" ; manual=true ; }
112 [ -n "$TEST" ] && { extra_option="$extra_option -T" ; manual=true ; }
113 [ -n "$DRY_RUN" ] && { manual=true ; }
115 ############################## ${MAJOR}
116 for bits in $BITS; do
117 for f in $FCDISTROS ; do
118 for d in $MAJOR_DISTROS ; do
121 if [ -n "$BUILD_BRANCH" ] ; then
122 buildname="${d}-${MAJOR}-@DATE@.1lab-${f}-${bits}"
123 elif [ -n "$BUILD_TRUNK" ] ; then
124 buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
126 buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"
128 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
129 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
130 -b $buildname $extra_option"
136 ############################## ${MAJOR}/centos5
137 # centos5 : for both archs, make the vserver rpms
138 # does not test, so skip if test is requested
139 if [ -z "$TEST" ] ; then
141 for d in $VS_DISTROS ; do
142 for bits in $BITS ; do
145 if [ -n "$BUILD_BRANCH" ] ; then
146 buildname="${d}-${MAJOR}-@DATE@.1lab-${f}-${bits}"
147 elif [ -n "$BUILD_TRUNK" ] ; then
148 buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
150 buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"
152 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
153 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
154 -b $buildname -B vserver"
160 ############################## TRUNK
161 # raw - std planetlab x f8 x 32bits for deploying on alpha nodes
162 for d in $TRUNK_DISTROS; do
163 for bits in $BITS; do
166 buildname="${BASE}--tr${s}-${bits}"
167 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
168 -d $d -p $p -b $buildname $extra_option"
173 for f in $TRUNK_FCDISTROS; do
174 for bits in $BITS; do
176 buildname="${BASE}--tr${f}-${bits}"
177 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
178 -d planetlab -p linux32 -f $f -b $buildname $extra_option"
182 ##############################