Kiril Nesenko has uploaded a new change for review.

Change subject: Add generic code to check repoclosure
......................................................................

Add generic code to check repoclosure

Change-Id: I762abf97c9020301a388f7d83c7d1e41bdf1f062
Signed-off-by: Kiril Nesenko <knese...@redhat.com>
---
A jobs/packaging/repo_closure_check.sh
1 file changed, 133 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/jenkins refs/changes/02/24802/1

diff --git a/jobs/packaging/repo_closure_check.sh 
b/jobs/packaging/repo_closure_check.sh
new file mode 100644
index 0000000..cb6af33
--- /dev/null
+++ b/jobs/packaging/repo_closure_check.sh
@@ -0,0 +1,133 @@
+#!/bin/sh
+
+LAYOUT=""
+BASE_URL="http://resources.ovirt.org";
+
+die() {
+       local m="${1}"
+       echo "FATAL: ${m}"
+       exit 1
+}
+
+usage() {
+       cat << __EOF__  
+    ${0} [options]
+    --distribution    - Distribution you want to test
+    --layout          - Layout you want to use [old, new]
+__EOF__
+}
+
+get_opts() {
+       while [-n "${1}" ]; do
+               v="${opt#*=}"
+               shift
+               case "${opt}" in
+                       --distribution=*)
+                               DISTRIBUTION="${v}"
+                               ;;
+                       --layout=*)
+                               LAYOUT="${v}"
+                               ;;
+                       *)
+                               usage
+                               die "Wrong option"
+                               ;;
+               esac
+       done
+}
+
+validation() {
+       [ -n "${DISTRIBUTION}" ] || die "Please specify --distribution= option"
+       [ -n "${LAYOUT}" ] || die "Please specify --layout= option"
+}
+
+check_layout() {
+       if [ "${LAYOUT}" = "new" ]; then
+               el6="el6"
+               f19="f19"
+               f20="f20"
+               BASE_URL="${BASE_URL}/pub"
+       elif [ "${LAYOUT}" = "old" ]; then
+               el6="EL/6"
+               f19="Fedora/19"
+               f20="Fedora/20"
+               BASE_URL="${BASE_URL}/releases"
+       else
+               die "Please provide layout paramter"
+       fi
+}
+
+check_repo_closure() {
+       case "${DISTRIBUTION}" in
+               centos6)
+                       if [ "${EL6}" != "true" ]; then
+                               echo "SKIPPING RUN: EL6 not checked in the 
configuration"
+                               exit 0
+                       fi
+               custom_url="${BASE_URL}/${REPO_NAME}/rpm/el6"
+               repoclosure \
+                       -t \
+                       --repofrompath=check-custom,"${custom_url}" \
+                       
--repofrompath=check-base,http://centos.mirror.constant.com/6/os/x86_64/ \
+                       
--repofrompath=check-base-i386,http://centos.mirror.constant.com/6/os/i386/ \
+                       
--repofrompath=check-updates,http://centos.mirror.constant.com/6/updates/x86_64/
 \
+                       
--repofrompath=check-extras,http://centos.mirror.constant.com/6/extras/x86_64/ \
+                       
--repofrompath=check-epel,http://linux.mirrors.es.net/fedora-epel/6/x86_64/ \
+                       
--repofrompath=check-epel-testing,http://download.fedoraproject.org/pub/epel/testing/6/x86_64
 \
+                       
--repofrompath=check-glusterfs-epel,http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-6/x86_64/
 \
+                       
--repofrompath=check-glusterfs-epel-noarch,http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-6.4/noarch
 \
+                       -l check-updates \
+                       -l check-extras \
+                       -l check-epel \
+                       -l check-epel-testing \
+                       -l check-glusterfs-epel \
+                       -l check-glusterfs-noarch-epel\
+                       -l check-base \
+                       -l check-base-i386 \
+                       -r check-custom
+               ;;
+               fedora19)
+                       if [ "${F19}" != "true" ]; then
+                               echo "SKIPPING RUN: F19 not checked in the 
configuration"
+                               exit 0
+                       fi
+                       custom_url="${BASE_URL}/${REPO_NAME}/rpm/f19"
+                       repoclosure \
+                       -t \
+                               --repofrompath=check-custom,"${custom_url}" \
+                               
--repofrompath=check-fedora,http://mirrors.kernel.org/fedora/releases/19/Everything/x86_64/os/
 \
+                               
--repofrompath=check-updates,http://mirrors.servercentral.net/fedora/updates/19/x86_64/
 \
+                               
--repofrompath=check-updates-testing,http://mirrors.servercentral.net/fedora/updates/testing/19/x86_64/
 \
+                               -l check-fedora \
+                               -l check-updates \
+                               -l check-updates-testing \
+                               -r check-custom
+               ;;
+               fedora20)
+                       if [ "${F20}" != "true" ]; then
+                               echo "SKIPPING RUN: F20 not checked in the 
configuration"
+                               exit 0
+                       fi
+                       custom_url="${BASE_URL}/${REPO_NAME}/rpm/f20"
+                       repoclosure \
+                               -t \
+                               --repofrompath=check-custom,"${custom_url}" \
+                               
--repofrompath=check-fedora,http://mirrors.kernel.org/fedora/releases/20/Everything/x86_64/os/
 \
+                               
--repofrompath=check-updates,http://mirrors.servercentral.net/fedora/updates/20/x86_64/
 \
+                               
--repofrompath=check-updates-testing,http://mirrors.servercentral.net/fedora/updates/testing/20/x86_64/
 \
+                               -l check-fedora \
+                               -l check-updates \
+                               -l check-updates-testing \
+                               -r check-custom
+               ;;
+       esac
+}
+
+main() {
+       get_opts "${@}"
+       validation
+       check_layout
+       check_repo_closure
+}
+
+main "${@}"


-- 
To view, visit http://gerrit.ovirt.org/24802
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I762abf97c9020301a388f7d83c7d1e41bdf1f062
Gerrit-PatchSet: 1
Gerrit-Project: jenkins
Gerrit-Branch: master
Gerrit-Owner: Kiril Nesenko <knese...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to