Commit 201ce2cb authored by Rémy Coutable's avatar Rémy Coutable

Unset the RUBYOPT env variable before installing gitaly-ruby

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 805a28e6
...@@ -21,7 +21,7 @@ namespace :gitlab do ...@@ -21,7 +21,7 @@ namespace :gitlab do
create_gitaly_configuration create_gitaly_configuration
# In CI we run scripts/gitaly-test-build instead of this command # In CI we run scripts/gitaly-test-build instead of this command
unless ENV['CI'].present? unless ENV['CI'].present?
Bundler.with_original_env { run_command!(%w[/usr/bin/env -u BUNDLE_GEMFILE] + [command]) } Bundler.with_original_env { run_command!(%w[/usr/bin/env -u BUNDLE_GEMFILE -u RUBYOPT] + [command]) }
end end
end end
end end
......
...@@ -122,11 +122,14 @@ module TestEnv ...@@ -122,11 +122,14 @@ module TestEnv
end end
def setup_gitlab_shell def setup_gitlab_shell
shell_needs_update = component_needs_update?(Gitlab.config.gitlab_shell.path, gitlab_shell_dir = File.dirname(Gitlab.config.gitlab_shell.path)
shell_needs_update = component_needs_update?(gitlab_shell_dir,
Gitlab::Shell.version_required) Gitlab::Shell.version_required)
unless !shell_needs_update || system('rake', 'gitlab:shell:install') unless !shell_needs_update || system('rake', 'gitlab:shell:install')
raise 'Can`t clone gitlab-shell' puts "rm -rf #{gitlab_shell_dir}"
FileUtils.rm_rf(gitlab_shell_dir)
raise "Can't install gitlab-shell"
end end
end end
...@@ -136,14 +139,16 @@ module TestEnv ...@@ -136,14 +139,16 @@ module TestEnv
if gitaly_dir_stale?(gitaly_dir) if gitaly_dir_stale?(gitaly_dir)
puts "rm -rf #{gitaly_dir}" puts "rm -rf #{gitaly_dir}"
FileUtils.rm_rf(gitaly_dir) FileUtils.rm_rf(gitaly_dir)
end end
gitaly_needs_update = component_needs_update?(gitaly_dir, gitaly_needs_update = component_needs_update?(gitaly_dir,
Gitlab::GitalyClient.expected_server_version) Gitlab::GitalyClient.expected_server_version)
unless !gitaly_needs_update || system('rake', "gitlab:gitaly:install[#{gitaly_dir}]") unless !gitaly_needs_update || system('rake', "gitlab:gitaly:install[#{gitaly_dir}]")
raise "Can't clone gitaly" puts "rm -rf #{gitaly_dir}"
FileUtils.rm_rf(gitaly_dir)
raise "Can't install gitaly"
end end
start_gitaly(gitaly_dir) start_gitaly(gitaly_dir)
......
...@@ -41,7 +41,7 @@ describe 'gitlab:gitaly namespace rake task' do ...@@ -41,7 +41,7 @@ describe 'gitlab:gitaly namespace rake task' do
end end
describe 'gmake/make' do describe 'gmake/make' do
let(:command_preamble) { %w[/usr/bin/env -u BUNDLE_GEMFILE] } let(:command_preamble) { %w[/usr/bin/env -u BUNDLE_GEMFILE -u RUBYOPT] }
before(:all) do before(:all) do
@old_env_ci = ENV.delete('CI') @old_env_ci = ENV.delete('CI')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment