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
c68bf5f5
Commit
c68bf5f5
authored
Mar 31, 2021
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure Gitaly gems are installed under vendor/gitaly-ruby
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
825cde32
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
scripts/gitaly-test-build
scripts/gitaly-test-build
+2
-0
scripts/gitaly-test-spawn
scripts/gitaly-test-spawn
+1
-0
scripts/gitaly_test.rb
scripts/gitaly_test.rb
+15
-5
No files found.
scripts/gitaly-test-build
View file @
c68bf5f5
...
...
@@ -13,6 +13,8 @@ class GitalyTestBuild
include
GitalyTest
def
run
set_bundler_config
abort
'gitaly build failed'
unless
build_gitaly
ensure_gitlab_shell_secret!
...
...
scripts/gitaly-test-spawn
View file @
c68bf5f5
...
...
@@ -9,6 +9,7 @@ class GitalyTestSpawn
include
GitalyTest
def
run
set_bundler_config
install_gitaly_gems
if
ENV
[
'CI'
]
check_gitaly_config!
...
...
scripts/gitaly_test.rb
View file @
c68bf5f5
...
...
@@ -34,6 +34,10 @@ module GitalyTest
File
.
join
(
tmp_tests_gitaly_dir
,
'ruby'
,
'Gemfile'
)
end
def
gemfile_dir
File
.
dirname
(
gemfile
)
end
def
gitlab_shell_secret_file
File
.
join
(
tmp_tests_gitlab_shell_dir
,
'.gitlab_shell_secret'
)
end
...
...
@@ -42,8 +46,7 @@ module GitalyTest
env_hash
=
{
'HOME'
=>
File
.
expand_path
(
'tmp/tests'
),
'GEM_PATH'
=>
Gem
.
path
.
join
(
':'
),
'BUNDLE_APP_CONFIG'
=>
File
.
join
(
File
.
dirname
(
gemfile
),
'.bundle/config'
),
'BUNDLE_FLAGS'
=>
"--jobs=4 --retry=3"
,
'BUNDLE_APP_CONFIG'
=>
File
.
join
(
gemfile_dir
,
'.bundle'
),
'BUNDLE_INSTALL_FLAGS'
=>
nil
,
'BUNDLE_GEMFILE'
=>
gemfile
,
'RUBYOPT'
=>
nil
,
...
...
@@ -52,13 +55,20 @@ module GitalyTest
'GITALY_TESTING_NO_GIT_HOOKS'
=>
"1"
}
env_hash
end
# 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'
]
bundle_path
=
File
.
expand_path
(
'../vendor/gitaly-ruby'
,
__dir__
)
env_hash
[
'BUNDLE_FLAGS'
]
+=
" --path=
#{
bundle_path
}
"
system
(
'bundle'
,
'config'
,
'set'
,
'--local'
,
'path'
,
bundle_path
,
chdir:
gemfile_dir
)
end
env_hash
end
# rubocop:enable GitlabSecurity/SystemCommandInjection
def
config_path
(
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