]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
only try to build oot-modules if the package is oot-source packge, fix scp upload...
authorHolger Levsen <holger@layer-acht.org>
Tue, 25 Oct 2011 21:38:17 +0000 (23:38 +0200)
committerHolger Levsen <holger@layer-acht.org>
Tue, 25 Oct 2011 21:38:17 +0000 (23:38 +0200)
build-oot.sh
debian_build.py

index 4a51db12f5ca6cbc156a92df7d4f38c406855e58..6ac3ab01405f25ebb763621b5969800cdb5e73dc 100755 (executable)
@@ -43,6 +43,7 @@ cat > $TMPFILE << EOF
 #!/bin/sh
 # this is $TMPFILE
 
+       set +x
         set -e
         apt-get update
         apt-get -y install openssh-client linux-source-profitbricks-$PB_FLAVOUR $OOT_MODULE-source linux-image-profitbricks-$PB_FLAVOUR
@@ -58,7 +59,7 @@ cat > $TMPFILE << EOF
         cd /usr/src/
         ls *deb
        # FIXME: this is soooo just wrong...
-       scp -o "StrictHostKeyChecking no" -i /root/.ssh/id_rsa_jenkins *.deb reprepro@alexandria.profitbricks.localdomain:/srv/profitbricks-repository/incoming/profitbricks/$PB_SUITE/
+       scp -o "StrictHostKeyChecking no" -i /root/.ssh/id_rsa_jenkins *.deb reprepro@alexandria.profitbricks.localdomain:/srv/profitbricks-repository/incoming/$PB_SUITE/
 
 EOF
 cat $TMPFILE
index 9c29f9d282c3d079f6e27ef8b91bab42391336c0..68398e09e8adad3c5f7472c39722709f68d974a8 100755 (executable)
@@ -480,7 +480,14 @@ if __name__ == '__main__':
             fh.close()
             # upload
             dput_package_upload(changes_file)
-            # build oot binary modules for all defined flavours
+        except Exception, error:
+            logger.exception(error)
+            exit_error()
+
+        # build out-of-tree kernel module binary packages for all defined 
+        # flavours (if the package is a oot-source package)
+        FLAVOURS_FILE=os.path.join(GIT_TARGET_WORKSPACE, GIT_REPO_NAME, "debian/pb_flavours")
+        if os.path.exists(FLAVOURS_FILE):
             logger.info('Sleeping for 60 sec. so reprepro can process upload....')
             time.sleep(60) # give reprepro time to process
             FLAVOURS_FILE=os.path.join(GIT_TARGET_WORKSPACE, GIT_REPO_NAME, "debian/pb_flavours")
@@ -495,8 +502,9 @@ if __name__ == '__main__':
                 ret = os.system('%s' %(' '.join(cmd)))
                 if ret:
                     logger_loud_error('"%s" returned non-zero (exitcode was: %s).' % (' '.join(cmd), ret))
+                    logger.exception(error)
+                    exit_error()
             fh.close()
-            exit_ok()
-        except Exception, error:
-            logger.exception(error)
-            exit_error()
+
+        exit_ok()
+