Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
92536b99
Commit
92536b99
authored
Oct 27, 2021
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'toon-gitaly-bundler-fix' into 'master'"
This reverts merge request !72328
parent
7810a49f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
20 deletions
+13
-20
scripts/gitaly-test-build
scripts/gitaly-test-build
+2
-0
scripts/gitaly-test-spawn
scripts/gitaly-test-spawn
+1
-0
spec/support/helpers/gitaly_setup.rb
spec/support/helpers/gitaly_setup.rb
+10
-20
No files found.
scripts/gitaly-test-build
View file @
92536b99
...
@@ -13,6 +13,8 @@ class GitalyTestBuild
...
@@ -13,6 +13,8 @@ class GitalyTestBuild
include
GitalySetup
include
GitalySetup
def
run
def
run
set_bundler_config
# If we have the binaries from the cache, we can skip building them again
# If we have the binaries from the cache, we can skip building them again
if
File
.
exist?
(
tmp_tests_gitaly_bin_dir
)
if
File
.
exist?
(
tmp_tests_gitaly_bin_dir
)
GitalySetup
::
LOGGER
.
debug
"Gitaly binary already built. Skip building...
\n
"
GitalySetup
::
LOGGER
.
debug
"Gitaly binary already built. Skip building...
\n
"
...
...
scripts/gitaly-test-spawn
View file @
92536b99
...
@@ -9,6 +9,7 @@ class GitalyTestSpawn
...
@@ -9,6 +9,7 @@ class GitalyTestSpawn
include
GitalySetup
include
GitalySetup
def
run
def
run
set_bundler_config
install_gitaly_gems
if
ENV
[
'CI'
]
install_gitaly_gems
if
ENV
[
'CI'
]
check_gitaly_config!
check_gitaly_config!
...
...
spec/support/helpers/gitaly_setup.rb
View file @
92536b99
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
require
'securerandom'
require
'securerandom'
require
'socket'
require
'socket'
require
'logger'
require
'logger'
require
'bundler'
module
GitalySetup
module
GitalySetup
LOGGER
=
begin
LOGGER
=
begin
...
@@ -47,26 +46,13 @@ module GitalySetup
...
@@ -47,26 +46,13 @@ module GitalySetup
File
.
join
(
tmp_tests_gitlab_shell_dir
,
'.gitlab_shell_secret'
)
File
.
join
(
tmp_tests_gitlab_shell_dir
,
'.gitlab_shell_secret'
)
end
end
# Return the path of the vendored gems in <gdk>/gitaly, if exists
def
gdk_gitaly_ruby_gem_path
gitaly_ruby_path
=
File
.
expand_path
(
'../../../../gitaly/ruby/'
,
__dir__
)
bundle_config_path
=
File
.
join
(
gitaly_ruby_path
,
'.bundle'
)
bundle_path
=
Bundler
::
Settings
.
new
(
bundle_config_path
).
path
return
if
bundle_path
.
use_system_gems?
File
.
expand_path
(
bundle_path
.
explicit_path
,
gitaly_ruby_path
)
end
def
env
def
env
{
{
'HOME'
=>
File
.
expand_path
(
'tmp/tests'
),
'HOME'
=>
File
.
expand_path
(
'tmp/tests'
),
'GEM_PATH'
=>
Gem
.
path
.
join
(
':'
),
'GEM_PATH'
=>
Gem
.
path
.
join
(
':'
),
'BUNDLE_IGNORE_CONFIG'
=>
'1'
,
'BUNDLE_APP_CONFIG'
=>
File
.
join
(
gemfile_dir
,
'.bundle'
),
'BUNDLE_INSTALL_FLAGS'
=>
nil
,
'BUNDLE_GEMFILE'
=>
gemfile
,
'BUNDLE_GEMFILE'
=>
gemfile
,
'BUNDLE_PATH'
=>
bundle_path
,
'BUNDLE_JOBS'
=>
'4'
,
'BUNDLE_RETRY'
=>
'3'
,
'RUBYOPT'
=>
nil
,
'RUBYOPT'
=>
nil
,
# Git hooks can't run during tests as the internal API is not running.
# Git hooks can't run during tests as the internal API is not running.
...
@@ -75,13 +61,17 @@ module GitalySetup
...
@@ -75,13 +61,17 @@ module GitalySetup
}
}
end
end
def
bundle_path
# rubocop:disable GitlabSecurity/SystemCommandInjection
def
set_bundler_config
system
(
'bundle config set --local jobs 4'
,
chdir:
gemfile_dir
)
system
(
'bundle config set --local retry 3'
,
chdir:
gemfile_dir
)
if
ENV
[
'CI'
]
if
ENV
[
'CI'
]
File
.
expand_path
(
'../../../vendor/gitaly-ruby'
,
__dir__
)
bundle_path
=
File
.
expand_path
(
'../../../vendor/gitaly-ruby'
,
__dir__
)
else
system
(
'bundle'
,
'config'
,
'set'
,
'--local'
,
'path'
,
bundle_path
,
chdir:
gemfile_dir
)
gdk_gitaly_ruby_gem_path
||
File
.
expand_path
(
Bundler
.
configured_bundle_path
.
base_path
)
end
end
end
end
# rubocop:enable GitlabSecurity/SystemCommandInjection
def
config_path
(
service
)
def
config_path
(
service
)
case
service
case
service
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment