Add very rudimentary support for pushing the rpm packages into a yum
authorWard Vandewege <ward@curoverse.com>
Fri, 12 Jun 2015 15:07:44 +0000 (11:07 -0400)
committerWard Vandewege <ward@curoverse.com>
Fri, 12 Jun 2015 15:07:44 +0000 (11:07 -0400)
repository.

No issue #

jenkins/run-build-packages.sh

index f7f74e950ac72aad8f2c166e0bc66791eed32803..8ad56498db49a3eb970621320dd15dcb2fcae663 100755 (executable)
@@ -240,10 +240,14 @@ verify_and_scp_deb () {
   else
     if [[ ! $FPM_RESULTS =~ "File already exists" ]]; then
       if [[ "$FPM_EXIT_CODE" != "0" ]]; then
-        echo "Error building debian package for $1:\n $FPM_RESULTS"
+        echo "Error building package for $1:\n $FPM_RESULTS"
       else
         if [[ "$UPLOAD" != 0 ]]; then
-          scp -P2222 $FPM_PACKAGE_NAME $APTUSER@$APTSERVER:tmp/
+          if [[ "$FORMAT" == 'deb' ]]; then
+            scp -P2222 $FPM_PACKAGE_NAME $APTUSER@$APTSERVER:tmp/
+          else
+            scp -P2222 $FPM_PACKAGE_NAME $APTUSER@$APTSERVER:rpm/
+          fi
           CALL_FREIGHT=1
         fi
       fi
@@ -647,7 +651,11 @@ verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
 
 # Finally, publish the packages, if necessary
 if [[ "$UPLOAD" != 0 && "$CALL_FREIGHT" != 0 ]]; then
-  ssh -p2222 $APTUSER@$APTSERVER -t "cd tmp && ls -laF *deb && freight add *deb apt/wheezy && freight cache && rm -f *deb"
+  if [[ "$FORMAT" == 'deb' ]]; then
+    ssh -p2222 $APTUSER@$APTSERVER -t "cd tmp && ls -laF *deb && freight add *deb apt/wheezy && freight cache && rm -f *deb"
+  else
+    ssh -p2222 $APTUSER@$APTSERVER -t "cd rpm && ls -laF *rpm && mv *rpm /var/www/rpm.arvados.org/CentOS/6/os/x86_64/ && createrepo /var/www/rpm.arvados.org/CentOS/6/os/x86_64/"
+  fi
 else
   if [[ "$UPLOAD" != 0 ]]; then
     echo "No new packages generated. No freight run necessary."