Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
0
Merge Requests
0
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-shell
Commits
9a0f4703
Commit
9a0f4703
authored
Aug 31, 2017
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support `redis` field on /internal/check API endpoint
parent
3ce0677a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
12 deletions
+29
-12
CHANGELOG
CHANGELOG
+1
-0
bin/check
bin/check
+28
-12
No files found.
CHANGELOG
View file @
9a0f4703
v5.9.0
- Support new /internal/post-receive API endpoint for post-receive operations
- Support `redis` field on /internal/check API endpoint
v5.8.1
- Support old versions of ruby without monotonic clock
...
...
bin/check
View file @
9a0f4703
...
...
@@ -3,6 +3,17 @@
require_relative
'../lib/gitlab_init'
require_relative
'../lib/gitlab_net'
def
ping_redis
print
"Send ping to redis server: "
if
GitlabNet
.
new
.
redis_client
.
ping
print
'OK'
else
abort
'FAILED'
end
puts
"
\n
"
end
#
# GitLab shell check task
#
...
...
@@ -10,11 +21,25 @@ require_relative '../lib/gitlab_net'
print
"Check GitLab API access: "
begin
resp
=
GitlabNet
.
new
.
check
if
resp
.
code
==
"200"
print
'OK'
else
if
resp
.
code
!=
"200"
abort
"FAILED. code:
#{
resp
.
code
}
"
end
puts
'OK'
check_values
=
JSON
.
parse
(
resp
.
body
)
if
check_values
.
key?
(
'redis'
)
print
'Redis available via internal API: '
if
check_values
[
'redis'
]
puts
'OK'
else
abort
'FAILED'
end
else
ping_redis
end
rescue
GitlabNet
::
ApiUnreachableError
abort
"FAILED: Failed to connect to internal API"
end
...
...
@@ -30,12 +55,3 @@ else
abort
"FAILED"
end
puts
"
\n
"
print
"Send ping to redis server: "
if
GitlabNet
.
new
.
redis_client
.
ping
print
'OK'
else
abort
'FAILED'
end
puts
"
\n
"
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