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
7c4ef7b9
Commit
7c4ef7b9
authored
Mar 19, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
77d15aff
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
87 deletions
+43
-87
app/views/projects/deploy_keys/_index.html.haml
app/views/projects/deploy_keys/_index.html.haml
+1
-1
doc/administration/high_availability/database.md
doc/administration/high_availability/database.md
+29
-4
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
...dministration/troubleshooting/gitlab_rails_cheat_sheet.md
+0
-69
qa/qa/page/project/settings/ci_cd.rb
qa/qa/page/project/settings/ci_cd.rb
+10
-0
qa/qa/page/project/settings/repository.rb
qa/qa/page/project/settings/repository.rb
+0
-10
qa/qa/resource/deploy_key.rb
qa/qa/resource/deploy_key.rb
+1
-1
qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
...es/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
+1
-1
qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
...er_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
+1
-1
No files found.
app/views/projects/deploy_keys/_index.html.haml
View file @
7c4ef7b9
-
expanded
=
expanded_by_default?
-
expanded
=
expanded_by_default?
%section
.qa-deploy-keys-settings.settings.no-animate
#js-deploy-keys-settings
{
class:
(
'expanded'
if
expanded
)
}
%section
.qa-deploy-keys-settings.settings.no-animate
#js-deploy-keys-settings
{
class:
(
'expanded'
if
expanded
)
,
data:
{
qa_selector:
'deploy_keys_settings'
}
}
.settings-header
.settings-header
%h4
%h4
Deploy Keys
Deploy Keys
...
...
doc/administration/high_availability/database.md
View file @
7c4ef7b9
...
@@ -872,8 +872,9 @@ standby nodes.
...
@@ -872,8 +872,9 @@ standby nodes.
If a node fails, it can be removed from the cluster, or added back as a standby
If a node fails, it can be removed from the cluster, or added back as a standby
after it has been restored to service.
after it has been restored to service.
-
If you want to remove the node from the cluster, on any other node in the
##### Remove a standby from the cluster
cluster, run:
From any other node in the cluster, run:
```
shell
```
shell
gitlab-ctl repmgr standby unregister
--node
=
X
gitlab-ctl repmgr standby unregister
--node
=
X
...
@@ -893,13 +894,15 @@ after it has been restored to service.
...
@@ -893,13 +894,15 @@ after it has been restored to service.
959789412
959789412
```
```
Then you will use this
id
to unregister the node:
Then you will use this
ID
to unregister the node:
```
shell
```
shell
gitlab-ctl repmgr standby unregister
--node
=
959789412
gitlab-ctl repmgr standby unregister
--node
=
959789412
```
```
-
To add the node as a standby server:
##### Add a node as a standby server
From the stnadby node, run:
```
shell
```
shell
gitlab-ctl repmgr standby follow NEW_MASTER
gitlab-ctl repmgr standby follow NEW_MASTER
...
@@ -912,6 +915,28 @@ after it has been restored to service.
...
@@ -912,6 +915,28 @@ after it has been restored to service.
this will cause a split, and the old master will need to be resynced from
this will cause a split, and the old master will need to be resynced from
scratch by performing a
`gitlab-ctl repmgr standby setup NEW_MASTER`
.
scratch by performing a
`gitlab-ctl repmgr standby setup NEW_MASTER`
.
##### Add a failed master back into the cluster as a standby node
Once
`repmgrd`
and PostgreSQL are runnning, the node will need to follow the new
as a standby node.
```
gitlab-ctl repmgr standby follow NEW_MASTER
```
Once the node is following the new master as a standby, the node needs to be
[
unregistered from the cluster on the new master node
](
#remove-a-standby-from-the-cluster
)
.
Once the old master node has been unregistered from the cluster, it will need
to be setup as a new standby:
```
gitlab-ctl repmgr standby setup NEW_MASTER
```
Failure to unregister and readd the old master node can lead to subsequent failovers
not working.
#### Alternate configurations
#### Alternate configurations
##### Database authorization
##### Database authorization
...
...
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
View file @
7c4ef7b9
...
@@ -160,18 +160,6 @@ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone <repository>
...
@@ -160,18 +160,6 @@ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone <repository>
## Projects
## Projects
### Find projects
```
ruby
# A single project
project
=
Project
.
find_by_full_path
(
'PROJECT_PATH'
)
# All projects in a particular namespace. Can be a username, a group
# ('gitlab-org'), or even include subgroups ('gitlab-org/distribution')
namespace
=
Namespace
.
find_by_full_path
(
'NAMESPACE_PATH'
)
projects
=
namespace
.
all_projects
```
### Clear a project's cache
### Clear a project's cache
```
ruby
```
ruby
...
@@ -407,35 +395,6 @@ end
...
@@ -407,35 +395,6 @@ end
## Users
## Users
### Finding users
```
ruby
# By username
user
=
User
.
find_by
(
username:
''
)
# By primary email
user
=
User
.
find_by
(
email:
''
)
# By any email (primary or secondary)
user
=
User
.
find_by_any_email
(
''
)
# Admins
User
.
admins
admin
=
User
.
admins
.
first
```
### Block
```
ruby
User
.
find_by_username
().
block!
```
### Unblock
```
ruby
User
.
find_by_username
().
active
```
### Skip reconfirmation
### Skip reconfirmation
```
ruby
```
ruby
...
@@ -476,13 +435,6 @@ User.find(123).personal_access_tokens.create(
...
@@ -476,13 +435,6 @@ User.find(123).personal_access_tokens.create(
)
)
```
```
### Disable 2FA on a user
```
ruby
user
=
User
.
find_by_username
(
'username'
)
user
.
disable_two_factor!
```
### Active users & Historical users
### Active users & Historical users
```
ruby
```
ruby
...
@@ -546,20 +498,6 @@ group = Group.find_by_full_path 'group'
...
@@ -546,20 +498,6 @@ group = Group.find_by_full_path 'group'
user
.
max_member_access_for_group
group
.
id
user
.
max_member_access_for_group
group
.
id
```
```
### Change user password
```
ruby
password
=
"your password"
user
=
User
.
find_by_username
(
'your username'
)
password_attributes
=
{
password:
password
,
password_confirmation:
password
,
password_automatically_set:
false
}
result
=
Users
::
UpdateService
.
new
(
user
,
password_attributes
.
merge
(
user:
user
)).
execute
```
## Groups
## Groups
### Count unique users in a group and sub-groups
### Count unique users in a group and sub-groups
...
@@ -706,13 +644,6 @@ conflicting_permanent_redirects.destroy_all
...
@@ -706,13 +644,6 @@ conflicting_permanent_redirects.destroy_all
## Merge Requests
## Merge Requests
### Find Merge Request
```
ruby
m
=
project
.
merge_requests
.
find_by
(
iid:
<
IID
>
)
m
=
MergeRequest
.
find_by_title
(
'NEEDS UNIQUE TITLE!!!'
)
```
### Close a merge request properly (if merged but still marked as open)
### Close a merge request properly (if merged but still marked as open)
```
ruby
```
ruby
...
...
qa/qa/page/project/settings/ci_cd.rb
View file @
7c4ef7b9
...
@@ -17,12 +17,22 @@ module QA
...
@@ -17,12 +17,22 @@ module QA
element
:deploy_tokens_settings
element
:deploy_tokens_settings
end
end
view
'app/views/projects/deploy_keys/_index.html.haml'
do
element
:deploy_keys_settings
end
def
expand_deploy_tokens
(
&
block
)
def
expand_deploy_tokens
(
&
block
)
expand_section
(
:deploy_tokens_settings
)
do
expand_section
(
:deploy_tokens_settings
)
do
Settings
::
DeployTokens
.
perform
(
&
block
)
Settings
::
DeployTokens
.
perform
(
&
block
)
end
end
end
end
def
expand_deploy_keys
(
&
block
)
expand_section
(
:deploy_keys_settings
)
do
Settings
::
DeployKeys
.
perform
(
&
block
)
end
end
def
expand_runners_settings
(
&
block
)
def
expand_runners_settings
(
&
block
)
expand_section
(
:runners_settings_content
)
do
expand_section
(
:runners_settings_content
)
do
Settings
::
Runners
.
perform
(
&
block
)
Settings
::
Runners
.
perform
(
&
block
)
...
...
qa/qa/page/project/settings/repository.rb
View file @
7c4ef7b9
...
@@ -7,10 +7,6 @@ module QA
...
@@ -7,10 +7,6 @@ module QA
class
Repository
<
Page
::
Base
class
Repository
<
Page
::
Base
include
Common
include
Common
view
'app/views/projects/deploy_keys/_index.html.haml'
do
element
:deploy_keys_settings
end
view
'app/views/projects/protected_branches/shared/_index.html.haml'
do
view
'app/views/projects/protected_branches/shared/_index.html.haml'
do
element
:protected_branches_settings
element
:protected_branches_settings
end
end
...
@@ -19,12 +15,6 @@ module QA
...
@@ -19,12 +15,6 @@ module QA
element
:mirroring_repositories_settings_section
element
:mirroring_repositories_settings_section
end
end
def
expand_deploy_keys
(
&
block
)
expand_section
(
:deploy_keys_settings
)
do
DeployKeys
.
perform
(
&
block
)
end
end
def
expand_protected_branches
(
&
block
)
def
expand_protected_branches
(
&
block
)
expand_section
(
:protected_branches_settings
)
do
expand_section
(
:protected_branches_settings
)
do
ProtectedBranches
.
perform
(
&
block
)
ProtectedBranches
.
perform
(
&
block
)
...
...
qa/qa/resource/deploy_key.rb
View file @
7c4ef7b9
...
@@ -23,7 +23,7 @@ module QA
...
@@ -23,7 +23,7 @@ module QA
def
fabricate!
def
fabricate!
project
.
visit!
project
.
visit!
Page
::
Project
::
Menu
.
perform
(
&
:go_to_
repository
_settings
)
Page
::
Project
::
Menu
.
perform
(
&
:go_to_
ci_cd
_settings
)
Page
::
Project
::
Settings
::
CICD
.
perform
do
|
setting
|
Page
::
Project
::
Settings
::
CICD
.
perform
do
|
setting
|
setting
.
expand_deploy_keys
do
|
page
|
setting
.
expand_deploy_keys
do
|
page
|
...
...
qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
View file @
7c4ef7b9
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
module
QA
module
QA
context
'Release'
do
context
'Release'
do
describe
'Deploy key creation'
do
describe
'Deploy key creation'
do
it
'user adds a deploy key'
,
quarantine:
'https://gitlab.com/gitlab-org/gitlab/issues/208761'
do
it
'user adds a deploy key'
do
Flow
::
Login
.
sign_in
Flow
::
Login
.
sign_in
key
=
Runtime
::
Key
::
RSA
.
new
key
=
Runtime
::
Key
::
RSA
.
new
...
...
qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
View file @
7c4ef7b9
...
@@ -35,7 +35,7 @@ module QA
...
@@ -35,7 +35,7 @@ module QA
]
]
keys
.
each
do
|
(
key_class
,
bits
)
|
keys
.
each
do
|
(
key_class
,
bits
)
|
it
"user sets up a deploy key with
#{
key_class
}
(
#{
bits
}
) to clone code using pipelines"
,
quarantine:
'https://gitlab.com/gitlab-org/gitlab/issues/208761'
do
it
"user sets up a deploy key with
#{
key_class
}
(
#{
bits
}
) to clone code using pipelines"
do
key
=
key_class
.
new
(
*
bits
)
key
=
key_class
.
new
(
*
bits
)
Resource
::
DeployKey
.
fabricate_via_browser_ui!
do
|
resource
|
Resource
::
DeployKey
.
fabricate_via_browser_ui!
do
|
resource
|
...
...
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