# read a full log and tries to extract the interesting stuff
import sys,re
-m_show_line=re.compile(".* BEG (RPM|VSERVER).*|.*'boot'.*|\* .*|.*is not installed.*|.*PROPFIND.*|.*Starting.*:run_log.*")
+m_show_line=re.compile(".* BEG (RPM|VSERVER).*|.*'boot'.*|\* .*| \* .*|.*is not installed.*|.*PROPFIND.*|.*Starting.*:run_log.*")
m_installing_any=re.compile('\r (Installing:[^\]]*]) ')
m_installing_err=re.compile('\r (Installing:[^\]]*])(..+)')
m_installing_end=re.compile('Installed:.*')
echo "See full build log at ${LOG_URL}" ; \
echo "and tail version at ${LOG_URL}.ko" ; \
echo "See complete set of testlogs at ${TESTLOGS_URL}" ; \
- tail --lines=1000 ${WEBLOG} ) | mail -s "Failures with ${MAIL_SUBJECT} ${BASE}" $MAILTO
+ tail --lines=1000 ${WEBLOG} ) | mail -s "Failures with ${MAIL_SUBJECT} ${BASE} on $(hostname)" $MAILTO
fi
exit 1
}
echo "$PLDISTRO ($BASE) build for $FCDISTRO completed on $(date)" ; \
echo "See full build log at ${LOG_URL}" ; \
[ -n "$DO_TEST" ] && echo "See complete set of testlogs at ${TESTLOGS_URL}" ) \
- | mail -s "Success with ${MAIL_SUBJECT} ${BASE}" $MAILTO
+ | mail -s "Success with ${MAIL_SUBJECT} ${BASE} on $(hostname)" $MAILTO
fi
# XXX For some reason, we haven't been getting this email for successful builds. If this sleep
# doesn't fix the problem, I'll remove it -- Sapan.
TESTS_SYSTEM_SVNPATH=${TESTS_SVNPATH}/system
### the URL to the RPMS/<arch> location
+ # f12 now has everything in i686; try i386 first as older fedoras have both
url=""
- for a in i386 x86_64; do
+ for a in i386 i686 x86_64; do
archdir=/vservers/$BASE/build/RPMS/$a
if [ -d $archdir ] ; then
# where was that installed
# need to proceed despite of set -e
success=true
- ssh 2>&1 -n ${testmaster_ssh} ${testdir}/run_log --build ${build_SVNPATH} --url ${url} $configs $test_env --verbose --all || success=
+ ssh 2>&1 -n ${testmaster_ssh} ${testdir}/run_log --build ${build_SVNPATH} --url ${url} $configs $test_env $VERBOSE --all || success=
# gather logs in the vserver
mkdir -p /vservers/$BASE/build/testlogs
B) DO_TEST= ;;
T) DO_BUILD= ;;
n) DRY_RUN="-n" ;;
- v) set -x ;;
+ v) set -x ; VERBOSE="-v" ;;
7) BASE="$(date +%a|tr A-Z a-z)-@FCDISTRO@" ;;
i) IFNAME=$OPTARG ;;
h|*) usage ;;
vserver ${BASE} exec svn update /build
# get environment from the first run
FCDISTRO=$(vserver ${BASE} exec /build/getdistroname.sh)
-
- PLDISTRO=$(vserver ${BASE} exec make --no-print-directory -C /build stage1=skip +PLDISTRO)
- PLDISTROTAGS=$(vserver ${BASE} exec make --no-print-directory -C /build stage1=skip +PLDISTROTAGS)
- build_SVNPATH=$(vserver ${BASE} exec make --no-print-directory -C /build stage1=skip +build-SVNPATH)
- PERSONALITY=$(vserver ${BASE} exec make --no-print-directory -C /build stage1=skip +PERSONALITY)
- MAILTO=$(vserver ${BASE} exec make --no-print-directory -C /build stage1=skip +MAILTO)
- WEBPATH=$(vserver ${BASE} exec make --no-print-directory -C /build stage1=skip +WEBPATH)
- TESTBUILDURL=$(vserver ${BASE} exec make --no-print-directory -C /build stage1=skip +TESTBUILDURL)
- WEBROOT=$(vserver ${BASE} exec make --no-print-directory -C /build stage1=skip +WEBROOT)
+ # retrieve all in one run
+ tmp=/tmp/${BASE}-env.sh
+ vserver ${BASE} exec make --no-print-directory -C /build stage1=skip \
+ ++PLDISTRO ++PLDISTROTAGS ++PERSONALITY ++MAILTO ++WEBPATH ++TESTBUILDURL ++WEBROOT > $tmp
+ # sh vars cannot have a minus
+ echo build_SVNPATH=$(vserver ${BASE} exec make --no-print-directory -C /build stage1=skip +build-SVNPATH) >> $tmp
+ . $tmp
+ rm -f $tmp
+ options=(${options[@]} -d $PLDISTRO -t $PLDISTROTAGS -s $build_SVNPATH)
+ [ -n "$PERSONALITY" ] && options=(${options[@]} -p $PERSONALITY)
+ [ -n "$MAILTO" ] && options=(${options[@]} -m $MAILTO)
+ [ -n "$WEBPATH" ] && options=(${options[@]} -w $WEBPATH)
+ [ -n "$TESTBUILDURL" ] && options=(${options[@]} -W $TESTBUILDURL)
+ [ -n "$WEBROOT" ] && options=(${options[@]} -r $WEBROOT)
show_env
else
# create vserver: check it does not exist yet
svn export $build_SVNPATH $tmpdir
# Create vserver
cd $tmpdir
- ./vbuild-init-vserver.sh -f ${FCDISTRO} -d ${PLDISTRO} -p ${PERSONALITY} -i ${IFNAME} ${BASE}
+ ./vbuild-init-vserver.sh $VERBOSE -f ${FCDISTRO} -d ${PLDISTRO} -p ${PERSONALITY} -i ${IFNAME} ${BASE}
# cleanup
cd -
rm -rf $tmpdir
# publish to the web so run_log can find them
rm -rf $WEBPATH/$BASE ; mkdir -p $WEBPATH/$BASE/{RPMS,SRPMS}
- rsync --archive --delete --verbose /vservers/$BASE/build/RPMS/ $WEBPATH/$BASE/RPMS/
- [[ -n "$PUBLISH_SRPMS" ]] && rsync --archive --delete --verbose /vservers/$BASE/build/SRPMS/ $WEBPATH/$BASE/SRPMS/
+ rsync --archive --delete $VERBOSE /vservers/$BASE/build/RPMS/ $WEBPATH/$BASE/RPMS/
+ [[ -n "$PUBLISH_SRPMS" ]] && rsync --archive --delete $VERBOSE /vservers/$BASE/build/SRPMS/ $WEBPATH/$BASE/SRPMS/
# publish myplc-release if this exists
release=/vservers/$BASE/build/myplc-release
- [ -f $release ] && rsync --verbose $release $WEBPATH/$BASE
+ [ -f $release ] && rsync $VERBOSE $release $WEBPATH/$BASE
# create yum repo and sign packages.
if [ -n "$SIGNYUMREPO" ] ; then