[ARVADOS-DEV] updated: 1c82c1f875ca2681ff36e804fde8f6beb8f36c77
git at public.curoverse.com
git at public.curoverse.com
Mon Sep 28 21:00:58 EDT 2015
Summary of changes:
.../arvados-sso-server.postinst | 13 ++--
jenkins/run-build-packages-sso.sh | 4 +-
jenkins/run-test-packages-sso.sh | 81 +++++++++++++++++-----
3 files changed, 71 insertions(+), 27 deletions(-)
via 1c82c1f875ca2681ff36e804fde8f6beb8f36c77 (commit)
from 9ac3e54bc97741867159976495d723a06f2cf28d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 1c82c1f875ca2681ff36e804fde8f6beb8f36c77
Author: Ward Vandewege <ward at curoverse.com>
Date: Mon Sep 28 21:00:32 2015 -0400
More fixes for the SSO server packages.
refs #7330
diff --git a/jenkins/arvados-sso-server-extras/arvados-sso-server.postinst b/jenkins/arvados-sso-server-extras/arvados-sso-server.postinst
index ecd9b44..436f5bd 100755
--- a/jenkins/arvados-sso-server-extras/arvados-sso-server.postinst
+++ b/jenkins/arvados-sso-server-extras/arvados-sso-server.postinst
@@ -6,6 +6,7 @@ INSTALL_PATH=/var/www/arvados-sso
RELEASE_PATH=$INSTALL_PATH/current
SHARED_PATH=$INSTALL_PATH/shared
CONFIG_PATH=/etc/arvados/sso
+PACKAGE_NAME=arvados-sso-server
DATABASE_READY=1
APPLICATION_READY=1
@@ -78,8 +79,8 @@ EOF
echo
echo "Assumption: $WEB_SERVICE is configured to serve your SSO server URL from"
- echo " /var/www/arvados-sso/current"
- echo "Assumption: configuration files are in /etc/arvados/sso/"
+ echo " $RELEASE_PATH"
+ echo "Assumption: configuration files are in $CONFIG_PATH"
echo "Assumption: $WEB_SERVICE and passenger run as $WWW_OWNER"
echo
@@ -211,8 +212,8 @@ if [ "$DATABASE_READY" = "0" ]; then
PLEASE NOTE:
-The arvados-sso package was not configured completely because
-/etc/arvados/database.yml needs some tweaking. Please refer to the
+The $PACKAGE_NAME package was not configured completely because
+$CONFIG_PATH/database.yml needs some tweaking. Please refer to the
documentation at http://doc.arvados.org/install/install-sso.html#configure for
more details.
@@ -225,8 +226,8 @@ if [ "$APPLICATION_READY" = "0" ]; then
PLEASE NOTE:
-The arvados-sso package was not configured completely because
-/etc/arvados/application.yml needs some tweaking. Please refer to the
+The $PACKAGE_NAME package was not configured completely because
+$CONFIG_PATH/application.yml needs some tweaking. Please refer to the
documentation at http://doc.arvados.org/install/install-sso.html#configure for
more details.
diff --git a/jenkins/run-build-packages-sso.sh b/jenkins/run-build-packages-sso.sh
index 8d1de52..2550135 100755
--- a/jenkins/run-build-packages-sso.sh
+++ b/jenkins/run-build-packages-sso.sh
@@ -3,7 +3,7 @@
. `dirname "$(readlink -f "$0")"`/run-library.sh
read -rd "\000" helpmessage <<EOF
-$(basename $0): Build Arvados SSO package
+$(basename $0): Build Arvados SSO server package
Syntax:
WORKSPACE=/path/to/arvados-sso $(basename $0) [options]
@@ -173,7 +173,7 @@ fi
cd "$WORKSPACE"
SSO_VERSION=$(version_from_git)
-PACKAGE_NAME=arvados-sso
+PACKAGE_NAME=arvados-sso-server
if [[ ! -d "$WORKSPACE/tmp" ]]; then
mkdir $WORKSPACE/tmp
diff --git a/jenkins/run-test-packages-sso.sh b/jenkins/run-test-packages-sso.sh
index 02e1b04..03d4a96 100755
--- a/jenkins/run-test-packages-sso.sh
+++ b/jenkins/run-test-packages-sso.sh
@@ -110,17 +110,29 @@ if ! [[ -d "$WORKSPACE" ]]; then
exit 1
fi
+title () {
+ txt="********** $1 **********"
+ printf "\n%*s%s\n\n" $((($COLUMNS-${#txt})/2)) "" "$txt"
+}
+
+checkexit() {
+ if [[ "$1" != "0" ]]; then
+ title "!!!!!! $2 FAILED !!!!!!"
+ fi
+}
+
+
# Find the SSO server package
cd "$WORKSPACE"
SSO_VERSION=$(version_from_git)
-PACKAGE_NAME=arvados-sso
+PACKAGE_NAME=arvados-sso-server
if [[ "$FORMAT" == "deb" ]]; then
- PACKAGE_PATH=$WORKSPACE/packages/$TARGET/arvados-sso_${SSO_VERSION}_amd64.deb
+ PACKAGE_PATH=$WORKSPACE/packages/$TARGET/${PACKAGE_NAME}_${SSO_VERSION}_amd64.deb
elif [[ "$FORMAT" == "rpm" ]]; then
- PACKAGE_PATH=$WORKSPACE/packages/$TARGET/arvados-sso-${SSO_VERSION}-1.x86_64.rpm
+ PACKAGE_PATH=$WORKSPACE/packages/$TARGET/${PACKAGE_NAME}-${SSO_VERSION}-1.x86_64.rpm
fi
# Test 1a: the package to test must exist
@@ -132,9 +144,9 @@ fi
if [[ "$FORMAT" == "deb" ]]; then
# Test 1b: the system/container where we're running the tests must be clean
set +e
- dpkg -l |grep arvados-sso -q
+ dpkg -l |grep $PACKAGE_NAME -q
if [[ "$?" != "1" ]]; then
- echo "Please make sure the arvados-sso package is not installed before running this script"
+ echo "Please make sure the $PACKAGE_NAME package is not installed before running this script"
exit 1
fi
set -e
@@ -209,42 +221,73 @@ if [[ "$FORMAT" == "deb" ]]; then
$SUDO dpkg -i $PACKAGE_PATH > /dev/null 2>&1
$SUDO apt-get -f install --yes
set -e
- $SUDO dpkg -i $PACKAGE_PATH
+ $SUDO dpkg -i $PACKAGE_PATH || EXITCODE=2
+
+ checkexit $EXITCODE "dpkg -i $PACKAGE_PATH"
# Test 3: the package should remove cleanly
- $SUDO apt-get remove arvados-sso --yes
+ $SUDO apt-get remove $PACKAGE_NAME --yes || EXITCODE=3
+
+ checkexit $EXITCODE "apt-get remove $PACKAGE_PATH --yes"
# Test 4: the package configuration should remove cleanly
- $SUDO dpkg --purge arvados-sso
+ $SUDO dpkg --purge $PACKAGE_NAME || EXITCODE=4
+
+ checkexit $EXITCODE "dpkg --purge $PACKAGE_PATH"
if [[ -e "/var/www/arvados-sso" ]]; then
- echo "Error: leftover items under /var/www/arvados-sso."
- exit 4
+ EXITCODE=4
fi
+ checkexit $EXITCODE "leftover items under /var/www/arvados-sso"
+
# Test 5: the package should remove cleanly with --purge
- $SUDO dpkg -i $PACKAGE_PATH
- $SUDO apt-get remove arvados-sso --purge --yes
+ $SUDO dpkg -i $PACKAGE_PATH || EXITCODE=5
+
+ checkexit $EXITCODE "dpkg -i $PACKAGE_PATH"
+
+ $SUDO apt-get remove $PACKAGE_NAME --purge --yes || EXITCODE=5
+
+ checkexit $EXITCODE "apt-get remove $PACKAGE_PATH --purge --yes"
if [[ -e "/var/www/arvados-sso" ]]; then
- echo "Error: leftover items under /var/www/arvados-sso."
- exit 5
+ EXITCODE=5
fi
+ checkexit $EXITCODE "leftover items under /var/www/arvados-sso"
+
elif [[ "$FORMAT" == "rpm" ]]; then
+
+ # Set up Nginx first
+ # (courtesy of https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/el6/install_passenger.html)
+ $SUDO yum install -q -y epel-release pygpgme curl
+ $SUDO curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
+ $SUDO yum install -q -y nginx passenger
+ $SUDO sed -i -e 's/^# passenger/passenger/' /etc/nginx/conf.d/passenger.conf
+ # Done setting up Nginx
+
# Test 2: the package should install cleanly
- $SUDO yum -q -y --nogpgcheck localinstall $PACKAGE_PATH
+ $SUDO yum -q -y --nogpgcheck localinstall $PACKAGE_PATH || EXITCODE=3
+
+ checkexit $EXITCODE "yum -q -y --nogpgcheck localinstall $PACKAGE_PATH"
# Test 3: the package should remove cleanly
- $SUDO yum -q -y remove arvados-sso
+ $SUDO yum -q -y remove $PACKAGE_NAME || EXITCODE=3
+
+ checkexit $EXITCODE "yum -q -y remove $PACKAGE_PATH"
if [[ -e "/var/www/arvados-sso" ]]; then
- echo "Error: leftover items under /var/www/arvados-sso."
- exit 3
+ EXITCODE=3
fi
+ checkexit $EXITCODE "leftover items under /var/www/arvados-sso"
+
fi
-echo "Testing complete, no errors!"
+if [[ "$EXITCODE" == "0" ]]; then
+ echo "Testing complete, no errors!"
+else
+ echo "Errors while testing!"
+fi
exit $EXITCODE
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list