summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Warnicke <eaw@cisco.com>2016-04-12 17:27:41 -0500
committerC.J. Collier <cjcollier@linuxfoundation.org>2016-04-12 23:08:11 +0000
commit5723b3d8df4cdd73489e7cad678beea3c628d6bc (patch)
tree36576029e7edc9aca23950bddc356a7a66810642
parentf597ae816b1e5ef25a2fbb9da5f1d09095798745 (diff)
Have merge job push rpms to the yum repo
Change-Id: I0d16b75d8e8770894577659cd9b6ae0fc2140db9 Signed-off-by: Ed Warnicke <eaw@cisco.com>
-rw-r--r--jjb/vpp/include-raw-vpp-maven-push.sh26
1 files 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 :