From 7c1ab45c198a1ab522ff21fef71268f28874ac7b Mon Sep 17 00:00:00 2001 From: thierry Date: Wed, 23 Apr 2008 20:18:10 +0000 Subject: [PATCH] --- scripts/all-builds.sh | 68 ++++++++++++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/scripts/all-builds.sh b/scripts/all-builds.sh index 9c7c05c..95d9ec0 100755 --- a/scripts/all-builds.sh +++ b/scripts/all-builds.sh @@ -7,11 +7,25 @@ COMMAND=$(basename $0) function usage () { echo "Usage: $COMMAND" - echo "In manual mode you should export either of these" - echo "PLDISTROS FCDISTROS BITS RETRY TEST DRY_RUN" + echo "In manual mode you should export the following vars (or use related option)" + echo "PLDISTROS (-d) FCDISTROS (-f) BITS (-b) TRUNK_DISTRO (-td) RETRY (-O) TEST (-T) DRY_RUN (-n)" exit 1 } +while [[ -n "$@" ]] ; do + case "$1" in + -d) shift ; PLDISTROS="$PLDISTROS $1" ;; + -f) shift ; FCDISTROS="$FCDISTROS $1" ;; + -b) shift ; BITS="$BITS $1" ;; + -td) shift; TRUNK_DISTRO="$1" ;; + -O) RETRY=true ;; + -T) TEST=true ;; + -n) DRY_RUN=true ;; + *) usage ;; + esac + shift +done + [[ -n "$@" ]] && usage # tuned for allowing manual re-runs, mostly for tests @@ -19,54 +33,66 @@ function usage () { DEFAULT_PLDISTROS="planetlab onelab" DEFAULT_FCDISTROS="f8" DEFAULT_BITS="32 64" +DEFAULT_TRUNK_DISTRO=onelab # 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 "$FCDISTROS" ] ; then FCDISTROS=$DEFAULT_FCDISTROS ; else manual=true ; fi -if [ -z "$BITS" ] ; then BITS=$DEFAULT_BITS ; else manual=true ; fi +if [ -z "$PLDISTROS" ] ; then PLDISTROS=$DEFAULT_PLDISTROS ; 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_DISTRO" ] ; then TRUNK_DISTRO=$DEFAULT_TRUNK_DISTRO ; else manual=true ; fi [ -n "$RETRY" ] && { extra_option="$extra_option -o" ; manual=true ; } [ -n "$TEST" ] && { extra_option="$extra_option -T" ; manual=true ; } [ -n "$DRY_RUN" ] && { manual=true ; } function run () { [ -n "$manual" ] && echo "$@" - if [ -n "$DRY_RUN" ] ; then - echo "dry-run: skipped" - else + if [ -z "$DRY_RUN" ] ; then "$@" fi } +function shortname () { + distro=$1; shift + case $distro in + onelab) echo 1l;; + planetlab) echo pl;; + *) echo xx;; + esac +} + for d in $PLDISTROS ; do for f in $FCDISTROS ; do for bits in $BITS; do p=linux${bits} + s=$(shortname $d) command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \ - -f $f -p $p -d $d \ + -d $d -p $p -f $f \ -t ${d}-tags-4.2.mk \ - -b @DATE@--${d}.4.2--${f}-${bits} $extra_option" + -b @DATE@--${s}.4.2--${f}-${bits} $extra_option" run $command done done done # raw - std planetlab x f8 x 32bits for deploying on alpha nodes -for bits in $BITS; do - p=linux${bits} - command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org -p $p -b @DATE@--trunk${bits} $extra_option" - run $command +for d in $TRUNK_DISTRO; do + for bits in $BITS; do + p=linux${bits} + s=$(shortname $d) + command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \ + -d $d -p $p -b @DATE@--tr${s}-${bits} $extra_option" + run $command + done done -[ -n "$manual" ] && { echo 'manual mode : bailing out' ; exit 0 ; } - -# the following gets skipped in any manual mode # centos5 : for both archs, make the vserver rpms -for d in onelab ; do - for bits in $BITS 64; do +for d in $TRUNK_DISTRO ; do + for bits in $BITS ; do p=linux${bits} + s=$(shortname $d) command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org \ - -f centos5 -p $p -d $d \ - -b @DATE@--trunk-c5vs-${bits} \ + -d $d -p $p -f centos5 \ + -b @DATE@--tr${s}-c5vs-${bits} \ -B vserver" run $command done -- 2.47.0