Skip to content

Commit a29e6bc

Browse files
balasankarctwk3
andcommitted
Merge branch 'fix-ce-database-validation' into 'master'
Skip database validation during asset compile See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7118 Merged-by: Balasankar 'Balu' C <[email protected]> Approved-by: Andrew Patterson <[email protected]> Approved-by: Balasankar 'Balu' C <[email protected]> Co-authored-by: DJ Mountney <[email protected]>
2 parents 6d09781 + 6443222 commit a29e6bc

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

config/software/gitlab-rails.rb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18-
require 'yaml'
1918
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
2019
require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
2120

@@ -151,15 +150,9 @@
151150
# In order to compile the assets, we need to get to a state where rake can
152151
# load the Rails environment.
153152
copy 'config/gitlab.yml.example', 'config/gitlab.yml'
153+
copy 'config/database.yml.postgresql', 'config/database.yml'
154154
copy 'config/secrets.yml.example', 'config/secrets.yml'
155155

156-
block 'render database.yml' do
157-
database_yml = YAML.safe_load(File.read("#{Omnibus::Config.source_dir}/gitlab-rails/config/database.yml.postgresql"))
158-
database_yml.each { |_, databases| databases.delete('geo') unless EE }
159-
160-
File.write("#{Omnibus::Config.source_dir}/gitlab-rails/config/database.yml", YAML.dump(database_yml))
161-
end
162-
163156
# Copy asset cache and node modules from cache location to source directory
164157
move "#{Omnibus::Config.project_root}/assets_cache", "#{Omnibus::Config.source_dir}/gitlab-rails/tmp/cache"
165158
move "#{Omnibus::Config.project_root}/node_modules", "#{Omnibus::Config.source_dir}/gitlab-rails"
@@ -168,8 +161,8 @@
168161
'NODE_ENV' => 'production',
169162
'RAILS_ENV' => 'production',
170163
'PATH' => "#{install_dir}/embedded/bin:#{Gitlab::Util.get_env('PATH')}",
171-
'USE_DB' => 'false',
172164
'SKIP_STORAGE_VALIDATION' => 'true',
165+
'SKIP_DATABASE_CONFIG_VALIDATION' => 'true',
173166
'NODE_OPTIONS' => '--max_old_space_size=3584'
174167
}
175168
assets_compile_env['NO_SOURCEMAPS'] = 'true' if Gitlab::Util.get_env('NO_SOURCEMAPS')

0 commit comments

Comments
 (0)