Ines Almeida has proposed merging 
~ines-almeida/launchpad-layers:update-git-domain-config into 
launchpad-layers:main.

Commit message:
launchpad-base: update git domain configuration values to use default value if 
not set
    
`domain_git` is generally used to determine if an environment has git code 
hosting enabled or not.
But in cases where we don't want git hosting to be enabled, we still want the 
domain values to build and display URLs.
Adding a default placeholder value will enable us to display these placeholder 
URLs.



Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/launchpad-layers/+git/launchpad-layers/+merge/462428

This replaces: 
https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/launchpad-mojo-specs/+merge/461985
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~ines-almeida/launchpad-layers:update-git-domain-config into 
launchpad-layers:main.
diff --git a/launchpad-base/templates/launchpad-base-lazr.conf b/launchpad-base/templates/launchpad-base-lazr.conf
index a73f081..be77d35 100644
--- a/launchpad-base/templates/launchpad-base-lazr.conf
+++ b/launchpad-base/templates/launchpad-base-lazr.conf
@@ -34,11 +34,14 @@ lp_url_hosts: {{ bzr_lp_url_hosts }}
 secure_codebrowse_root: https://{{ domain_bzr }}/
 supermirror_root: http://{{ domain_bzr }}/
 {%- endif %}
+{#- If `domain_git` is not set, use a placeholder default value. #}
+{#- These domain config values are used to build URLs within Launchpad. #}
+{% set domain_git_or_default = domain_git or "git.not.enabled" %}
+internal_git_api_endpoint: http://{{ domain_git_or_default }}:19417/
+git_anon_root: git://{{ domain_git_or_default }}/
+git_browse_root: https://{{ domain_git_or_default }}/
+git_ssh_root: git+ssh://{{ domain_git_or_default }}/
 {%- if domain_git %}
-internal_git_api_endpoint: http://{{ domain_git }}:19417/
-git_anon_root: git://{{ domain_git }}/
-git_browse_root: https://{{ domain_git }}/
-git_ssh_root: git+ssh://{{ domain_git }}/
 {{- opt("loose_objects_threshold", git_loose_objects_threshold) }}
 {{- opt("packs_threshold", git_packs_threshold) }}
 {%- endif %}
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to