Petr Horáček has uploaded a new change for review. Change subject: automation: add build_artifacts ......................................................................
automation: add build_artifacts Change automation structure according to new CI standard. Add build-artifacts.sh which build all required packages. check-patch.sh then run PEP8, Pyflakes and unit tests. If specfile was changed, it tries to install builded packages as well. TODO link to jenkins changes Change-Id: Ia29761aa2ec920db4485bf704926b67e0d9851b1 Signed-off-by: Petr Horáček <[email protected]> --- A automation/build-artifacts.packages A automation/build-artifacts.repos.el7 A automation/build-artifacts.repos.fc21 A automation/build-artifacts.repos.fc22 A automation/build-artifacts.sh M automation/check-patch.packages A automation/check-patch.repos.el7 A automation/check-patch.repos.fc21 A automation/check-patch.repos.fc22 M automation/check-patch.sh 10 files changed, 94 insertions(+), 56 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/46135/1 diff --git a/automation/build-artifacts.packages b/automation/build-artifacts.packages new file mode 100644 index 0000000..5adda85 --- /dev/null +++ b/automation/build-artifacts.packages @@ -0,0 +1,20 @@ +autoconf +automake +gcc +git +libguestfs-tools-c +m2crypto +make +mom +policycoreutils-python +pyflakes +python-blivet +python-devel +python-inotify +python-ioprocess +python-netaddr +python-nose +python-pep8 +python-pthreading +python-six +rpm-build diff --git a/automation/build-artifacts.repos.el7 b/automation/build-artifacts.repos.el7 new file mode 100644 index 0000000..8c8de34 --- /dev/null +++ b/automation/build-artifacts.repos.el7 @@ -0,0 +1,2 @@ +ovirt-snapshot,http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/$distro +ovirt-glusterfs-epel,http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-7/x86_64 diff --git a/automation/build-artifacts.repos.fc21 b/automation/build-artifacts.repos.fc21 new file mode 100644 index 0000000..a80e9aa --- /dev/null +++ b/automation/build-artifacts.repos.fc21 @@ -0,0 +1,2 @@ +ovirt-snapshot,http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/$distro +ovirt-glusterfs-fedora,http://download.gluster.org/pub/gluster/glusterfs/LATEST/Fedora/fedora-21/x86_64 diff --git a/automation/build-artifacts.repos.fc22 b/automation/build-artifacts.repos.fc22 new file mode 100644 index 0000000..47b6979 --- /dev/null +++ b/automation/build-artifacts.repos.fc22 @@ -0,0 +1,2 @@ +ovirt-snapshot,http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/$distro +ovirt-glusterfs-fedora,http://download.gluster.org/pub/gluster/glusterfs/LATEST/Fedora/fedora-22/x86_64 diff --git a/automation/build-artifacts.sh b/automation/build-artifacts.sh new file mode 100755 index 0000000..a958c2e --- /dev/null +++ b/automation/build-artifacts.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -xe + +BUILDS=$PWD/rpmbuild +EXPORTS=$PWD/exported-artifacts + +rm -rf "$BUILDS" "$EXPORTS" +mkdir -p "$EXPORTS" + +./autogen.sh --system --enable-hooks +make clean +make +# tests will be done elsewhere +make PYFLAKES=false PEP8=false NOSE_EXCLUDE=.* rpm + +find "$BUILDS" \ + -iname \*.rpm \ + -exec mv {} "$EXPORTS/" \; +find "$PWD" \ + -maxdepth 1 \ + -iname vdsm\*.tar.gz \ + -exec mv {} "$EXPORTS/" \; diff --git a/automation/check-patch.packages b/automation/check-patch.packages index afe7069..12ac3d8 100644 --- a/automation/check-patch.packages +++ b/automation/check-patch.packages @@ -1,51 +1,22 @@ -yum -sudo -dhclient -autoreconf -gettext-devel -make -automake -pyflakes -python-pep8 -libvirt-python -python-blivet -python-devel -python-nose -sanlock-python -python-ordereddict -python-pthreading -libselinux-python -python-ethtool -m2crypto -python-dmidecode -python-netaddr -python-inotify -python-argparse -git -python-cpopen -bridge-utils -libguestfs-tools-c -pyparted -openssl -libnl -libtool -gettext-devel -python-ioprocess autoconf automake -pyflakes -logrotate gcc -python-pep8 -libvirt-python -python-devel -python-nose -rpm-build -sanlock-python -genisoimage -libnl3 -policycoreutils-python -python-simplejson -python-blivet -python-six +git +libguestfs-tools-c +m2crypto +make mom +policycoreutils-python +pyflakes +python-blivet +python-devel +python-inotify +python-ioprocess +python-netaddr +python-nose +python-pep8 +python-pthreading +python-six +rpm-build +sudo +yum diff --git a/automation/check-patch.repos.el7 b/automation/check-patch.repos.el7 new file mode 100644 index 0000000..02b4845 --- /dev/null +++ b/automation/check-patch.repos.el7 @@ -0,0 +1,4 @@ +ovirt-snapshot,http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/$distro +ovirt-snapshot-static,http://resources.ovirt.org/pub/ovirt-master-snapshot-static/rpm/$distro +ovirt-glusterfs-epel,http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-7/x86_64 +openstack-juno,https://repos.fedorapeople.org/repos/openstack/openstack-juno/epel-7/ diff --git a/automation/check-patch.repos.fc21 b/automation/check-patch.repos.fc21 new file mode 100644 index 0000000..16ae431 --- /dev/null +++ b/automation/check-patch.repos.fc21 @@ -0,0 +1,3 @@ +ovirt-snapshot,http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/$distro +ovirt-snapshot-static,http://resources.ovirt.org/pub/ovirt-master-snapshot-static/rpm/$distro +ovirt-glusterfs-fedora,http://download.gluster.org/pub/gluster/glusterfs/LATEST/Fedora/fedora-21/x86_64 diff --git a/automation/check-patch.repos.fc22 b/automation/check-patch.repos.fc22 new file mode 100644 index 0000000..01396e5 --- /dev/null +++ b/automation/check-patch.repos.fc22 @@ -0,0 +1,3 @@ +ovirt-snapshot,http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/$distro +ovirt-snapshot-static,http://resources.ovirt.org/pub/ovirt-master-snapshot-static/rpm/$distro +ovirt-glusterfs-fedora,http://download.gluster.org/pub/gluster/glusterfs/LATEST/Fedora/fedora-22/x86_64 diff --git a/automation/check-patch.sh b/automation/check-patch.sh index 68a3083..11f24e1 100755 --- a/automation/check-patch.sh +++ b/automation/check-patch.sh @@ -1,16 +1,24 @@ -#!/bin/bash -e -# -# Run on each patch to gerrit, should be faster than check-meged and require -# less resources but thorough enough to provide relevant feedback +#!/bin/bash -# Nose 1.3.0 and later segatult with this flag -#export NOSE_WITH_XUNIT=1 +set -xe export NOSE_SKIP_STRESS_TESTS=1 + # this redefines 'ugly' but looks like NOSE_EXCLUDE works at test method level, # not at module neither at testcase level, so we have no choice but this. -export NOSE_EXCLUDE=".*testGetBondingOptions.*|testMirroring.*|testToggleIngress|testException|testQdiscsOfDevice|testReplacePrio" +export NOSE_EXCLUDE="\ +.*testGetBondingOptions.*|\ +testMirroring.*|\ +testToggleIngress|\ +testException|\ +testQdiscsOfDevice|\ +testReplacePrio\ +" -sh -x autogen.sh --system -make all +./automation/build-artifacts.sh make check + +# if specfile was changed, try to install all builded packages +if git diff-tree --no-commit-id --name-only -r HEAD | grep --quiet 'vdsm.spec.in' ; then + yum -y install exported-artifacts/*.rpm +fi -- To view, visit https://gerrit.ovirt.org/46135 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia29761aa2ec920db4485bf704926b67e0d9851b1 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
