diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2017-08-10 18:24:44 +0200 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-08-11 15:49:50 +0200 |
commit | fab0c1eb80b3eda00024a4e1fb961ba5b8bcc7bb (patch) | |
tree | a7c6a1fdf58f71dde6954ebd80d057e899c880bd /lib/tasks | |
parent | cfc5f0f5e4cb5a9b52aaf81d1c80c2d7774279a6 (diff) | |
download | gitlab-ce-fab0c1eb80b3eda00024a4e1fb961ba5b8bcc7bb.tar.gz |
Use existing BUNDLE_PATH for gitaly in local testsgitaly-test-bundle-path
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/gitaly.rake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/gitaly.rake b/lib/tasks/gitlab/gitaly.rake index 1f504485e4c..e337c67a0f5 100644 --- a/lib/tasks/gitlab/gitaly.rake +++ b/lib/tasks/gitlab/gitaly.rake @@ -15,13 +15,17 @@ namespace :gitlab do checkout_or_clone_version(version: version, repo: args.repo, target_dir: args.dir) _, status = Gitlab::Popen.popen(%w[which gmake]) - command = status.zero? ? 'gmake' : 'make' + command = status.zero? ? ['gmake'] : ['make'] + + if Rails.env.test? + command += %W[BUNDLE_PATH=#{Bundler.bundle_path}] + end Dir.chdir(args.dir) 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 RUBYOPT -u BUNDLE_GEMFILE] + [command]) } + Bundler.with_original_env { run_command!(%w[/usr/bin/env -u RUBYOPT -u BUNDLE_GEMFILE] + command) } end end end |