contrib/jenkins: update logging in jenkins_script.sh and add DIST/DISTCHECK variables

Also extend the trigger_build.sh script

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-05-07 14:22:08 +02:00
parent d8b918c462
commit e1f66aabf1
2 changed files with 59 additions and 14 deletions

View file

@ -65,46 +65,56 @@ clean_all() {
if [[ "$OUT_OF_TREE_BUILD" == true ]]; then
log_timestamp "Starting out of tree build"
log_timestamp "out-of-tree: start"
clean_all
log_timestamp "out-of-tree: autogen"
./autogen.sh
make distclean
mkdir _build
pushd _build
log_timestamp "out-of-tree: configure"
../configure --enable-maintainer-mode --prefix=$PWD/.INSTALL/ --with-dhclient=yes --with-dhcpcd=yes --with-crypto=nss --enable-more-warnings=error --enable-ppp=yes --enable-polkit=yes --with-session-tracking=systemd --with-suspend-resume=systemd --with-tests=yes --enable-tests=yes --with-valgrind=yes --enable-ifcfg-rh=yes --enable-ifupdown=yes --enable-ifnet=yes --enable-gtk-doc --enable-qt=yes --with-system-libndp=no --enable-static=libndp --enable-bluez4=no --enable-wimax=no --enable-vala=no --enable-modify-system=no
log_timestamp "out-of-tree: make"
make $MAKE_JOBS
popd
log_timestamp "Finished out of tree build"
log_timestamp "out-of-tree: end"
fi
log_timestamp "start build"
log_timestamp "build: start"
clean_all
log_timestamp
log_timestamp "build: autogen.sh"
./autogen.sh --enable-maintainer-mode --prefix=$PWD/.INSTALL/ --with-dhclient=yes --with-dhcpcd=yes --with-crypto=nss --enable-more-warnings=error --enable-ppp=yes --enable-polkit=yes --with-session-tracking=systemd --with-suspend-resume=systemd --with-tests=yes --enable-tests=yes --with-valgrind=yes --enable-ifcfg-rh=yes --enable-ifupdown=yes --enable-ifnet=yes --enable-gtk-doc --enable-qt=yes --with-system-libndp=no --enable-static=libndp --enable-bluez4=no --enable-wimax=no --enable-vala=no --enable-modify-system=no
log_timestamp
log_timestamp "build: make"
make $MAKE_JOBS
log_timestamp
log_timestamp "build: make check"
make check
log_timestamp
make distcheck
if [[ "$DISTCHECK" == true ]]; then
log_timestamp "distcheck: start"
make distcheck
log_timestamp "distcheck: end"
elif [[ "$DIST" == true || "$RPM" == true ]]; then
log_timestamp "dist: start"
make dist
log_timestamp "dist: end"
fi
if [[ "$RPM" == true ]]; then
log_timestamp "start making RPM"
log_timestamp "rpm: start"
wget http://file.brq.redhat.com/~thaller/nmtui-0.0.1.tar.xz
git checkout origin/automation -- :/contrib/
./contrib/rpm/build.sh
log_timestamp "finished making RPM"
log_timestamp "rpm: finished"
fi
log_timestamp "finished with success"
log_timestamp "all finished with success"
git_notes_ok

View file

@ -50,6 +50,18 @@ for i in ${!ARGV[@]}; do
-R|--no-rpm)
RPM=false
;;
-d|--distcheck)
DISTCHECK=true
;;
-D|--no-distcheck)
DISTCHECK=false
;;
--dist)
DIST=true
;;
--no-dist)
DIST=false
;;
-n|--dry-run|--test)
DRY_RUN=yes
;;
@ -69,7 +81,7 @@ for i in ${!ARGV[@]}; do
OUT_OF_TREE_BUILD=no
;;
-h|--help|'-?')
echo "$0 [ -h | -r|--rpm|-R|--no-rpm | -n|--dry-run|--test|-N|-f|--no-test|--force | -c|--check-upstream|-C|--no-check-upstream | -o|--out-of-tree|-O|--no-out-of-tree ] [--] REFS"
echo "$0 [ -h | -r|--rpm|-R|--no-rpm | -n|--dry-run|--test|-N|-f|--no-test|--force | -c|--check-upstream|-C|--no-check-upstream | -o|--out-of-tree|-O|--no-out-of-tree | -d|--distcheck|-D|--no-distcheck | --dist|--no-dist ] [--] REFS"
exit 1
;;
--)
@ -110,6 +122,28 @@ else
_RPM=false
fi
if eval_bool "$DISTCHECK" 0; then
DISTCHECK=yes
_DISTCHECK=true
else
DISTCHECK=no
_DISTCHECK=false
fi
if eval_bool "$DIST" 0; then
DIST=yes
_DIST=true
else
DIST=no
_DIST=false
fi
if [[ "$DIST" == yes && "$DISTCHECK" == yes ]]; then
echo "WARNING: DIST and DISTCHECK cannot be both true. DIST will be ignored."
DIST=no
_DIST=false
fi
if [[ "${#REFS[@]}" -eq 0 ]]; then
REFS=("$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse HEAD)")
fi
@ -120,7 +154,8 @@ echo "DRY_RUN : $DRY_RUN"
echo "RPM : $RPM"
echo "NO_CHECK_UPSTREAM : $NO_CHECK_UPSTREAM"
echo "OUT_OF_TREE_BUILD : $OUT_OF_TREE_BUILD"
echo "DIST : $DIST"
echo "DISTCHECK : $DISTCHECK"
for _BRANCH in "${REFS[@]}"; do
_B="$(git rev-parse -q --verify "$_BRANCH")" || die "Error parsing revision \"$_BRANCH\""
@ -149,7 +184,7 @@ for _BRANCH in "${REFS[@]}"; do
if [[ -n "$CAUSE" ]]; then
URL_CAUSE="&cause=`url_encode "$CAUSE"`"
fi
_URL="http://10.34.131.51:8080/job/NetworkManager/buildWithParameters?token=`url_encode "$_TOKEN"`$URL_CAUSE&BRANCH=`url_encode "$_B"`&RPM=$_RPM&OUT_OF_TREE_BUILD=$_OUT_OF_TREE_BUILD"
_URL="http://10.34.131.51:8080/job/NetworkManager/buildWithParameters?token=`url_encode "$_TOKEN"`$URL_CAUSE&BRANCH=`url_encode "$_B"`&RPM=$_RPM&OUT_OF_TREE_BUILD=$_OUT_OF_TREE_BUILD&DIST=$_DIST&DISTCHECK=$_DISTCHECK"
echo
echo "BRANCH[$i0] : \"$_BRANCH\" ($_B)"
echo "CAUSE[$i0] : \"$CAUSE\""