[ARVADOS] created: 0b9904612ffa33ed488817659c00509661ac4865

git at public.curoverse.com git at public.curoverse.com
Wed Apr 1 16:01:27 EDT 2015


        at  0b9904612ffa33ed488817659c00509661ac4865 (commit)


commit 0b9904612ffa33ed488817659c00509661ac4865
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Apr 1 15:59:33 2015 -0400

    5626: Add git_hostname configuration option.

diff --git a/services/api/app/models/repository.rb b/services/api/app/models/repository.rb
index 0cab4dc..d2da6ea 100644
--- a/services/api/app/models/repository.rb
+++ b/services/api/app/models/repository.rb
@@ -20,7 +20,11 @@ class Repository < ArvadosModel
   end
 
   def push_url
-    "git at git.%s.arvadosapi.com:%s.git" % [Rails.configuration.uuid_prefix, name]
+    if Rails.configuration.git_host
+      "git@%s:%s.git" % [Rails.configuration.git_host, name]
+    else
+      "git at git.%s.arvadosapi.com:%s.git" % [Rails.configuration.uuid_prefix, name]
+    end
   end
 
   def fetch_url
diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml
index b6d37f9..1696e2c 100644
--- a/services/api/config/application.default.yml
+++ b/services/api/config/application.default.yml
@@ -57,6 +57,11 @@ common:
   # logic for deciding on a hostname.
   host: false
 
+  # If not false, this is the hostname that will be used to generate fetch_url
+  # and push_url for git repositories.  By default, this will be
+  # git.(uuid_prefix).arvadosapi.com
+  git_host: false
+
   # If this is not false, HTML requests at the API server's root URL
   # are redirected to this location, and it is provided in the text of
   # user activation notification email messages to remind them where

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list