Merge branch 'oschwede/omnibus-gitlab-fix-registry-startup-parameters'

This commit is contained in:
Marin Jankovski 2017-02-17 11:12:21 +01:00
commit c4e83c52be
3 changed files with 14 additions and 2 deletions

View File

@ -5,6 +5,8 @@ omnibus-gitlab repository.
9.0
- Remove Bitbucket from templates as it does not require special settings anymore
- Fix the issue that prevents registry from starting when user and group
are not the same (O Schwede) 62b5cc
8.17.0

View File

@ -7,6 +7,6 @@ exec 2>&1
cd <%= node['gitlab']['registry']['dir'] %>
exec chpst -P \
-U <%= node['gitlab']['registry']['username'] %> \
-u <%= node['gitlab']['registry']['group'] %> \
-U <%= node['gitlab']['registry']['username'] %>:<%= node['gitlab']['registry']['group'] %> \
-u <%= node['gitlab']['registry']['username'] %>:<%= node['gitlab']['registry']['group'] %> \
/opt/gitlab/embedded/bin/registry serve ./config.yml

View File

@ -113,6 +113,16 @@ describe 'registry recipe' do
.with_content(/debug:\n\s*addr: localhost:5005/)
end
end
context 'when user and group are specified' do
before { stub_gitlab_rb(registry_external_url: 'https://registry.example.com', registry: { username: 'registryuser', group: 'registrygroup'}) }
it 'make registry run file start registry under correct user' do
expect(chef_run).to render_file('/opt/gitlab/sv/registry/run')
.with_content(/-U registryuser:registrygroup/)
expect(chef_run).to render_file('/opt/gitlab/sv/registry/run')
.with_content(/-u registryuser:registrygroup/)
end
end
end
describe 'registry' do