Have merge job push rpms to the yum repo 64/764/4
authorEd Warnicke <eaw@cisco.com>
Tue, 12 Apr 2016 22:27:41 +0000 (17:27 -0500)
committerC.J. Collier <cjcollier@linuxfoundation.org>
Tue, 12 Apr 2016 23:08:11 +0000 (23:08 +0000)
Change-Id: I0d16b75d8e8770894577659cd9b6ae0fc2140db9
Signed-off-by: Ed Warnicke <eaw@cisco.com>
jjb/vpp/include-raw-vpp-maven-push.sh

index 5f42cbd..924d335 100644 (file)
@@ -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 :