summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-08-04 16:05:41 +0200
committerRémy Coutable <remy@rymai.me>2017-08-04 16:10:52 +0200
commit201ce2cb55f1d016cdcb0653d9f9a11a8fec358d (patch)
treeaaa5c73b252bd99ffa37d6e936b294e9cc12220c
parent805a28e6a134b59ab3efa3ff6d6b0e16bd24c950 (diff)
downloadgitlab-ce-201ce2cb55f1d016cdcb0653d9f9a11a8fec358d.tar.gz
Unset the RUBYOPT env variable before installing gitaly-ruby
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--lib/tasks/gitlab/gitaly.rake2
-rw-r--r--spec/support/test_env.rb13
-rw-r--r--spec/tasks/gitlab/gitaly_rake_spec.rb2
3 files changed, 11 insertions, 6 deletions
diff --git a/lib/tasks/gitlab/gitaly.rake b/lib/tasks/gitlab/gitaly.rake
index 680e76af471..5054f5e9bb2 100644
--- a/lib/tasks/gitlab/gitaly.rake
+++ b/lib/tasks/gitlab/gitaly.rake
@@ -21,7 +21,7 @@ namespace :gitlab do
create_gitaly_configuration
# In CI we run scripts/gitaly-test-build instead of this command
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
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index 7995b5893e2..4e409df1db6 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -122,11 +122,14 @@ module TestEnv
end
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)
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
@@ -136,14 +139,16 @@ module TestEnv
if gitaly_dir_stale?(gitaly_dir)
puts "rm -rf #{gitaly_dir}"
- FileUtils.rm_rf(gitaly_dir)
+ FileUtils.rm_rf(gitaly_dir)
end
gitaly_needs_update = component_needs_update?(gitaly_dir,
Gitlab::GitalyClient.expected_server_version)
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
start_gitaly(gitaly_dir)
diff --git a/spec/tasks/gitlab/gitaly_rake_spec.rb b/spec/tasks/gitlab/gitaly_rake_spec.rb
index 695231c7d15..29eec9009bd 100644
--- a/spec/tasks/gitlab/gitaly_rake_spec.rb
+++ b/spec/tasks/gitlab/gitaly_rake_spec.rb
@@ -41,7 +41,7 @@ describe 'gitlab:gitaly namespace rake task' do
end
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
@old_env_ci = ENV.delete('CI')