Expose mattermost url in gitlab.yml
This commit is contained in:
parent
c3082b939b
commit
4d90c7fa5c
|
@ -235,7 +235,9 @@ templatesymlink "Create a gitlab.yml and create a symlink to Rails root" do
|
|||
builds_directory: gitlab_ci_builds_dir,
|
||||
git_annex_enabled: node['gitlab']['gitlab-shell']['git_annex_enabled'],
|
||||
pages_external_http: node['gitlab']['gitlab-pages']['external_http'],
|
||||
pages_external_https: node['gitlab']['gitlab-pages']['external_https']
|
||||
pages_external_https: node['gitlab']['gitlab-pages']['external_https'],
|
||||
mattermost_host: Gitlab['mattermost_external_url'],
|
||||
mattermost_enabled: node['gitlab']['mattermost']['enable']
|
||||
)
|
||||
)
|
||||
restarts dependent_services
|
||||
|
|
|
@ -71,7 +71,7 @@ end
|
|||
pg_helper = PgHelper.new(node)
|
||||
bin_dir = "/opt/gitlab/embedded/bin"
|
||||
|
||||
mysql_adapter = node['gitlab']['mattermost']['sql_driver_name'] == 'mysql' ? true:false
|
||||
mysql_adapter = node['gitlab']['mattermost']['sql_driver_name'] == 'mysql' ? true : false
|
||||
db_name = node['gitlab']['mattermost']['database_name']
|
||||
sql_user = node['gitlab']['postgresql']['sql_mattermost_user']
|
||||
|
||||
|
|
|
@ -138,6 +138,10 @@ production: &base
|
|||
key: <%= @registry_key_path %>
|
||||
issuer: <%= @registry_issuer %>
|
||||
|
||||
mattermost:
|
||||
enabled: <%= @mattermost_enabled %>
|
||||
host: <%= @mattermost_host %>
|
||||
|
||||
## GitLab Pages (EE only)
|
||||
pages:
|
||||
enabled: <%= @pages_enabled %>
|
||||
|
|
|
@ -100,6 +100,16 @@ describe 'gitlab::gitlab-rails' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'creating gitlab.yml' do
|
||||
it 'exposes the mattermost host' do
|
||||
stub_gitlab_rb(mattermost: { enable: true },
|
||||
mattermost_external_url: 'http://mattermost.domain.com')
|
||||
|
||||
expect(chef_run).to render_file('/var/opt/gitlab/gitlab-rails/etc/gitlab.yml').
|
||||
with_content("host: http://mattermost.domain.com")
|
||||
end
|
||||
end
|
||||
|
||||
context 'with environment variables' do
|
||||
context 'by default' do
|
||||
it_behaves_like "enabled gitlab-rails env", "HOME", '\/var\/opt\/gitlab'
|
||||
|
|
Loading…
Reference in New Issue