X-Git-Url: https://git.arvados.org/arvados-dev.git/blobdiff_plain/1530c4fdb9c691ac378ebc67ff3c5775f2f9ee9b..91e919d5ef0dc210dc1e4c9c150acb7b082ce92a:/jenkins/run-build-packages.sh diff --git a/jenkins/run-build-packages.sh b/jenkins/run-build-packages.sh index 878a9c2..621df96 100755 --- a/jenkins/run-build-packages.sh +++ b/jenkins/run-build-packages.sh @@ -5,7 +5,7 @@ read -rd "\000" helpmessage </dev/null 2>&1 + +if [[ "$?" != 0 ]]; then + echo >&2 "$helpmessage" + echo >&2 + echo >&2 "Error: fpm not found" + echo >&2 + exit 1 +fi + if [[ "$DEBUG" != 0 ]]; then echo "Workspace is $WORKSPACE" fi @@ -114,7 +125,7 @@ build_and_scp_deb () { PACKAGE_TYPE='python' fi - declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege " "-s" "$PACKAGE_TYPE" "-t" "deb") + declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege " "-s" "$PACKAGE_TYPE" "-t" "deb" "-x" "usr/local/lib/python2.7/dist-packages/tests") if [[ "$PACKAGE_NAME" != "$PACKAGE" ]]; then COMMAND_ARR+=('-n' "$PACKAGE_NAME") @@ -150,7 +161,7 @@ build_and_scp_deb () { if [[ "$FPM_PACKAGE_NAME" == "" ]]; then EXITCODE=1 - echo "Error: Unable to figure out package name from fpm results:" + echo "Error: $PACKAGE: Unable to figure out package name from fpm results:" echo echo $FPM_RESULTS echo @@ -176,6 +187,9 @@ source /etc/profile.d/rvm.sh # out our git tree here chmod o+r "$WORKSPACE" -R +# More cleanup - make sure all executables that we'll package are 755 +find -type d -name 'bin' |xargs -I {} find {} -type f |xargs -I {} chmod 755 {} + # Now fix our umask to something better suited to building and publishing # gems and packages umask 0022 @@ -235,7 +249,9 @@ fi cd "$WORKSPACE" -GIT_HASH=`git log --format=format:%ct.%h -n1 .` +GIT_TIMESTAMP=`git log --first-parent --max-count=1 --format=format:%ct -n1 .` +HUMAN_READABLE_TIMESTAMP=`TZ=UTC date -d @$GIT_TIMESTAMP +%Y%m%d%H%M%S` +GIT_HASH=`git log --first-parent --max-count=1 --format=format:$HUMAN_READABLE_TIMESTAMP.%h -n1 .` cd sdk/python handle_python_package @@ -278,7 +294,7 @@ fi # Build arvados src deb package cd $WORKSPACE/debs -build_and_scp_deb $WORKSPACE/src-build-dir/=/usr/local/arvados/src arvados-src 'Curoverse, Inc.' 'dir' "0.1.$GIT_HASH" "-x 'usr/local/arvados/src/.git*'" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=The Arvados source code" "--architecture=all" +build_and_scp_deb $WORKSPACE/src-build-dir/=/usr/local/arvados/src arvados-src 'Curoverse, Inc.' 'dir' "0.1.$GIT_HASH" "--exclude=usr/local/arvados/src/.git" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=The Arvados source code" "--architecture=all" # clean up, check out master and step away from detached-head state cd "$WORKSPACE/src-build-dir" @@ -329,12 +345,11 @@ cd $WORKSPACE/debs build_and_scp_deb $WORKSPACE/services/nodemanager arvados-node-manager 'Curoverse, Inc.' 'python' "$(awk '($1 == "Version:"){print $2}' $WORKSPACE/services/nodemanager/arvados_node_manager.egg-info/PKG-INFO)" "--url=https://arvados.org" "--description=The Arvados node manager" # A few dependencies -build_and_scp_deb python-gflags -build_and_scp_deb pyvcf -build_and_scp_deb google-api-python-client -build_and_scp_deb httplib2 -build_and_scp_deb ws4py -build_and_scp_deb virtualenv +for deppkg in python-gflags pyvcf google-api-python-client oauth2client \ + pyasn1 pyasn1-modules rsa uritemplate httplib2 ws4py virtualenv \ + pykka apache-libcloud requests six; do + build_and_scp_deb "$deppkg" +done # Finally, publish the packages, if necessary if [[ "$UPLOAD" != 0 && "$CALL_FREIGHT" != 0 ]]; then