Anatoly Litovsky has uploaded a new change for review. Change subject: Adding CI automation scripts to ovirt node ......................................................................
Adding CI automation scripts to ovirt node Change-Id: I44e9bdd6d3c6361da38d181d7417c9885535ddfc Signed-off-by: Tolik Litovsky <[email protected]> --- A automation/build-artifacts.req A automation/build-artifacts.sh A automation/check-merged.req A automation/check-merged.sh A automation/check-patch.req A automation/check-patch.sh M src/autotest.py 7 files changed, 199 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/84/42584/1 diff --git a/automation/build-artifacts.req b/automation/build-artifacts.req new file mode 100755 index 0000000..35f39e2 --- /dev/null +++ b/automation/build-artifacts.req @@ -0,0 +1,15 @@ +automake +autoconf +make +python +python-devel +git +python-setuptools +dracut +python-lockfile +policycoreutils +checkpolicy +selinux-policy-devel +hardlink +selinux-policy-doc +createrepo \ No newline at end of file diff --git a/automation/build-artifacts.sh b/automation/build-artifacts.sh new file mode 100755 index 0000000..484ce22 --- /dev/null +++ b/automation/build-artifacts.sh @@ -0,0 +1,38 @@ +#!/bin/bash -xe +echo "build-artifact.sh" +#this scripts build ovirt-node and ovirt-node-is projects + +# the die on error function +function die { + echo "$1" + exit 1 +} + + +#sets the env variables required for the rest +export CACHE="$PWD"/build +export OVIRT_NODE_BASE="$PWD/.." +export OVIRT_CACHE_DIR="$CACHE" +export OVIRT_LOCAL_REPO=file://"$OVIRT_CACHE_DIR"/ovirt + + +for dir in exported-artifacts; do + rm -Rf "$dir" + mkdir -p "$dir" +done + +rm -rf "$CACHE" +cd "$OVIRT_NODE_BASE"/ovirt-node +# get rid of old makefiles + git clean -dfx +# generate new makefiles +./autogen.sh +make distclean || clean_failed=true + +./autogen.sh --with-image-minimizer +if ! make publish ; then + die "Node building failed" +fi + +rm -rf "$OVIRT_CACHE_DIR"/ovirt/RPMS/noarch/ovirt-node-plugin-rhn*.rpm +cp "$OVIRT_CACHE_DIR"/ovirt/RPMS/noarch/ovirt-node*.rpm ../exported-artifacts/ diff --git a/automation/check-merged.req b/automation/check-merged.req new file mode 100755 index 0000000..4d45611 --- /dev/null +++ b/automation/check-merged.req @@ -0,0 +1,33 @@ +automake +autoconf +make +python +python-devel +git +python-setuptools +dracut +python-lockfile +policycoreutils +checkpolicy +selinux-policy-devel +hardlink +selinux-policy-doc +createrepo +python-devel +python-mock +pykickstart +python-lockfile +python-augeas +ltrace +python-pep8 +pyflakes +python-gudev +python-urwid +PyPAM +system-config-keyboard-base +cracklib-python +libnfsidmap +libvirt +libvirt-python +python-lxml +python-nose diff --git a/automation/check-merged.sh b/automation/check-merged.sh new file mode 100755 index 0000000..5f1e661 --- /dev/null +++ b/automation/check-merged.sh @@ -0,0 +1,39 @@ +#!/bin/bash -xe +echo "check-patch.sh" +#this scripts build ovirt-node and ovirt-node-is projects + +# the die on error function +function die { + echo "$1" + exit 1 +} + + +#sets the env variables required for the rest +export CACHE="$PWD"/build +export OVIRT_NODE_BASE="$PWD/.." +export OVIRT_CACHE_DIR="$CACHE" +export OVIRT_LOCAL_REPO=file://"$OVIRT_CACHE_DIR"/ovirt + + +for dir in exported-artifacts; do + rm -Rf "$dir" + mkdir -p "$dir" +done + +rm -rf "$CACHE" +cd "$OVIRT_NODE_BASE"/ovirt-node +# get rid of old makefiles + git clean -dfx +# generate new makefiles +./autogen.sh +make distclean || clean_failed=true + +./autogen.sh --with-image-minimizer +if ! make publish ; then + die "Node building failed" +fi + +if ! make check-local ; then + die "Node check failed" +fi \ No newline at end of file diff --git a/automation/check-patch.req b/automation/check-patch.req new file mode 100755 index 0000000..4d45611 --- /dev/null +++ b/automation/check-patch.req @@ -0,0 +1,33 @@ +automake +autoconf +make +python +python-devel +git +python-setuptools +dracut +python-lockfile +policycoreutils +checkpolicy +selinux-policy-devel +hardlink +selinux-policy-doc +createrepo +python-devel +python-mock +pykickstart +python-lockfile +python-augeas +ltrace +python-pep8 +pyflakes +python-gudev +python-urwid +PyPAM +system-config-keyboard-base +cracklib-python +libnfsidmap +libvirt +libvirt-python +python-lxml +python-nose diff --git a/automation/check-patch.sh b/automation/check-patch.sh new file mode 100755 index 0000000..5f1e661 --- /dev/null +++ b/automation/check-patch.sh @@ -0,0 +1,39 @@ +#!/bin/bash -xe +echo "check-patch.sh" +#this scripts build ovirt-node and ovirt-node-is projects + +# the die on error function +function die { + echo "$1" + exit 1 +} + + +#sets the env variables required for the rest +export CACHE="$PWD"/build +export OVIRT_NODE_BASE="$PWD/.." +export OVIRT_CACHE_DIR="$CACHE" +export OVIRT_LOCAL_REPO=file://"$OVIRT_CACHE_DIR"/ovirt + + +for dir in exported-artifacts; do + rm -Rf "$dir" + mkdir -p "$dir" +done + +rm -rf "$CACHE" +cd "$OVIRT_NODE_BASE"/ovirt-node +# get rid of old makefiles + git clean -dfx +# generate new makefiles +./autogen.sh +make distclean || clean_failed=true + +./autogen.sh --with-image-minimizer +if ! make publish ; then + die "Node building failed" +fi + +if ! make check-local ; then + die "Node check failed" +fi \ No newline at end of file diff --git a/src/autotest.py b/src/autotest.py index 92644e2..a1cb865 100755 --- a/src/autotest.py +++ b/src/autotest.py @@ -22,6 +22,7 @@ import sys import re import os +import traceback def test(): parser = argparse.ArgumentParser(description="Runs doctests on a file") @@ -47,6 +48,7 @@ else: return 0 except ImportError: + traceback.print_exc() print "Failed to import %s" % arguments.FILE return -1 -- To view, visit https://gerrit.ovirt.org/42584 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44e9bdd6d3c6361da38d181d7417c9885535ddfc Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Anatoly Litovsky <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
