Merge "CSIT-311 Ph3: remove perf tests from semiweekly"
[ci-management.git] / jjb / vpp / include-raw-vpp-maven-push.sh
index a8b03f6..0e9c334 100644 (file)
@@ -1,12 +1,11 @@
 #!/bin/bash
+set -xe -o pipefail
+echo "*******************************************************************"
+echo "* STARTING PUSH OF PACKAGES TO REPOS"
+echo "* NOTHING THAT HAPPENS BELOW THIS POINT IS RELATED TO BUILD FAILURE"
+echo "*******************************************************************"
 
-# Determine the path to maven
-if [ -z "${MAVEN_SELECTOR}" ]; then
-    echo "ERROR: No Maven install detected!"
-    exit 1
-fi
-
-MVN="${HOME}/tools/hudson.tasks.Maven_MavenInstallation/${MAVEN_SELECTOR}/bin/mvn"
+MVN="/opt/apache/maven/bin/mvn"
 GROUP_ID="io.fd.${PROJECT}"
 BASEURL="${NEXUSPROXY}/content/repositories/fd.io."
 BASEREPOID='fdio-'
@@ -57,8 +56,8 @@ function push_jar ()
 function push_deb ()
 {
     debfile=$1
-    repoId="${BASEREPOID}dev"
-    url="${BASEURL}dev"
+    repoId="fd.io.${REPO_NAME}"
+    url="${BASEURL}${REPO_NAME}"
 
     basefile=$(basename -s .deb "$debfile")
     artifactId=$(echo "$basefile" | cut -f 1 -d '_')
@@ -70,8 +69,8 @@ function push_deb ()
 function push_rpm ()
 {
     rpmfile=$1
-    repoId="${BASEREPOID}yum"
-    url="${BASEURL}yum"
+    repoId="fd.io.${REPO_NAME}"
+    url="${BASEURL}${REPO_NAME}"
 
     if grep -qE '\.s(rc\.)?rpm' <<<"$rpmfile"
     then
@@ -93,6 +92,12 @@ if [ "${OS}" == "ubuntu1404" ]; then
         push_jar "$i"
     done
 
+    for i in $DEBS
+    do
+        push_deb "$i"
+    done
+elif [ "${OS}" == "ubuntu1604" ]; then
+    DEBS=$(find . -type f -iname '*.deb')
     for i in $DEBS
     do
         push_deb "$i"