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
6cca8974
Commit
6cca8974
authored
Jun 05, 2016
by
Connor Shea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove colorize methods that weren't in CE.
parent
76d7c111
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
lib/tasks/gitlab/backup.rake
lib/tasks/gitlab/backup.rake
+5
-5
lib/tasks/gitlab/check.rake
lib/tasks/gitlab/check.rake
+4
-4
lib/tasks/gitlab/elastic.rake
lib/tasks/gitlab/elastic.rake
+8
-8
No files found.
lib/tasks/gitlab/backup.rake
View file @
6cca8974
...
...
@@ -160,20 +160,20 @@ namespace :gitlab do
namespace
:pages
do
task
create: :environment
do
$progress
.
puts
"Dumping pages ... "
.
blue
$progress
.
puts
"Dumping pages ... "
.
color
(
:blue
)
if
ENV
[
"SKIP"
]
&&
ENV
[
"SKIP"
].
include?
(
"pages"
)
$progress
.
puts
"[SKIPPED]"
.
c
yan
$progress
.
puts
"[SKIPPED]"
.
c
olor
(
:cyan
)
else
Backup
::
Pages
.
new
.
dump
$progress
.
puts
"done"
.
green
$progress
.
puts
"done"
.
color
(
:green
)
end
end
task
restore: :environment
do
$progress
.
puts
"Restoring pages ... "
.
blue
$progress
.
puts
"Restoring pages ... "
.
color
(
:blue
)
Backup
::
Pages
.
new
.
restore
$progress
.
puts
"done"
.
green
$progress
.
puts
"done"
.
color
(
:green
)
end
end
...
...
lib/tasks/gitlab/check.rake
View file @
6cca8974
...
...
@@ -980,17 +980,17 @@ namespace :gitlab do
version
=
client
.
info
[
"version"
][
"number"
]
if
version
.
starts_with?
(
"2"
)
puts
"yes (
#{
version
}
)"
.
green
puts
"yes (
#{
version
}
)"
.
color
(
:green
)
else
puts
"no"
.
red
puts
"no"
.
color
(
:red
)
end
print
"Elasticsearch has plugin delete-by-query installed? ... "
if
client
.
cat
.
plugins
.
include?
(
"delete-by-query"
)
puts
"yes"
.
green
puts
"yes"
.
color
(
:green
)
else
puts
"no"
.
red
puts
"no"
.
color
(
:red
)
end
end
end
lib/tasks/gitlab/elastic.rake
View file @
6cca8974
...
...
@@ -35,7 +35,7 @@ namespace :gitlab do
head_commit
=
repository
.
commit
if
!
head_commit
||
index_status
.
last_commit
==
head_commit
.
sha
puts
"Skipped"
.
yellow
puts
"Skipped"
.
color
(
:yellow
)
next
end
...
...
@@ -48,7 +48,7 @@ namespace :gitlab do
# During indexing the new commits can be pushed,
# the last_commit parameter only indicates that at least this commit is in index
index_status
.
update
(
last_commit:
head_commit
.
sha
,
indexed_at:
DateTime
.
now
)
puts
"Done!"
.
green
puts
"Done!"
.
color
(
:green
)
rescue
StandardError
=>
e
puts
"
#{
e
.
message
}
, trace -
#{
e
.
backtrace
}
"
end
...
...
@@ -67,7 +67,7 @@ namespace :gitlab do
puts
"Indexing wiki of
#{
project
.
name_with_namespace
}
..."
begin
project
.
wiki
.
index_blobs
puts
"Done!"
.
green
puts
"Done!"
.
color
(
:green
)
rescue
StandardError
=>
e
puts
"
#{
e
.
message
}
, trace -
#{
e
.
backtrace
}
"
end
...
...
@@ -88,7 +88,7 @@ namespace :gitlab do
klass
.
import
end
puts
"done"
.
green
puts
"done"
.
color
(
:green
)
end
end
...
...
@@ -111,7 +111,7 @@ namespace :gitlab do
klass
.
import
end
puts
"done"
.
green
puts
"done"
.
color
(
:green
)
end
desc
"GitLab | Create empty Elasticsearch indexes"
...
...
@@ -130,14 +130,14 @@ namespace :gitlab do
klass
.
__elasticsearch__
.
create_index!
puts
"done"
.
green
puts
"done"
.
color
(
:green
)
end
end
desc
"GitLab | Clear Elasticsearch indexing status"
task
clear_index_status: :environment
do
IndexStatus
.
destroy_all
puts
"Done"
.
green
puts
"Done"
.
color
(
:green
)
end
desc
"GitLab | Delete Elasticsearch indexes"
...
...
@@ -156,7 +156,7 @@ namespace :gitlab do
klass
.
__elasticsearch__
.
delete_index!
puts
"done"
.
green
puts
"done"
.
color
(
:green
)
end
end
...
...
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