#!/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
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
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")
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()
+