From 6a1cd98fc300b26c047205fc0003b8aa65c7d18d Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 25 Oct 2011 23:38:17 +0200 Subject: [PATCH] only try to build oot-modules if the package is oot-source packge, fix scp upload path, fail on error --- build-oot.sh | 3 ++- debian_build.py | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/build-oot.sh b/build-oot.sh index 4a51db1..6ac3ab0 100755 --- a/build-oot.sh +++ b/build-oot.sh @@ -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 diff --git a/debian_build.py b/debian_build.py index 9c29f9d..68398e0 100755 --- a/debian_build.py +++ b/debian_build.py @@ -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() + -- 2.39.5