Configuring minions as single use
[ci-management.git] / jjb / vpp / include-raw-vpp-maven-push.sh
index 0cdf9bf..ce07fee 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-'
@@ -48,8 +47,8 @@ function push_jar ()
     url="${BASEURL}snapshot"
 
     basefile=$(basename -s .jar "$jarfile")
-    artifactId=$(echo "$basefile" | cut -f 1 -d '-')
-    version=$(echo "$basefile" | cut -f 2 -d '-')
+    artifactId=$(echo "$basefile" | rev | cut -d '-' -f 2-  | rev)
+    version=$(echo "$basefile" | rev | cut -d '-' -f 1  | rev)
 
     push_file "$jarfile" "$repoId" "$url" "${version}-SNAPSHOT" "$artifactId" jar
 }
@@ -57,20 +56,20 @@ function push_jar ()
 function push_deb ()
 {
     debfile=$1
-    repoId=${REPO_NAME}
+    repoId="fd.io.${REPO_NAME}"
     url="${BASEURL}${REPO_NAME}"
 
     basefile=$(basename -s .deb "$debfile")
     artifactId=$(echo "$basefile" | cut -f 1 -d '_')
     version=$(echo "$basefile" | cut -f 2- -d '_')
 
-    push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" deb
+    push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" deb deb
 }
 
 function push_rpm ()
 {
     rpmfile=$1
-    repoId=${REPO_NAME}
+    repoId="fd.io.${REPO_NAME}"
     url="${BASEURL}${REPO_NAME}"
 
     if grep -qE '\.s(rc\.)?rpm' <<<"$rpmfile"