Commit 11e1c0134195270eabd2774055713699450ba49d

Authored by Dmitriy Zaporozhets
2 parents 630be84a 90bfe286

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
@@ -31,6 +31,7 @@ v 7.0.0 @@ -31,6 +31,7 @@ v 7.0.0
31 - Add notice about huge push over http to unicorn config 31 - Add notice about huge push over http to unicorn config
32 - File action in satellites uses default 30 seconds timeout instead of old 10 seconds one 32 - File action in satellites uses default 30 seconds timeout instead of old 10 seconds one
33 - Overall performance improvements 33 - Overall performance improvements
  34 + - Skip init script check on omnibus-gitlab
34 35
35 v 6.9.2 36 v 6.9.2
36 - Revert the commit that broke the LDAP user filter 37 - Revert the commit that broke the LDAP user filter
lib/tasks/gitlab/check.rake
@@ -123,6 +123,11 @@ namespace :gitlab do @@ -123,6 +123,11 @@ namespace :gitlab do
123 def check_init_script_exists 123 def check_init_script_exists
124 print "Init script exists? ... " 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 script_path = "/etc/init.d/gitlab" 131 script_path = "/etc/init.d/gitlab"
127 132
128 if File.exists?(script_path) 133 if File.exists?(script_path)
@@ -142,6 +147,11 @@ namespace :gitlab do @@ -142,6 +147,11 @@ namespace :gitlab do
142 def check_init_script_up_to_date 147 def check_init_script_up_to_date
143 print "Init script up-to-date? ... " 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 recipe_path = Rails.root.join("lib/support/init.d/", "gitlab") 155 recipe_path = Rails.root.join("lib/support/init.d/", "gitlab")
146 script_path = "/etc/init.d/gitlab" 156 script_path = "/etc/init.d/gitlab"
147 157
@@ -823,4 +833,8 @@ namespace :gitlab do @@ -823,4 +833,8 @@ namespace :gitlab do
823 fix_and_rerun 833 fix_and_rerun
824 end 834 end
825 end 835 end
  836 +
  837 + def omnibus_gitlab?
  838 + Dir.pwd == '/opt/gitlab/embedded/service/gitlab-rails'
  839 + end
826 end 840 end