git://git.onelab.eu
/
build.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reach the point where /build gets clones in guest
[build.git]
/
vbuild-nightly.sh
diff --git
a/vbuild-nightly.sh
b/vbuild-nightly.sh
index
57c1d7c
..
27af613
100755
(executable)
--- a/
vbuild-nightly.sh
+++ b/
vbuild-nightly.sh
@@
-1,5
+1,4
@@
#!/bin/bash
#!/bin/bash
-REVISION=$(echo '$Revision: 18120 $' | sed -e 's,\$,,g' -e 's,^\w*:\s,,' )
COMMANDPATH=$0
COMMAND=$(basename $0)
COMMANDPATH=$0
COMMAND=$(basename $0)
@@
-128,7
+127,7
@@
function failure() {
set -x
# early stage ? - let's not create /build/@PLDISTRO@
if test -z "$WEBLOG" ; then
set -x
# early stage ? - let's not create /build/@PLDISTRO@
if test -z "$WEBLOG" ; then
- WEBHOST=
localhost
+ WEBHOST=
$(hostname)
WEBPATH=/tmp
WEBBASE=/tmp/vbuild-early-$(date +%Y-%m-%d)
WEBLOG=/tmp/vbuild-early-$(date +%Y-%m-%d).log.txt
WEBPATH=/tmp
WEBBASE=/tmp/vbuild-early-$(date +%Y-%m-%d)
WEBLOG=/tmp/vbuild-early-$(date +%Y-%m-%d).log.txt
@@
-143,9
+142,9
@@
function failure() {
( \
echo "Subject: KO ${BASE} ${MAIL_SUBJECT}" ; \
echo "To: $MAILTO" ; \
( \
echo "Subject: KO ${BASE} ${MAIL_SUBJECT}" ; \
echo "To: $MAILTO" ; \
- echo "
See full build log at $WEBBASE_URL/log.txt
" ; \
- echo "
and tail version at $WEBBASE_URL.ko
" ; \
- echo "
See complete set of testlogs at
$WEBBASE_URL/testlogs" ; \
+ echo "
see build results at $WEBBASE_URL
" ; \
+ echo "
including full build log at $WEBBASE_URL/log.txt
" ; \
+ echo "
and complete test logs at
$WEBBASE_URL/testlogs" ; \
echo "........................................" ; \
webpublish tail --lines=1000 $WEBLOG ) | \
sendmail $MAILTO
echo "........................................" ; \
webpublish tail --lines=1000 $WEBLOG ) | \
sendmail $MAILTO
@@
-157,7
+156,7
@@
function success () {
set -x
# early stage ? - let's not create /build/@PLDISTRO@
if test -z "$WEBLOG" ; then
set -x
# early stage ? - let's not create /build/@PLDISTRO@
if test -z "$WEBLOG" ; then
- WEBHOST=
localhost
+ WEBHOST=
$(hostname)
WEBPATH=/tmp
WEBLOG=/tmp/vbuild-early-$(date +%Y-%m-%d).log.txt
fi
WEBPATH=/tmp
WEBLOG=/tmp/vbuild-early-$(date +%Y-%m-%d).log.txt
fi
@@
-165,26
+164,31
@@
function success () {
webpublish_cp_local_to_remote $LOG $WEBLOG
summary $LOG | webpublish_append_stdin_to_file $WEBLOG
if [ -n "$DO_TEST" ] ; then
webpublish_cp_local_to_remote $LOG $WEBLOG
summary $LOG | webpublish_append_stdin_to_file $WEBLOG
if [ -n "$DO_TEST" ] ; then
+ short_message="PASS"
( \
echo "Successfully built and tested" ; \
( \
echo "Successfully built and tested" ; \
- echo "See full build log at $WEBBASE_URL/log.txt" ; \
- echo "See complete set of testlogs at $WEBBASE_URL/testlogs" ; \
+ echo "see build results at $WEBBASE_URL" ; \
+ echo "including full build log at $WEBBASE_URL/log.txt" ; \
+ echo "and complete test logs at $WEBBASE_URL/testlogs" ; \
) | webpublish_cp_stdin_to_file $WEBBASE.pass
webpublish rm -f $WEBBASE.pkg-ok $WEBBASE.ko
else
) | webpublish_cp_stdin_to_file $WEBBASE.pass
webpublish rm -f $WEBBASE.pkg-ok $WEBBASE.ko
else
+ short_message="PKGOK"
( \
echo "Successful package-only build, no test requested" ; \
( \
echo "Successful package-only build, no test requested" ; \
- echo "See full build log at $WEBBASE_URL/log.txt" ; \
+ echo "see build results at $WEBBASE_URL" ; \
+ echo "including full build log at $WEBBASE_URL/log.txt" ; \
) | webpublish_cp_stdin_to_file $WEBBASE.pkg-ok
webpublish rm -f $WEBBASE.ko
fi
if [ -n "$MAILTO" ] ; then
( \
) | webpublish_cp_stdin_to_file $WEBBASE.pkg-ok
webpublish rm -f $WEBBASE.ko
fi
if [ -n "$MAILTO" ] ; then
( \
- echo "Subject:
PASS
${BASE} ${MAIL_SUBJECT}" ; \
+ echo "Subject:
$short_message
${BASE} ${MAIL_SUBJECT}" ; \
echo "To: $MAILTO" ; \
echo "$PLDISTRO ($BASE) build for $FCDISTRO completed on $(date)" ; \
echo "To: $MAILTO" ; \
echo "$PLDISTRO ($BASE) build for $FCDISTRO completed on $(date)" ; \
- echo "See full build log at $WEBBASE_URL/log.txt" ; \
- [ -n "$DO_TEST" ] && echo "See complete set of testlogs at $WEBBASE_URL/testlogs" ) \
+ echo "see build results at $WEBBASE_URL" ; \
+ echo "including full build log at $WEBBASE_URL/log.txt" ; \
+ [ -n "$DO_TEST" ] && echo "and complete test logs at $WEBBASE_URL/testlogs" ) \
| sendmail $MAILTO
fi
# XXX For some reason, we haven't been getting this email for successful builds. If this sleep
| sendmail $MAILTO
fi
# XXX For some reason, we haven't been getting this email for successful builds. If this sleep
@@
-278,7
+282,7
@@
function run_log () {
# toss the build in the bargain, so the tests don't need to mess with extracting it
rsync --verbose --archive /vservers/$BASE/build/MODULES/build ${testmaster_ssh}:${BASE}/
# toss the build in the bargain, so the tests don't need to mess with extracting it
rsync --verbose --archive /vservers/$BASE/build/MODULES/build ${testmaster_ssh}:${BASE}/
- # invoke test on testbox - pass url and build url - so the tests can use vtest-init
-vserver
.sh
+ # invoke test on testbox - pass url and build url - so the tests can use vtest-init
vm
.sh
run_log_env="-p $PERSONALITY -d $PLDISTRO -f $FCDISTRO"
# need to proceed despite of set -e
run_log_env="-p $PERSONALITY -d $PLDISTRO -f $FCDISTRO"
# need to proceed despite of set -e
@@
-405,7
+409,6
@@
function setupssh () {
function usage () {
echo "Usage: $COMMAND [option] [var=value...] make-targets"
function usage () {
echo "Usage: $COMMAND [option] [var=value...] make-targets"
- echo "This is $REVISION"
echo "Supported options"
echo " -f fcdistro - defaults to $DEFAULT_FCDISTRO"
echo " -d pldistro - defaults to $DEFAULT_PLDISTRO"
echo "Supported options"
echo " -f fcdistro - defaults to $DEFAULT_FCDISTRO"
echo " -d pldistro - defaults to $DEFAULT_PLDISTRO"
@@
-422,6
+425,7
@@
function usage () {
echo " -y {pl,pg} - passed to run_log"
echo " -e step - passed to run_log"
echo " -X : passes --lxc to run_log"
echo " -y {pl,pg} - passed to run_log"
echo " -e step - passed to run_log"
echo " -X : passes --lxc to run_log"
+ echo " -S : passes --vs to run_log"
echo " -x <run_log_args> - a hook to pass other arguments to run_log"
echo " -w webpath - defaults to $DEFAULT_WEBPATH"
echo " -W testbuildurl - defaults to $DEFAULT_TESTBUILDURL; this is also used to get the hostname where to publish builds"
echo " -x <run_log_args> - a hook to pass other arguments to run_log"
echo " -w webpath - defaults to $DEFAULT_WEBPATH"
echo " -W testbuildurl - defaults to $DEFAULT_TESTBUILDURL; this is also used to get the hostname where to publish builds"
@@
-457,7
+461,7
@@
function main () {
SIGNYUMREPO=""
OPTS_ORIG=$@
SIGNYUMREPO=""
OPTS_ORIG=$@
- OPTS=$(getopt -o "f:d:p:m:s:t:b:o:c:y:e:Xx:w:W:r:M:Yg:u:K:SBTnv7i:P:h" -l "build-branch:" -- $@)
+ OPTS=$(getopt -o "f:d:p:m:s:t:b:o:c:y:e:X
S
x:w:W:r:M:Yg:u:K:SBTnv7i:P:h" -l "build-branch:" -- $@)
if [ $? != 0 ]
then
usage
if [ $? != 0 ]
then
usage
@@
-479,8
+483,10
@@
function main () {
-y) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS --rspec-style $2"; shift 2 ;;
# -e foo -> run_log -e foo
-e) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS --exclude $2"; shift 2 ;;
-y) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS --rspec-style $2"; shift 2 ;;
# -e foo -> run_log -e foo
-e) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS --exclude $2"; shift 2 ;;
- # -X -> run_log -
X
+ # -X -> run_log -
-lxc
-X) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS --lxc"; shift;;
-X) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS --lxc"; shift;;
+ # -S -> run_log --vs
+ -S) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS --vs"; shift;;
# more general form to pass args to run_log
# -x foo -> run_log foo
-x) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS $2"; shift 2;;
# more general form to pass args to run_log
# -x foo -> run_log foo
-x) RUN_LOG_EXTRAS="$RUN_LOG_EXTRAS $2"; shift 2;;
@@
-659,7
+665,7
@@
function main () {
fi
# Create vserver
cd $tmpdir
fi
# Create vserver
cd $tmpdir
- ./vbuild-init
-vserver
.sh $VERBOSE -f ${FCDISTRO} -d ${PLDISTRO} -p ${PERSONALITY} -i ${IFNAME} ${PREINSTALLED} ${BASE}
+ ./vbuild-init
vm
.sh $VERBOSE -f ${FCDISTRO} -d ${PLDISTRO} -p ${PERSONALITY} -i ${IFNAME} ${PREINSTALLED} ${BASE}
# cleanup
cd -
rm -rf $tmpdir
# cleanup
cd -
rm -rf $tmpdir
@@
-715,8
+721,12
@@
function main () {
webpublish_rsync_dir $WEBPATH/$BASE/RPMS/ /vservers/$BASE/build/RPMS/
[[ -n "$PUBLISH_SRPMS" ]] && webpublish_rsync_dir $WEBPATH/$BASE/SRPMS/ /vservers/$BASE/build/SRPMS/
else
webpublish_rsync_dir $WEBPATH/$BASE/RPMS/ /vservers/$BASE/build/RPMS/
[[ -n "$PUBLISH_SRPMS" ]] && webpublish_rsync_dir $WEBPATH/$BASE/SRPMS/ /vservers/$BASE/build/SRPMS/
else
+ # run scanpackages so we can use apt-get on this
+ # (not needed on fedora b/c this is done by the regular build already)
+ vserver $BASE exec bash -c "(cd /build ; dpkg-scanpackages DEBIAN/ | gzip -9c > Packages.gz)"
webpublish mkdir -p $WEBPATH/$BASE/DEBIAN
webpublish mkdir -p $WEBPATH/$BASE/DEBIAN
- webpublish_rsync_files $WEBPATH/$BASE/DEBIAN/ /vservers/$BASE/build/DEBIAN/*.deb
+ webpublish_rsync_files $WEBPATH/$BASE/DEBIAN/ /vservers/$BASE/build/DEBIAN/*.deb
+ webpublish_rsync_files $WEBPATH/$BASE/ /vservers/$BASE/build/Packages.gz
fi
# publish myplc-release if this exists
release=/vservers/$BASE/build/myplc-release
fi
# publish myplc-release if this exists
release=/vservers/$BASE/build/myplc-release