Skip to content

Commit ceec8cf

Browse files
committed
Bump GitLab and cookbook to 8.17
Simply having node.js installed is no longer enough as further dependencies are required. Leverage the nodejs cookbook to install them for us.
1 parent 92df9af commit ceec8cf

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

attributes/default.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434

3535
# Set github URL for gitlab
3636
default['gitlab']['git_url'] = 'https://github.com/gitlabhq/gitlabhq.git'
37-
default['gitlab']['git_branch'] = '8-14-stable'
37+
default['gitlab']['git_branch'] = '8-17-stable'
3838

3939
# gitlab-shell attributes
4040
default['gitlab']['shell']['home'] = node['gitlab']['home'] + '/gitlab-shell'
4141
default['gitlab']['shell']['git_url'] = 'https://github.com/gitlabhq/gitlab-shell.git'
42-
default['gitlab']['shell']['git_branch'] = 'v4.0.2'
42+
default['gitlab']['shell']['git_branch'] = 'v4.1.1'
4343
default['gitlab']['shell']['gitlab_host'] = nil
4444

4545
# Database setup
@@ -69,6 +69,7 @@
6969
redisio::default
7070
redisio::enable
7171
ruby_build
72+
nodejs::install
7273
)
7374

7475
# Redisio instance name
@@ -79,7 +80,6 @@
7980
cmake
8081
curl
8182
golang
82-
nodejs
8383
python-docutils
8484
sudo
8585
wget
@@ -165,5 +165,5 @@
165165
default['nginx']['default_site_enabled'] = false
166166

167167
# GitLab Workhorse
168-
default['gitlab']['workhorse_revision'] = 'v1.0.1'
168+
default['gitlab']['workhorse_revision'] = 'v1.3.0'
169169
default['gitlab']['workhorse_repository'] = 'https://gitlab.com/gitlab-org/gitlab-workhorse.git'

metadata.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
description 'Installs/Configures gitlab'
55
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
66
name 'gitlab'
7-
version '8.14.0'
7+
version '8.17.0'
88
issues_url 'https://github.com/atomic-penguin/cookbook-gitlab/issues'
99
source_url 'https://github.com/atomic-penguin/cookbook-gitlab'
1010

@@ -16,6 +16,7 @@
1616
git
1717
logrotate
1818
ncurses
19+
nodejs
1920
openssh
2021
postgresql
2122
readline

recipes/default.rb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,14 +380,22 @@ class unix_stream_socket connectto;
380380
not_if { ::File.exist?("#{node['gitlab']['home']}/gitlab-workhorse/gitlab-workhorse") }
381381
end
382382

383-
# Precompile assets
384-
execute 'gitlab-bundle-precompile-assets' do
385-
command "#{bundler_binary} exec rake assets:precompile RAILS_ENV=production"
383+
nodejs_npm 'gitlab' do
384+
path node['gitlab']['app_home']
385+
user node['gitlab']['user']
386+
group node['gitlab']['group']
387+
options ['--only=production']
388+
json true
389+
end
390+
391+
# Compile assets
392+
execute 'gitlab-bundle-assets-compile' do
393+
command "#{bundler_binary} exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production && touch .assets-compiled"
386394
cwd node['gitlab']['app_home']
387395
user node['gitlab']['user']
388396
group node['gitlab']['group']
389397
environment('LANG' => 'en_US.UTF-8', 'LC_ALL' => 'en_US.UTF-8')
390-
only_if { Dir["#{node['gitlab']['app_home']}/public/assets/*"].empty? }
398+
not_if { File.exist?("#{node['gitlab']['app_home']}/.assets-compiled") }
391399
end
392400

393401
# Initialize database

0 commit comments

Comments
 (0)