[ARVADOS-DEV] updated: c21753f5f91a3144395f4b259b09fb16b39b4b2d

git at public.curoverse.com git at public.curoverse.com
Sun Sep 27 12:59:49 EDT 2015


Summary of changes:
 .../arvados-sso-server.postinst                    |  6 ------
 .../arvados-sso-server.postrm                      | 22 ++++++++++++++++++++++
 .../arvados-sso-server.prerm                       | 22 ++++++++++++++++++++++
 jenkins/arvados-sso-server-extras/prerm.sh         | 10 ----------
 jenkins/run-build-packages-sso.sh                  |  2 +-
 5 files changed, 45 insertions(+), 17 deletions(-)
 create mode 100755 jenkins/arvados-sso-server-extras/arvados-sso-server.postrm
 create mode 100755 jenkins/arvados-sso-server-extras/arvados-sso-server.prerm
 delete mode 100755 jenkins/arvados-sso-server-extras/prerm.sh

       via  c21753f5f91a3144395f4b259b09fb16b39b4b2d (commit)
      from  656b5e388467792f437caf1afa032dd4d36b2eb1 (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 c21753f5f91a3144395f4b259b09fb16b39b4b2d
Author: Ward Vandewege <ward at curoverse.com>
Date:   Sun Sep 27 11:22:32 2015 -0400

    Add prerm and postrm scripts, various cleanups.
    
    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 383d25c..e6db44c 100755
--- a/jenkins/arvados-sso-server-extras/arvados-sso-server.postinst
+++ b/jenkins/arvados-sso-server-extras/arvados-sso-server.postinst
@@ -108,8 +108,6 @@ EOF
   chmod 644 $SHARED_PATH/log/*
   echo "... done."
 
-  ls -laF $RELEASE_PATH/tmp
-
   # If we use `grep -q`, rake will write a backtrace on EPIPE.
   if $COMMAND_PREFIX bundle exec rake db:migrate:status | grep '^database: ' >/dev/null; then
       echo -n "Running db:migrate ..."
@@ -124,16 +122,12 @@ EOF
   fi
   echo "... done."
 
-  ls -laF $RELEASE_PATH/tmp
-
   echo -n "Precompiling assets ..."
   # precompile assets; thankfully this does not take long
   $COMMAND_PREFIX bundle exec rake assets:precompile -q -s || exit $?
   chown -R "$WWW_OWNER" $RELEASE_PATH/tmp
   echo "... done."
 
-  ls -laF $RELEASE_PATH/tmp
-
   echo -n "Restarting nginx ..."
   service "$NGINX_SERVICE" restart || exit $?
   echo "... done."
diff --git a/jenkins/arvados-sso-server-extras/arvados-sso-server.postrm b/jenkins/arvados-sso-server-extras/arvados-sso-server.postrm
new file mode 100755
index 0000000..1d73a68
--- /dev/null
+++ b/jenkins/arvados-sso-server-extras/arvados-sso-server.postrm
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+INSTALL_PATH=/var/www/arvados-sso
+RELEASE_PATH=$INSTALL_PATH/current
+SHARED_PATH=$INSTALL_PATH/shared
+CONFIG_PATH=/etc/arvados/sso
+
+purge () {
+  rm -rf $SHARED_PATH/vendor_bundle
+  rm -rf $SHARED_PATH/log
+  rmdir $SHARED_PATH || true
+  rmdir $INSTALL_PATH || true
+}
+
+if [ "$1" = 'purge' ]; then
+  purge
+fi
+
+
+
diff --git a/jenkins/arvados-sso-server-extras/arvados-sso-server.prerm b/jenkins/arvados-sso-server-extras/arvados-sso-server.prerm
new file mode 100755
index 0000000..677a6ac
--- /dev/null
+++ b/jenkins/arvados-sso-server-extras/arvados-sso-server.prerm
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+INSTALL_PATH=/var/www/arvados-sso
+RELEASE_PATH=$INSTALL_PATH/current
+SHARED_PATH=$INSTALL_PATH/shared
+CONFIG_PATH=/etc/arvados/sso
+
+remove () {
+  rm -f $RELEASE_PATH/config/database.yml
+  rm -f $RELEASE_PATH/config/environments/production.rb
+  rm -f $RELEASE_PATH/config/application.yml
+  rm -rf $RELEASE_PATH/public/assets/
+  rm -rf $RELEASE_PATH/tmp
+  rm -rf $RELEASE_PATH/.bundle
+  rm $RELEASE_PATH/log
+}
+
+if [ "$1" = 'remove' ]; then
+  remove
+fi
diff --git a/jenkins/arvados-sso-server-extras/prerm.sh b/jenkins/arvados-sso-server-extras/prerm.sh
deleted file mode 100755
index b1280b8..0000000
--- a/jenkins/arvados-sso-server-extras/prerm.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-RELEASE_PATH=/var/www/arvados-sso/current
-rm -f $RELEASE_PATH/config/database.yml
-rm -f $RELEASE_PATH/config/environments/production.rb
-rm -f $RELEASE_PATH/config/application.yml
-rm -rf $RELEASE_PATH/public/assets/
-rm -rf $RELEASE_PATH/tmp
-rm $RELEASE_PATH/log
-
diff --git a/jenkins/run-build-packages-sso.sh b/jenkins/run-build-packages-sso.sh
index 6c3c03b..ada7a82 100755
--- a/jenkins/run-build-packages-sso.sh
+++ b/jenkins/run-build-packages-sso.sh
@@ -187,7 +187,7 @@ cd $WORKSPACE/packages/$TARGET
 # if it exists at the time fpm-info.sh runs. If it does not exist at that time, this script
 # will create it and when fpm runs, it will include the directory. So we add it to the exclude
 # list explicitly here, just in case.
-declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward at curoverse.com>" "--vendor='Curoverse, Inc.'" "--url='https://arvados.org'" "--description='Arvados SSO server - Arvados is a free and open source platform for big data science.'" "--license='Expat License'" "-s" "dir" "-t" "$FORMAT" "-v" "$SSO_VERSION" "-x" "var/www/arvados-sso/current/.git" "-x" "var/www/arvados-sso/current/packages" "--after-install=$RUN_BUILD_PACKAGES_PATH/arvados-sso-server-extras/arvados-sso-server.postinst")
+declare -a COMMAND_ARR=("fpm" "--maintainer=Ward Vandewege <ward at curoverse.com>" "--vendor='Curoverse, Inc.'" "--url='https://arvados.org'" "--description='Arvados SSO server - Arvados is a free and open source platform for big data science.'" "--license='Expat License'" "-s" "dir" "-t" "$FORMAT" "-v" "$SSO_VERSION" "-x" "var/www/arvados-sso/current/.git" "-x" "var/www/arvados-sso/current/packages" "--after-install=$RUN_BUILD_PACKAGES_PATH/arvados-sso-server-extras/arvados-sso-server.postinst" "--before-remove=$RUN_BUILD_PACKAGES_PATH/arvados-sso-server-extras/arvados-sso-server.prerm" "--after-remove=$RUN_BUILD_PACKAGES_PATH/arvados-sso-server-extras/arvados-sso-server.postrm" )
 
 if [[ "$BUILD_BUNDLE_PACKAGES" != 0 ]]; then
   # This is the complete package with vendor/bundle included.

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list