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
3ee9bca5
Commit
3ee9bca5
authored
Jan 23, 2019
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow Gitaly to be built from a custom URL
parent
ae216618
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
doc/development/gitaly.md
doc/development/gitaly.md
+19
-0
spec/support/helpers/test_env.rb
spec/support/helpers/test_env.rb
+6
-1
No files found.
doc/development/gitaly.md
View file @
3ee9bca5
...
...
@@ -130,6 +130,25 @@ Gitaly. To use a custom Gitaly version in CI you need to update
GITALY_SERVER_VERSION. You can use the format
`=revision`
to use a
non-tagged commit from https://gitlab.com/gitlab-org/gitaly in CI.
To use a different Gitaly repository, e.g., if your changes are present
on a fork, you can specify a
`GITALY_REPO_URL`
environment variable when
running tests:
```
shell
GITALY_REPO_URL
=
https://gitlab.com/nick.thomas/gitaly bundle
exec
rspec spec/lib/gitlab/git/repository_spec.rb
```
If your fork of Gitaly is private, you can generate a
[
Deploy Token
](
../user/project/deploy_tokens/index.md
)
and specify it in the URL:
```
shell
GITALY_REPO_URL
=
https://gitlab+deploy-token-1000:token-here@gitlab.com/nick.thomas/gitaly bundle
exec
rspec spec/lib/gitlab/git/repository_spec.rb
```
To use a custom Gitaly repository in CI, for instance if you want your
GitLab fork to always use your own Gitaly fork, set
`GITALY_REPO_URL`
as a
[
CI environment variable
](
../ci/variables/README.md#variables
)
.
---
[
Return to Development documentation
](
README.md
)
spec/support/helpers/test_env.rb
View file @
3ee9bca5
...
...
@@ -160,11 +160,12 @@ module TestEnv
def
setup_gitaly
socket_path
=
Gitlab
::
GitalyClient
.
address
(
'default'
).
sub
(
/\Aunix:/
,
''
)
gitaly_dir
=
File
.
dirname
(
socket_path
)
install_gitaly_args
=
[
gitaly_dir
,
repos_path
,
gitaly_url
].
compact
.
join
(
','
)
component_timed_setup
(
'Gitaly'
,
install_dir:
gitaly_dir
,
version:
Gitlab
::
GitalyClient
.
expected_server_version
,
task:
"gitlab:gitaly:install[
#{
gitaly_dir
}
,
#{
repos_path
}
]"
)
do
task:
"gitlab:gitaly:install[
#{
install_gitaly_args
}
]"
)
do
Gitlab
::
SetupHelper
.
create_gitaly_configuration
(
gitaly_dir
,
{
'default'
=>
repos_path
},
force:
true
)
start_gitaly
(
gitaly_dir
)
...
...
@@ -215,6 +216,10 @@ module TestEnv
# The process can already be gone if the test run was INTerrupted.
end
def
gitaly_url
ENV
.
fetch
(
'GITALY_REPO_URL'
,
nil
)
end
def
setup_factory_repo
setup_repo
(
factory_repo_path
,
factory_repo_path_bare
,
factory_repo_name
,
BRANCH_SHA
)
...
...
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