#!/bin/bash
-. `dirname "$(readlink -f "$0")"`/run-library.sh
+JENKINS_DIR=$(dirname $(readlink -e "$0"))
+. "$JENKINS_DIR/run-library.sh"
read -rd "\000" helpmessage <<EOF
$(basename $0): Build Arvados SSO server package
Options:
---build-bundle-packages (default: false)
- Build package with vendor/bundle included
--debug
Output debug information (default: false)
--target
EXITCODE=0
DEBUG=${ARVADOS_DEBUG:-0}
-BUILD_BUNDLE_PACKAGES=0
TARGET=debian7
PARSEDOPTS=$(getopt --name "$0" --longoptions \
--debug)
DEBUG=1
;;
- --build-bundle-packages)
- BUILD_BUNDLE_PACKAGES=1
+ --test-packages)
+ test_packages=1
;;
--)
if [ $# -gt 1 ]; then
fpm --version >/dev/null 2>&1
if [[ "$?" != 0 ]]; then
- echo >&2 "$helpmessage"
- echo >&2
- echo >&2 "Error: fpm not found"
- echo >&2
- exit 1
+ echo >&2 "$helpmessage"
+ echo >&2
+ echo >&2 "Error: fpm not found"
+ echo >&2
+ exit 1
fi
RUN_BUILD_PACKAGES_PATH="`dirname \"$0\"`"
RUN_BUILD_PACKAGES_PATH="`( cd \"$RUN_BUILD_PACKAGES_PATH\" && pwd )`" # absolutized and normalized
if [ -z "$RUN_BUILD_PACKAGES_PATH" ] ; then
- # error; for some reason, the path is not accessible
- # to the script (e.g. permissions re-evaled after suid)
- exit 1 # fail
+ # error; for some reason, the path is not accessible
+ # to the script (e.g. permissions re-evaled after suid)
+ exit 1 # fail
fi
debug_echo "$0 is running from $RUN_BUILD_PACKAGES_PATH"
GEM=gem
fi
-if [[ "$TARGET" == "centos6" ]]; then
- # CentOS6 comes with git 1.7.1, but we want at least 1.7.6
- # because we use git status --ignore in fpm-info.sh
- cd /usr/src
- install_package libcurl-devel zlib-devel wget gettext
- wget https://www.kernel.org/pub/software/scm/git/git-1.8.5.6.tar.gz
- tar xzf git-1.8.5.6.tar.gz
- cd git-1.8.5.6
- make configure
- ./configure --prefix=/usr --without-tcltk
- make all
- make install
-fi
-
# Make all files world-readable -- jenkins runs with umask 027, and has checked
# out our git tree here
chmod o+r "$WORKSPACE" -R
debug_echo "umask is" `umask`
if [[ ! -d "$WORKSPACE/packages/$TARGET" ]]; then
- mkdir -p $WORKSPACE/packages/$TARGET
+ mkdir -p "$WORKSPACE/packages/$TARGET"
fi
# Build the SSO server package
handle_rails_package arvados-sso-server "$WORKSPACE" \
- "$WORKSPACE/LICENCE" --url="https://arvados.org" \
- --description="Arvados SSO server - Arvados is a free and open source platform for big data science." \
- --license="Expat license"
+ "$WORKSPACE/LICENCE" --url="https://arvados.org" \
+ --description="Arvados SSO server - Arvados is a free and open source platform for big data science." \
+ --license="Expat license"
exit $EXITCODE