Skip to content
Snippets Groups Projects
Commit 43241f4a2405 authored by Balasankar 'Balu' C's avatar Balasankar 'Balu' C
Browse files

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: default avatarBalasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: default avatarAndrew Patterson <apatterson@gitlab.com>
Approved-by: default avatarBalasankar 'Balu' C <balasankar@gitlab.com>
Co-authored-by: default avatarDJ Mountney <dj@gitlab.com>
No related branches found
No related tags found
3 merge requests!114heptapod#1394: making 1.0 the oldstable,!110heptapod#1352: merged heptapod branch into heptapod-stable,!106Merged upstream 16.4 branching point into heptapod branch
......@@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'yaml'
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
......@@ -151,5 +150,6 @@
# In order to compile the assets, we need to get to a state where rake can
# load the Rails environment.
copy 'config/gitlab.yml.example', 'config/gitlab.yml'
copy 'config/database.yml.postgresql', 'config/database.yml'
copy 'config/secrets.yml.example', 'config/secrets.yml'
......@@ -154,12 +154,5 @@
copy 'config/secrets.yml.example', 'config/secrets.yml'
block 'render database.yml' do
database_yml = YAML.safe_load(File.read("#{Omnibus::Config.source_dir}/gitlab-rails/config/database.yml.postgresql"))
database_yml.each { |_, databases| databases.delete('geo') unless EE }
File.write("#{Omnibus::Config.source_dir}/gitlab-rails/config/database.yml", YAML.dump(database_yml))
end
# Copy asset cache and node modules from cache location to source directory
move "#{Omnibus::Config.project_root}/assets_cache", "#{Omnibus::Config.source_dir}/gitlab-rails/tmp/cache"
move "#{Omnibus::Config.project_root}/node_modules", "#{Omnibus::Config.source_dir}/gitlab-rails"
......@@ -168,5 +161,4 @@
'NODE_ENV' => 'production',
'RAILS_ENV' => 'production',
'PATH' => "#{install_dir}/embedded/bin:#{Gitlab::Util.get_env('PATH')}",
'USE_DB' => 'false',
'SKIP_STORAGE_VALIDATION' => 'true',
......@@ -172,4 +164,5 @@
'SKIP_STORAGE_VALIDATION' => 'true',
'SKIP_DATABASE_CONFIG_VALIDATION' => 'true',
'NODE_OPTIONS' => '--max_old_space_size=3584'
}
assets_compile_env['NO_SOURCEMAPS'] = 'true' if Gitlab::Util.get_env('NO_SOURCEMAPS')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment