old gitlab _ci settings causes problems
content of gitlab.rb
Tell GitLab CI to integrate with gitlab.example.com
gitlab_ci['gitlab_server'] = {
"url" => 'https://git.whatever.com',
"app_id" => '2336675628e...4371c35',
"app_secret" => '553df4...76a620'
}
Error:
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab:
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab:
Shutting down all GitLab services except those needed for migrations
ok: down: gitlab-workhorse: 14170s, normally up
ok: down: logrotate: 14169s, normally up
ok: down: mattermost: 14169s, normally up
ok: down: nginx: 14168s, normally up
ok: down: postgresql: 1s, normally up
ok: down: redis: 0s, normally up
ok: down: sidekiq: 14167s, normally up
ok: down: unicorn: 14167s, normally up
ok: run: postgresql: (pid 5948) 0s
ok: run: redis: (pid 5956) 1s
run: postgresql: (pid 5948) 1s; run: log: (pid 622) 3950730s
run: redis: (pid 5956) 1s; run: log: (pid 625) 3950730s
Reconfiguring GitLab to apply migrations
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- package (0.0.0)
- runit (0.14.2)
- gitlab (0.0.1)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create (up to date)
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
NoMethodError
-------------
undefined method `merge!' for nil:NilClass
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:275:in `write_to_gitlab_secrets'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:136:in `generate_secrets'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:188:in `generate_config'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:37:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:
268: ci_auth = {
269: 'gitlab_server' => {
270: 'url' => Gitlab['gitlab_ci']['gitlab_server']['url'],
271: 'app_id' => Gitlab['gitlab_ci']['gitlab_server']['app_id'],
272: 'app_secret' => Gitlab['gitlab_ci']['gitlab_server']['app_secret']
273: }
274: }
275>> secret_tokens['gitlab_ci'].merge!(ci_auth)
276: end
277:
278: if Gitlab['mattermost']['gitlab_enable']
279: gitlab_oauth = {
280: 'gitlab_enable' => Gitlab['mattermost']['gitlab_enable'],
281: 'gitlab_secret' => Gitlab['mattermost']['gitlab_secret'],
282: 'gitlab_id' => Gitlab['mattermost']['gitlab_id'],
283: 'gitlab_scope' => Gitlab['mattermost']['gitlab_scope'],
284: 'gitlab_auth_endpoint' => Gitlab['mattermost']['gitlab_auth_endpoint'],
Platform:
---------
x86_64-linux
Running handlers:
Running handlers complete
Chef Client failed. 0 resources updated in 01 seconds
dpkg: Fehler beim Bearbeiten des Paketes gitlab-ce (--configure):
Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
gitlab-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
Solution:
- Remove the lines in the first code snippet