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
91532018
Commit
91532018
authored
Oct 17, 2018
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for using git-lfs
parent
82df60dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
qa/qa/git/repository.rb
qa/qa/git/repository.rb
+17
-2
qa/qa/resource/repository/push.rb
qa/qa/resource/repository/push.rb
+4
-1
No files found.
qa/qa/git/repository.rb
View file @
91532018
...
...
@@ -11,7 +11,7 @@ module QA
class
Repository
include
Scenario
::
Actable
attr_writer
:password
attr_writer
:password
,
:use_lfs
attr_accessor
:env_vars
def
initialize
...
...
@@ -134,12 +134,27 @@ module QA
private
attr_reader
:uri
,
:username
,
:password
,
:known_hosts_file
,
:private_key_file
attr_reader
:uri
,
:username
,
:password
,
:known_hosts_file
,
:private_key_file
,
:use_lfs
alias_method
:use_lfs?
,
:use_lfs
def
ssh_key_set?
!
private_key_file
.
nil?
end
def
enable_lfs
# git lfs install *needs* a .gitconfig defined at ${HOME}/.gitconfig
FileUtils
.
mkdir_p
(
tmp_home_dir
)
touch_gitconfig_result
=
run
(
"touch
#{
tmp_home_dir
}
/.gitconfig"
)
return
touch_gitconfig_result
.
response
unless
touch_gitconfig_result
.
success?
git_lfs_install_result
=
run
(
'git lfs install'
)
touch_gitconfig_result
.
to_s
+
git_lfs_install_result
.
to_s
end
def
run
(
command_str
,
*
extra_env
)
command
=
[
env_vars
,
*
extra_env
,
command_str
,
'2>&1'
].
compact
.
join
(
' '
)
Runtime
::
Logger
.
debug
"Git: command=[
#{
command
}
]"
...
...
qa/qa/resource/repository/push.rb
View file @
91532018
...
...
@@ -8,7 +8,7 @@ module QA
class
Push
<
Base
attr_accessor
:file_name
,
:file_content
,
:commit_message
,
:branch_name
,
:new_branch
,
:output
,
:repository_http_uri
,
:repository_ssh_uri
,
:ssh_key
,
:user
:repository_ssh_uri
,
:ssh_key
,
:user
,
:use_lfs
attr_writer
:remote_branch
...
...
@@ -24,6 +24,7 @@ module QA
@new_branch
=
true
@repository_http_uri
=
""
@ssh_key
=
nil
@use_lfs
=
false
end
def
remote_branch
...
...
@@ -58,6 +59,8 @@ module QA
repository
.
use_default_credentials
unless
user
end
repository
.
use_lfs
=
use_lfs
username
=
'GitLab QA'
email
=
'root@gitlab.com'
...
...
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