From 5723b3d8df4cdd73489e7cad678beea3c628d6bc Mon Sep 17 00:00:00 2001 From: Ed Warnicke Date: Tue, 12 Apr 2016 17:27:41 -0500 Subject: [PATCH] Have merge job push rpms to the yum repo Change-Id: I0d16b75d8e8770894577659cd9b6ae0fc2140db9 Signed-off-by: Ed Warnicke --- jjb/vpp/include-raw-vpp-maven-push.sh | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/jjb/vpp/include-raw-vpp-maven-push.sh b/jjb/vpp/include-raw-vpp-maven-push.sh index 5f42cbda9..924d335af 100644 --- a/jjb/vpp/include-raw-vpp-maven-push.sh +++ b/jjb/vpp/include-raw-vpp-maven-push.sh @@ -11,10 +11,6 @@ GROUP_ID="io.fd.${PROJECT}" BASEURL="${NEXUSPROXY}/content/repositories/fd.io." BASEREPOID='fdio-' -# find the files -JARS=$(find . -type f -iname '*.jar') -DEBS=$(find . -type f -iname '*.deb') - function push_file () { push_file=$1 @@ -70,7 +66,22 @@ function push_deb () push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" deb } + +function push_rpm () +{ + rpmfile=$1 + repoId="${BASEREPOID}yum" + url="${BASEURL}yum" + basefile=$(basename -s .rpm "$rpmfile") + artifactId=$(echo "$basefile" | cut -f 1 -d '_') + version=$(echo "$basefile" | cut -f 2- -d '_') + push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" rpm +} + if [ ${OS} == "ubuntu1404" ]; then + # Find the files + JARS=$(find . -type f -iname '*.jar') + DEBS=$(find . -type f -iname '*.deb') for i in $JARS do push_jar "$i" @@ -80,5 +91,12 @@ if [ ${OS} == "ubuntu1404" ]; then do push_deb "$i" done +elif [ ${OS} == "centos7" ]; then + # Find the files + RPMS=$(find . -type f -iname '*.rpm') + for i in $RPMS + do + push_rpm "$i" + done fi # vim: ts=4 sw=4 sts=4 et ft=sh : -- 2.16.6