6750: arvados-api-server-upgrade only installs omniauth.rb if it exists.
authorBrett Smith <brett@curoverse.com>
Thu, 23 Jul 2015 14:07:54 +0000 (10:07 -0400)
committerBrett Smith <brett@curoverse.com>
Thu, 23 Jul 2015 14:07:54 +0000 (10:07 -0400)
New installs configure the SSO server via application.yml.  Refs #6750.

jenkins/arvados-api-server-extras/arvados-api-server-upgrade.sh

index ace07c7259e729fe192ee93cb99d99dd7509bebc..5160c7ac5fcf0bf3b37a2ae25f364adf2f0ee965 100755 (executable)
@@ -39,7 +39,9 @@ echo "Copying files from $CONFIG_PATH"
 cp -f $CONFIG_PATH/database.yml $RELEASE_PATH/config/database.yml
 cp -f $RELEASE_PATH/config/environments/production.rb.example $RELEASE_PATH/config/environments/production.rb
 cp -f $CONFIG_PATH/application.yml $RELEASE_PATH/config/application.yml
-cp -f $CONFIG_PATH/omniauth.rb $RELEASE_PATH/config/initializers/omniauth.rb
+if [ -e $CONFIG_PATH/omniauth.rb ]; then
+    cp -f $CONFIG_PATH/omniauth.rb $RELEASE_PATH/config/initializers/omniauth.rb
+fi
 echo "Done."
 
 # Before we do anything else, make sure some directories and files are in place