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 "Overwrite (-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 () {
38 # comment off for usual dailies
45 while [[ -n "$@" ]] ; do
47 -d) shift ; MAJOR_DISTROS="$MAJOR_DISTROS $1" ;;
48 -f) shift ; FCDISTROS="$FCDISTROS $1" ;;
49 -i) shift ; BITS="$BITS $1" ;;
50 -td) shift; TRUNK_DISTROS="$1" ;;
51 -tf) shift; TRUNK_FCDISTROS="$1" ;;
52 -vd) shift; VS_DISTROS="$1" ;;
53 -b) shift; BASE="$1" ;;
54 -bb) BUILD_BRANCH=true ;;
55 -bt) BUILD_TRUNK=true ;;
60 --) shift; extra_option="$@" ; shift $# ;;
67 DEFAULT_FCDISTROS="centos5"
70 function trunk_builds () {
72 DEFAULT_MAJOR_DISTROS=""
74 # 5.0 ready for planetlab distro only so far
75 DEFAULT_TRUNK_DISTROS="planetlab"
76 # DEFAULT_TRUNK_DISTROS="onelab planetlab"
77 DEFAULT_TRUNK_FCDISTROS="f8 f9"
80 function branch_builds () {
82 DEFAULT_MAJOR_DISTROS="onelab planetlab"
85 DEFAULT_TRUNK_DISTROS=""
86 DEFAULT_TRUNK_FCDISTROS=""
89 function tagged_builds () {
91 DEFAULT_MAJOR_DISTROS="onelab planetlab"
92 DEFAULT_VS_DISTROS="onelab"
93 DEFAULT_TRUNK_DISTROS=""
94 DEFAULT_TRUNK_FCDISTROS=""
97 if [ -n "$BUILD_BRANCH" ] ; then
99 BUILDOPT="-s http://svn.planet-lab.org/svn/build/branches/${MAJOR}"
100 elif [ -n "$BUILD_TRUNK" ] ; then
105 BUILDOPT="-s http://svn.planet-lab.org/svn/build/tags/${MAJOR}-${MINOR}"
108 [[ -n "$@" ]] && usage
110 # export any of these to override - this is for manual use only
111 if [ -z "$MAJOR_DISTROS" ] ; then MAJOR_DISTROS=$DEFAULT_MAJOR_DISTROS ; else manual=true ; fi
112 if [ -z "$FCDISTROS" ] ; then FCDISTROS=$DEFAULT_FCDISTROS ; else manual=true ; fi
113 if [ -z "$BITS" ] ; then BITS=$DEFAULT_BITS ; else manual=true ; fi
114 if [ -z "$TRUNK_DISTROS" ] ; then TRUNK_DISTROS=$DEFAULT_TRUNK_DISTROS ; else manual=true ; fi
115 if [ -z "$TRUNK_FCDISTROS" ] ; then TRUNK_FCDISTROS=$DEFAULT_TRUNK_FCDISTROS ; else manual=true ; fi
116 if [ -z "$VS_DISTROS" ] ; then VS_DISTROS=$DEFAULT_VS_DISTROS ; else manual=true ; fi
117 if [ -z "$BASE" ] ; then BASE=$DEFAULT_BASE ; else manual=true ; fi
118 [ -n "$TEST" ] && { extra_option="$extra_option -T" ; }
119 [ -n "$DRY_RUN" ] && { manual=true ; }
121 ############################## ${MAJOR}
122 for bits in $BITS; do
123 for f in $FCDISTROS ; do
124 for d in $MAJOR_DISTROS ; do
127 if [ -n "$BUILD_BRANCH" ] ; then
128 buildname="${d}-${MAJOR}-${BASE}-${f}-${bits}"
129 elif [ -n "$BUILD_TRUNK" ] ; then
130 buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
132 buildname="${d}-${MAJOR}-${MINOR}-${f}-${bits}"
134 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
135 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
136 ${base_option} $buildname $extra_option"
142 ############################## ${MAJOR}/centos5
143 # centos5 : for both archs, make the vserver rpms
144 # does not test, so skip if test is requested
145 if [ -z "$TEST" ] ; then
147 for d in $VS_DISTROS ; do
148 for bits in $BITS ; do
151 if [ -n "$BUILD_BRANCH" ] ; then
152 buildname="${d}-${MAJOR}-${BASE}-vs-${f}-${bits}"
153 elif [ -n "$BUILD_TRUNK" ] ; then
154 buildname="${BASE}--${s}.${MAJOR}--vs-${f}-${bits}"
156 buildname="${d}-${MAJOR}-${MINOR}-vs-${f}-${bits}"
158 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
159 -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
160 ${base_option} $buildname -B $extra_option vserver"
166 ############################## TRUNK
167 # raw - std planetlab x f8 x 32bits for deploying on alpha nodes
168 for bits in $BITS; do
170 for d in $TRUNK_DISTROS; do
175 buildname="${BASE}--tr${fs}-${ds}-${bits}"
176 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
177 -d $d -p $p -f $f ${base_option} $buildname $extra_option"
181 for f in $TRUNK_FCDISTROS; do
186 buildname="${BASE}--tr${fs}-${ds}-${bits}"
187 command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
188 -d $d -p $p -f $f ${base_option} $buildname $extra_option"
192 ##############################