Merge ~ines-almeida/launchpad-layers:update-git-domain-config into launchpad-layers:main

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: 910dfb76754add5ed032a243c6081ee6a6b11256
Merged at revision: 910dfb76754add5ed032a243c6081ee6a6b11256
Proposed branch: ~ines-almeida/launchpad-layers:update-git-domain-config
Merge into: launchpad-layers:main
Diff against target: 23 lines (+7/-4)
1 file modified
launchpad-base/templates/launchpad-base-lazr.conf (+7/-4)
Reviewer Review Type Date Requested Status
Guruprasad Approve
Review via email: mp+462428@code.launchpad.net

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.

To post a comment you must log in.
Revision history for this message
Guruprasad (lgp171188) wrote :

LGTM 👍 Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/launchpad-base/templates/launchpad-base-lazr.conf b/launchpad-base/templates/launchpad-base-lazr.conf
2index a73f081..be77d35 100644
3--- a/launchpad-base/templates/launchpad-base-lazr.conf
4+++ b/launchpad-base/templates/launchpad-base-lazr.conf
5@@ -34,11 +34,14 @@ lp_url_hosts: {{ bzr_lp_url_hosts }}
6 secure_codebrowse_root: https://{{ domain_bzr }}/
7 supermirror_root: http://{{ domain_bzr }}/
8 {%- endif %}
9+{#- If `domain_git` is not set, use a placeholder default value. #}
10+{#- These domain config values are used to build URLs within Launchpad. #}
11+{% set domain_git_or_default = domain_git or "git.not.enabled" %}
12+internal_git_api_endpoint: http://{{ domain_git_or_default }}:19417/
13+git_anon_root: git://{{ domain_git_or_default }}/
14+git_browse_root: https://{{ domain_git_or_default }}/
15+git_ssh_root: git+ssh://{{ domain_git_or_default }}/
16 {%- if domain_git %}
17-internal_git_api_endpoint: http://{{ domain_git }}:19417/
18-git_anon_root: git://{{ domain_git }}/
19-git_browse_root: https://{{ domain_git }}/
20-git_ssh_root: git+ssh://{{ domain_git }}/
21 {{- opt("loose_objects_threshold", git_loose_objects_threshold) }}
22 {{- opt("packs_threshold", git_packs_threshold) }}
23 {%- endif %}

Subscribers

People subscribed via source and target branches