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
353c5782
Commit
353c5782
authored
Apr 03, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checkout to a new branch
parent
1fe57d3f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
qa/qa/factory/repository/push.rb
qa/qa/factory/repository/push.rb
+6
-1
qa/qa/git/repository.rb
qa/qa/git/repository.rb
+4
-0
qa/qa/specs/features/project/deploy_key_clone_spec.rb
qa/qa/specs/features/project/deploy_key_clone_spec.rb
+1
-0
No files found.
qa/qa/factory/repository/push.rb
View file @
353c5782
...
...
@@ -30,7 +30,12 @@ module QA
repository
.
clone
repository
.
configure_identity
(
'GitLab QA'
,
'root@gitlab.com'
)
repository
.
checkout
(
@branch_name
)
unless
@new_branch
if
@new_branch
repository
.
checkout_new_branch
(
@branch_name
)
else
repository
.
checkout
(
@branch_name
)
end
repository
.
add_file
(
@file_name
,
@file_content
)
repository
.
commit
(
@commit_message
)
repository
.
push_changes
(
@branch_name
)
...
...
qa/qa/git/repository.rb
View file @
353c5782
...
...
@@ -40,6 +40,10 @@ module QA
`git checkout "
#{
branch_name
}
"`
end
def
checkout_new_branch
(
branch_name
)
`git checkout -b "
#{
branch_name
}
"`
end
def
shallow_clone
clone
(
'--depth 1'
)
end
...
...
qa/qa/specs/features/project/deploy_key_clone_spec.rb
View file @
353c5782
...
...
@@ -74,6 +74,7 @@ module QA
resource
.
commit_message
=
'Add .gitlab-ci.yml'
resource
.
file_content
=
gitlab_ci
resource
.
branch_name
=
deploy_key_name
resource
.
new_branch
=
true
end
sha1sum
=
Digest
::
SHA1
.
hexdigest
(
gitlab_ci
)
...
...
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