Commit 11e1c0134195270eabd2774055713699450ba49d
Exists in
spb-stable
and in
2 other branches
Merge branch 'detect_omnibus' into 'master'
Detect omnibus-gitlab in `rake gitlab:check`
Showing
2 changed files
with
15 additions
and
0 deletions
Show diff stats
CHANGELOG
... | ... | @@ -31,6 +31,7 @@ v 7.0.0 |
31 | 31 | - Add notice about huge push over http to unicorn config |
32 | 32 | - File action in satellites uses default 30 seconds timeout instead of old 10 seconds one |
33 | 33 | - Overall performance improvements |
34 | + - Skip init script check on omnibus-gitlab | |
34 | 35 | |
35 | 36 | v 6.9.2 |
36 | 37 | - Revert the commit that broke the LDAP user filter | ... | ... |
lib/tasks/gitlab/check.rake
... | ... | @@ -123,6 +123,11 @@ namespace :gitlab do |
123 | 123 | def check_init_script_exists |
124 | 124 | print "Init script exists? ... " |
125 | 125 | |
126 | + if omnibus_gitlab? | |
127 | + puts 'skipped (omnibus-gitlab has no init script)'.magenta | |
128 | + return | |
129 | + end | |
130 | + | |
126 | 131 | script_path = "/etc/init.d/gitlab" |
127 | 132 | |
128 | 133 | if File.exists?(script_path) |
... | ... | @@ -142,6 +147,11 @@ namespace :gitlab do |
142 | 147 | def check_init_script_up_to_date |
143 | 148 | print "Init script up-to-date? ... " |
144 | 149 | |
150 | + if omnibus_gitlab? | |
151 | + puts 'skipped (omnibus-gitlab has no init script)'.magenta | |
152 | + return | |
153 | + end | |
154 | + | |
145 | 155 | recipe_path = Rails.root.join("lib/support/init.d/", "gitlab") |
146 | 156 | script_path = "/etc/init.d/gitlab" |
147 | 157 | |
... | ... | @@ -823,4 +833,8 @@ namespace :gitlab do |
823 | 833 | fix_and_rerun |
824 | 834 | end |
825 | 835 | end |
836 | + | |
837 | + def omnibus_gitlab? | |
838 | + Dir.pwd == '/opt/gitlab/embedded/service/gitlab-rails' | |
839 | + end | |
826 | 840 | end | ... | ... |