WIP: gitlab-pages: Allow external_http and external_https to be arrays
This change is backwards-compatible - if they're set to strings instead, the configuration should remain unchanged.
I'm afraid I'm brand-new to omnibus (and chef!) and haven't been able to work out how to run more than the spec/ tests in the time I've allocated for this
Merge request reports
Activity
Depends on https://gitlab.com/gitlab-org/gitlab-pages/merge_requests/6 being merged.
mentioned in merge request gitlab-pages!6 (merged)
131 131 host: <%= @pages_host %> 132 132 port: <%= @pages_port %> 133 133 https: <%= @pages_https %> 134 external_http: <%= @pages_external_http %> 135 external_https: <%= @pages_external_https %> 134 external_http: <%= @pages_external_http.inspect %> 135 external_https: <%= @pages_external_https.inspect %> I am a bit worried how will this actually be passed to GitLab rails app given that I don't remember how
external_http(s)
is parsed/used in GitLab. I think that there is only support for strings and I am not sure how it will behave with strings like "[1.2.3.4,4.5.6.7]". @ayufan You are following the development of the dependent MR's, can you comment?Good catch, I didn't think to look at usages of these two nodes in gitlab-ee itself!
BTW, I'm relying on this snippet to cause the generated gitlab.yml to look like this:
production: gitlab: pages: external_http: ["1.1.1.1:80", "[2001::1]:80"] external_https: ["1.1.1.1:443", "[2001::1]:443"]
...which is to say, the value you get by calling Gitlab.config.pages.external_https would be a Ruby array containing two strings, rather than the string
["1.1.1.1:80", "[2001::1]:80"]
.I've had a look through the repository and there are a few sites that would misbehave if given an empty array instead of nil / false; I can't see any sites that use the truthy values except to say "gitlab pages can serve https", or "gitlab pages is present", etc.
I'll add a commit to https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/383 to fix it up tomorrow, if I get the chance.
assigned to @nick.thomas
mentioned in merge request !1383 (merged)
Closing in favour of https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/1383 - follow along there :)