for rc4, with tests & build tagged
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Fri, 23 May 2008 11:21:43 +0000 (11:21 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Fri, 23 May 2008 11:21:43 +0000 (11:21 +0000)
scripts/all-builds.sh

index a4fa36c..d4808a2 100755 (executable)
@@ -8,48 +8,60 @@ COMMAND=$(basename $0)
 function usage () {
     echo "Usage: $COMMAND"
     echo "In manual mode you should export the following vars (or use related option)"
-    echo "PLDISTROS (-d) FCDISTROS (-f) BITS (-i) TRUNK_DISTROS (-td) VS_PLDISTROS (-vd)"
-    echo "BASE (-b) RETRY (-O) TEST (-T) DRY_RUN (-n)"
+    echo "MAJOR_DISTROS (-d) TRUNK_DISTROS (-td) VS_DISTROS (-vd)"
+    echo "FCDISTROS (-f) BITS (-i) BASE (-b)"
+    echo "RETRY (-O) TEST (-T) DRY_RUN (-n)"
     echo "Use at least one space for blanking a set of distros"
     exit 1
 }
 
+# comment off for usual dailies
+MAJOR=4.2
+MINOR=rc4
+
 while [[ -n "$@" ]] ; do
     case "$1" in
-       -d) shift ; PLDISTROS="$PLDISTROS $1" ;;
+       -d) shift ; MAJOR_DISTROS="$MAJOR_DISTROS $1" ;;
        -f) shift ; FCDISTROS="$FCDISTROS $1" ;;
        -i) shift ; BITS="$BITS $1" ;;
        -td) shift; TRUNK_DISTROS="$1" ;;
-       -vd) shift; VS_PLDISTROS="$1" ;;
+       -vd) shift; VS_DISTROS="$1" ;;
        -b) shift; BASE="$1" ;;
        -O) RETRY=true ;;
        -T) TEST=true ;;
        -n) DRY_RUN=true ;;
+       -z) MINOR="" ;;
        *) usage ;;
     esac
     shift
 done
 
-[[ -n "$@" ]] && usage
-
-# tuned for allowing manual re-runs, mostly for tests
-
-#DEFAULT_PLDISTROS="planetlab onelab"
-DEFAULT_PLDISTROS=""
 DEFAULT_FCDISTROS="f8"
 DEFAULT_BITS="32 64"
-#DEFAULT_TRUNK_DISTROS="onelab"
-DEFAULT_TRUNK_DISTROS="onelab planetlab"
-#DEFAULT_VS_PLDISTROS="onelab"
-DEFAULT_VS_PLDISTROS=""
 DEFAULT_BASE="@DATE@"
 
+if [ -z "$MINOR" ] ; then
+    DEFAULT_MAJOR_DISTROS=""
+    DEFAULT_VS_DISTROS=""
+    DEFAULT_TRUNK_DISTROS="onelab planetlab"
+    BUILDOPT=""
+else
+    DEFAULT_MAJOR_DISTROS="planetlab onelab"
+    DEFAULT_VS_DISTROS="onelab"
+    DEFAULT_TRUNK_DISTROS=""
+    BUILDOPT="-s http://svn.planet-lab.org/svn/build/tags/${MAJOR}-${MINOR}"
+fi
+
+
+
+[[ -n "$@" ]] && usage
+
 # export any of these to override - this is for manual use only
-if [ -z "$PLDISTROS" ] ;       then PLDISTROS=$DEFAULT_PLDISTROS ;             else manual=true ; fi
+if [ -z "$MAJOR_DISTROS" ] ;   then MAJOR_DISTROS=$DEFAULT_MAJOR_DISTROS ;     else manual=true ; fi
 if [ -z "$FCDISTROS" ] ;       then FCDISTROS=$DEFAULT_FCDISTROS ;             else manual=true ; fi
 if [ -z "$BITS" ] ;            then BITS=$DEFAULT_BITS ;                       else manual=true ; fi
 if [ -z "$TRUNK_DISTROS" ] ;   then TRUNK_DISTROS=$DEFAULT_TRUNK_DISTROS ;     else manual=true ; fi
-if [ -z "$VS_PLDISTROS" ] ;    then VS_PLDISTROS=$DEFAULT_VS_PLDISTROS ;       else manual=true ; fi
+if [ -z "$VS_DISTROS" ] ;      then VS_DISTROS=$DEFAULT_VS_DISTROS ;           else manual=true ; fi
 if [ -z "$BASE" ] ;            then BASE=$DEFAULT_BASE ;                       else manual=true ; fi
 [ -n "$RETRY" ] &&     { extra_option="$extra_option -o" ; manual=true ; }
 [ -n "$TEST" ] &&      { extra_option="$extra_option -T" ; manual=true ; }
@@ -71,35 +83,41 @@ function shortname () {
     esac
 }
 
-############################## 4.2
-for d in $PLDISTROS ; do
+############################## ${MAJOR}
+for d in $MAJOR_DISTROS ; do
     for f in $FCDISTROS ; do 
        for bits in $BITS; do
            p=linux${bits}
            s=$(shortname $d)
-           buildname="${BASE}--${s}.4.2--${f}-${bits}"
-#          buildname="${d}-4.2-rc3.1lab-${f}-${bits}"
-           command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \
-               -d $d -p $p -f $f -t ${d}-tags-4.2.mk \
+           if [ -z "$MINOR" ] ; then
+               buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
+           else
+               buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"
+           fi
+           command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
+               -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
                -b $buildname $extra_option"
            run $command
        done
     done
 done
 
-############################## 4.2/centos5
+############################## ${MAJOR}/centos5
 # centos5 : for both archs, make the vserver rpms
 # does not test, so skip if test is requested
 if [ -z "$TEST" ] ; then
     f=centos5
-    for d in $VS_PLDISTROS ; do
+    for d in $VS_DISTROS ; do
        for bits in $BITS ; do
            p=linux${bits}
            s=$(shortname $d)
-           buildname="${BASE}--tr${s}-c5vs-${bits}"
-#          buildname="${d}-4.2-rc3.1lab-${f}-${bits}"
-           command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \
-           -d $d -p $p -f $f -t ${d}-tags-4.2.mk \
+           if [ -z "$MINOR" ] ; then
+               buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
+           else
+               buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"
+           fi
+           command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
+           -d $d -p $p -f $f -t ${d}-tags-${MAJOR}.mk \
            -b $buildname -B vserver"
            run $command
        done
@@ -113,7 +131,7 @@ for d in $TRUNK_DISTROS; do
        p=linux${bits}
        s=$(shortname $d)
        buildname="${BASE}--tr${s}-${bits}"
-       command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \
+       command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org ${BUILDOPT} \
         -d $d -p $p -b $buildname $extra_option"
        run $command
     done