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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
b8f12d19
Commit
b8f12d19
authored
Jun 23, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace GITLAB with GitLab in rake task descriptions
parent
12e09986
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
37 additions
and
37 deletions
+37
-37
lib/tasks/cache.rake
lib/tasks/cache.rake
+1
-1
lib/tasks/dev.rake
lib/tasks/dev.rake
+2
-2
lib/tasks/gitlab/backup.rake
lib/tasks/gitlab/backup.rake
+2
-2
lib/tasks/gitlab/bulk_add_permission.rake
lib/tasks/gitlab/bulk_add_permission.rake
+4
-4
lib/tasks/gitlab/check.rake
lib/tasks/gitlab/check.rake
+5
-5
lib/tasks/gitlab/cleanup.rake
lib/tasks/gitlab/cleanup.rake
+3
-3
lib/tasks/gitlab/enable_automerge.rake
lib/tasks/gitlab/enable_automerge.rake
+1
-1
lib/tasks/gitlab/generate_docs.rake
lib/tasks/gitlab/generate_docs.rake
+1
-1
lib/tasks/gitlab/import.rake
lib/tasks/gitlab/import.rake
+1
-1
lib/tasks/gitlab/info.rake
lib/tasks/gitlab/info.rake
+1
-1
lib/tasks/gitlab/setup.rake
lib/tasks/gitlab/setup.rake
+1
-1
lib/tasks/gitlab/shell.rake
lib/tasks/gitlab/shell.rake
+3
-3
lib/tasks/gitlab/test.rake
lib/tasks/gitlab/test.rake
+1
-1
lib/tasks/gitlab/web_hook.rake
lib/tasks/gitlab/web_hook.rake
+3
-3
lib/tasks/migrate/add_limits_mysql.rake
lib/tasks/migrate/add_limits_mysql.rake
+1
-1
lib/tasks/migrate/migrate_iids.rake
lib/tasks/migrate/migrate_iids.rake
+1
-1
lib/tasks/setup.rake
lib/tasks/setup.rake
+1
-1
lib/tasks/sidekiq.rake
lib/tasks/sidekiq.rake
+3
-3
lib/tasks/test.rake
lib/tasks/test.rake
+2
-2
No files found.
lib/tasks/cache.rake
View file @
b8f12d19
namespace
:cache
do
namespace
:cache
do
desc
"G
ITLAB
| Clear redis cache"
desc
"G
itLab
| Clear redis cache"
task
:clear
=>
:environment
do
task
:clear
=>
:environment
do
# Hack into Rails.cache until https://github.com/redis-store/redis-store/pull/225
# Hack into Rails.cache until https://github.com/redis-store/redis-store/pull/225
# is accepted (I hope) and we can update the redis-store gem.
# is accepted (I hope) and we can update the redis-store gem.
...
...
lib/tasks/dev.rake
View file @
b8f12d19
task
dev:
[
"dev:setup"
]
task
dev:
[
"dev:setup"
]
namespace
:dev
do
namespace
:dev
do
desc
"G
ITLAB
| Setup developer environment (db, fixtures)"
desc
"G
itLab
| Setup developer environment (db, fixtures)"
task
:setup
=>
:environment
do
task
:setup
=>
:environment
do
ENV
[
'force'
]
=
'yes'
ENV
[
'force'
]
=
'yes'
Rake
::
Task
[
"gitlab:setup"
].
invoke
Rake
::
Task
[
"gitlab:setup"
].
invoke
Rake
::
Task
[
"gitlab:shell:setup"
].
invoke
Rake
::
Task
[
"gitlab:shell:setup"
].
invoke
end
end
desc
'G
ITLAB
| Start/restart foreman and watch for changes'
desc
'G
itLab
| Start/restart foreman and watch for changes'
task
:foreman
=>
:environment
do
task
:foreman
=>
:environment
do
sh
'rerun --dir app,config,lib -- foreman start'
sh
'rerun --dir app,config,lib -- foreman start'
end
end
...
...
lib/tasks/gitlab/backup.rake
View file @
b8f12d19
...
@@ -3,7 +3,7 @@ require 'active_record/fixtures'
...
@@ -3,7 +3,7 @@ require 'active_record/fixtures'
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:backup
do
namespace
:backup
do
# Create backup of GitLab system
# Create backup of GitLab system
desc
"G
ITLAB
| Create a backup of the GitLab system"
desc
"G
itLab
| Create a backup of the GitLab system"
task
create: :environment
do
task
create: :environment
do
warn_user_is_not_gitlab
warn_user_is_not_gitlab
configure_cron_mode
configure_cron_mode
...
@@ -19,7 +19,7 @@ namespace :gitlab do
...
@@ -19,7 +19,7 @@ namespace :gitlab do
end
end
# Restore backup of GitLab system
# Restore backup of GitLab system
desc
"G
ITLAB
| Restore a previously created backup"
desc
"G
itLab
| Restore a previously created backup"
task
restore: :environment
do
task
restore: :environment
do
warn_user_is_not_gitlab
warn_user_is_not_gitlab
configure_cron_mode
configure_cron_mode
...
...
lib/tasks/gitlab/bulk_add_permission.rake
View file @
b8f12d19
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:import
do
namespace
:import
do
desc
"G
ITLAB
| Add all users to all projects (admin users are added as masters)"
desc
"G
itLab
| Add all users to all projects (admin users are added as masters)"
task
all_users_to_all_projects: :environment
do
|
t
,
args
|
task
all_users_to_all_projects: :environment
do
|
t
,
args
|
user_ids
=
User
.
where
(
admin:
false
).
pluck
(
:id
)
user_ids
=
User
.
where
(
admin:
false
).
pluck
(
:id
)
admin_ids
=
User
.
where
(
admin:
true
).
pluck
(
:id
)
admin_ids
=
User
.
where
(
admin:
true
).
pluck
(
:id
)
...
@@ -13,7 +13,7 @@ namespace :gitlab do
...
@@ -13,7 +13,7 @@ namespace :gitlab do
ProjectMember
.
add_users_into_projects
(
projects_ids
,
admin_ids
,
ProjectMember
::
MASTER
)
ProjectMember
.
add_users_into_projects
(
projects_ids
,
admin_ids
,
ProjectMember
::
MASTER
)
end
end
desc
"G
ITLAB
| Add a specific user to all projects (as a developer)"
desc
"G
itLab
| Add a specific user to all projects (as a developer)"
task
:user_to_projects
,
[
:email
]
=>
:environment
do
|
t
,
args
|
task
:user_to_projects
,
[
:email
]
=>
:environment
do
|
t
,
args
|
user
=
User
.
find_by
(
email:
args
.
email
)
user
=
User
.
find_by
(
email:
args
.
email
)
project_ids
=
Project
.
pluck
(
:id
)
project_ids
=
Project
.
pluck
(
:id
)
...
@@ -21,7 +21,7 @@ namespace :gitlab do
...
@@ -21,7 +21,7 @@ namespace :gitlab do
ProjectMember
.
add_users_into_projects
(
project_ids
,
Array
.
wrap
(
user
.
id
),
ProjectMember
::
DEVELOPER
)
ProjectMember
.
add_users_into_projects
(
project_ids
,
Array
.
wrap
(
user
.
id
),
ProjectMember
::
DEVELOPER
)
end
end
desc
"G
ITLAB
| Add all users to all groups (admin users are added as owners)"
desc
"G
itLab
| Add all users to all groups (admin users are added as owners)"
task
all_users_to_all_groups: :environment
do
|
t
,
args
|
task
all_users_to_all_groups: :environment
do
|
t
,
args
|
user_ids
=
User
.
where
(
admin:
false
).
pluck
(
:id
)
user_ids
=
User
.
where
(
admin:
false
).
pluck
(
:id
)
admin_ids
=
User
.
where
(
admin:
true
).
pluck
(
:id
)
admin_ids
=
User
.
where
(
admin:
true
).
pluck
(
:id
)
...
@@ -35,7 +35,7 @@ namespace :gitlab do
...
@@ -35,7 +35,7 @@ namespace :gitlab do
end
end
end
end
desc
"G
ITLAB
| Add a specific user to all groups (as a developer)"
desc
"G
itLab
| Add a specific user to all groups (as a developer)"
task
:user_to_groups
,
[
:email
]
=>
:environment
do
|
t
,
args
|
task
:user_to_groups
,
[
:email
]
=>
:environment
do
|
t
,
args
|
user
=
User
.
find_by_email
args
.
email
user
=
User
.
find_by_email
args
.
email
groups
=
Group
.
all
groups
=
Group
.
all
...
...
lib/tasks/gitlab/check.rake
View file @
b8f12d19
namespace
:gitlab
do
namespace
:gitlab
do
desc
"G
ITLAB
| Check the configuration of GitLab and its environment"
desc
"G
itLab
| Check the configuration of GitLab and its environment"
task
check:
%w{gitlab:gitlab_shell:check
task
check:
%w{gitlab:gitlab_shell:check
gitlab:sidekiq:check
gitlab:sidekiq:check
gitlab:ldap:check
gitlab:ldap:check
...
@@ -8,7 +8,7 @@ namespace :gitlab do
...
@@ -8,7 +8,7 @@ namespace :gitlab do
namespace
:app
do
namespace
:app
do
desc
"G
ITLAB
| Check the configuration of the GitLab Rails app"
desc
"G
itLab
| Check the configuration of the GitLab Rails app"
task
check: :environment
do
task
check: :environment
do
warn_user_is_not_gitlab
warn_user_is_not_gitlab
start_checking
"GitLab"
start_checking
"GitLab"
...
@@ -329,7 +329,7 @@ namespace :gitlab do
...
@@ -329,7 +329,7 @@ namespace :gitlab do
end
end
namespace
:gitlab_shell
do
namespace
:gitlab_shell
do
desc
"G
ITLAB
| Check the configuration of GitLab Shell"
desc
"G
itLab
| Check the configuration of GitLab Shell"
task
check: :environment
do
task
check: :environment
do
warn_user_is_not_gitlab
warn_user_is_not_gitlab
start_checking
"GitLab Shell"
start_checking
"GitLab Shell"
...
@@ -574,7 +574,7 @@ namespace :gitlab do
...
@@ -574,7 +574,7 @@ namespace :gitlab do
namespace
:sidekiq
do
namespace
:sidekiq
do
desc
"G
ITLAB
| Check the configuration of Sidekiq"
desc
"G
itLab
| Check the configuration of Sidekiq"
task
check: :environment
do
task
check: :environment
do
warn_user_is_not_gitlab
warn_user_is_not_gitlab
start_checking
"Sidekiq"
start_checking
"Sidekiq"
...
@@ -667,7 +667,7 @@ namespace :gitlab do
...
@@ -667,7 +667,7 @@ namespace :gitlab do
end
end
namespace
:repo
do
namespace
:repo
do
desc
"G
ITLAB
| Check the integrity of the repositories managed by GitLab"
desc
"G
itLab
| Check the integrity of the repositories managed by GitLab"
task
check: :environment
do
task
check: :environment
do
namespace_dirs
=
Dir
.
glob
(
namespace_dirs
=
Dir
.
glob
(
File
.
join
(
Gitlab
.
config
.
gitlab_shell
.
repos_path
,
'*'
)
File
.
join
(
Gitlab
.
config
.
gitlab_shell
.
repos_path
,
'*'
)
...
...
lib/tasks/gitlab/cleanup.rake
View file @
b8f12d19
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:cleanup
do
namespace
:cleanup
do
desc
"G
ITLAB
| Cleanup | Clean namespaces"
desc
"G
itLab
| Cleanup | Clean namespaces"
task
dirs: :environment
do
task
dirs: :environment
do
warn_user_is_not_gitlab
warn_user_is_not_gitlab
remove_flag
=
ENV
[
'REMOVE'
]
remove_flag
=
ENV
[
'REMOVE'
]
...
@@ -43,7 +43,7 @@ namespace :gitlab do
...
@@ -43,7 +43,7 @@ namespace :gitlab do
end
end
end
end
desc
"G
ITLAB
| Cleanup | Clean repositories"
desc
"G
itLab
| Cleanup | Clean repositories"
task
repos: :environment
do
task
repos: :environment
do
warn_user_is_not_gitlab
warn_user_is_not_gitlab
remove_flag
=
ENV
[
'REMOVE'
]
remove_flag
=
ENV
[
'REMOVE'
]
...
@@ -85,7 +85,7 @@ namespace :gitlab do
...
@@ -85,7 +85,7 @@ namespace :gitlab do
end
end
end
end
desc
"G
ITLAB
| Cleanup | Block users that have been removed in LDAP"
desc
"G
itLab
| Cleanup | Block users that have been removed in LDAP"
task
block_removed_ldap_users: :environment
do
task
block_removed_ldap_users: :environment
do
warn_user_is_not_gitlab
warn_user_is_not_gitlab
block_flag
=
ENV
[
'BLOCK'
]
block_flag
=
ENV
[
'BLOCK'
]
...
...
lib/tasks/gitlab/enable_automerge.rake
View file @
b8f12d19
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:satellites
do
namespace
:satellites
do
desc
"G
ITLAB
| Create satellite repos"
desc
"G
itLab
| Create satellite repos"
task
create: :environment
do
task
create: :environment
do
create_satellites
create_satellites
end
end
...
...
lib/tasks/gitlab/generate_docs.rake
View file @
b8f12d19
namespace
:gitlab
do
namespace
:gitlab
do
desc
"G
ITLAB
| Generate sdocs for project"
desc
"G
itLab
| Generate sdocs for project"
task
generate_docs: :environment
do
task
generate_docs: :environment
do
system
(
*
%W(bundle exec sdoc -o doc/code app lib)
)
system
(
*
%W(bundle exec sdoc -o doc/code app lib)
)
end
end
...
...
lib/tasks/gitlab/import.rake
View file @
b8f12d19
...
@@ -9,7 +9,7 @@ namespace :gitlab do
...
@@ -9,7 +9,7 @@ namespace :gitlab do
# * The project owner will set to the first administator of the system
# * The project owner will set to the first administator of the system
# * Existing projects will be skipped
# * Existing projects will be skipped
#
#
desc
"G
ITLAB
| Import bare repositories from gitlab_shell -> repos_path into GitLab project instance"
desc
"G
itLab
| Import bare repositories from gitlab_shell -> repos_path into GitLab project instance"
task
repos: :environment
do
task
repos: :environment
do
git_base_path
=
Gitlab
.
config
.
gitlab_shell
.
repos_path
git_base_path
=
Gitlab
.
config
.
gitlab_shell
.
repos_path
...
...
lib/tasks/gitlab/info.rake
View file @
b8f12d19
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:env
do
namespace
:env
do
desc
"G
ITLAB
| Show information about GitLab and its environment"
desc
"G
itLab
| Show information about GitLab and its environment"
task
info: :environment
do
task
info: :environment
do
# check if there is an RVM environment
# check if there is an RVM environment
...
...
lib/tasks/gitlab/setup.rake
View file @
b8f12d19
namespace
:gitlab
do
namespace
:gitlab
do
desc
"G
ITLAB
| Setup production application"
desc
"G
itLab
| Setup production application"
task
setup: :environment
do
task
setup: :environment
do
setup_db
setup_db
end
end
...
...
lib/tasks/gitlab/shell.rake
View file @
b8f12d19
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:shell
do
namespace
:shell
do
desc
"G
ITLAB
| Install or upgrade gitlab-shell"
desc
"G
itLab
| Install or upgrade gitlab-shell"
task
:install
,
[
:tag
,
:repo
]
=>
:environment
do
|
t
,
args
|
task
:install
,
[
:tag
,
:repo
]
=>
:environment
do
|
t
,
args
|
warn_user_is_not_gitlab
warn_user_is_not_gitlab
...
@@ -75,12 +75,12 @@ namespace :gitlab do
...
@@ -75,12 +75,12 @@ namespace :gitlab do
end
end
end
end
desc
"G
ITLAB
| Setup gitlab-shell"
desc
"G
itLab
| Setup gitlab-shell"
task
setup: :environment
do
task
setup: :environment
do
setup
setup
end
end
desc
"G
ITLAB
| Build missing projects"
desc
"G
itLab
| Build missing projects"
task
build_missing_projects: :environment
do
task
build_missing_projects: :environment
do
Project
.
find_each
(
batch_size:
1000
)
do
|
project
|
Project
.
find_each
(
batch_size:
1000
)
do
|
project
|
path_to_repo
=
project
.
repository
.
path_to_repo
path_to_repo
=
project
.
repository
.
path_to_repo
...
...
lib/tasks/gitlab/test.rake
View file @
b8f12d19
namespace
:gitlab
do
namespace
:gitlab
do
desc
"G
ITLAB
| Run all tests"
desc
"G
itLab
| Run all tests"
task
:test
do
task
:test
do
cmds
=
[
cmds
=
[
%W(rake brakeman)
,
%W(rake brakeman)
,
...
...
lib/tasks/gitlab/web_hook.rake
View file @
b8f12d19
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:web_hook
do
namespace
:web_hook
do
desc
"G
ITLAB
| Adds a web hook to the projects"
desc
"G
itLab
| Adds a web hook to the projects"
task
:add
=>
:environment
do
task
:add
=>
:environment
do
web_hook_url
=
ENV
[
'URL'
]
web_hook_url
=
ENV
[
'URL'
]
namespace_path
=
ENV
[
'NAMESPACE'
]
namespace_path
=
ENV
[
'NAMESPACE'
]
...
@@ -20,7 +20,7 @@ namespace :gitlab do
...
@@ -20,7 +20,7 @@ namespace :gitlab do
end
end
end
end
desc
"G
ITLAB
| Remove a web hook from the projects"
desc
"G
itLab
| Remove a web hook from the projects"
task
:rm
=>
:environment
do
task
:rm
=>
:environment
do
web_hook_url
=
ENV
[
'URL'
]
web_hook_url
=
ENV
[
'URL'
]
namespace_path
=
ENV
[
'NAMESPACE'
]
namespace_path
=
ENV
[
'NAMESPACE'
]
...
@@ -33,7 +33,7 @@ namespace :gitlab do
...
@@ -33,7 +33,7 @@ namespace :gitlab do
puts
"
#{
count
}
web hooks were removed."
puts
"
#{
count
}
web hooks were removed."
end
end
desc
"G
ITLAB
| List web hooks"
desc
"G
itLab
| List web hooks"
task
:list
=>
:environment
do
task
:list
=>
:environment
do
namespace_path
=
ENV
[
'NAMESPACE'
]
namespace_path
=
ENV
[
'NAMESPACE'
]
...
...
lib/tasks/migrate/add_limits_mysql.rake
View file @
b8f12d19
require
Rails
.
root
.
join
(
'db/migrate/limits_to_mysql'
)
require
Rails
.
root
.
join
(
'db/migrate/limits_to_mysql'
)
desc
"G
ITLAB
| Add limits to strings in mysql database"
desc
"G
itLab
| Add limits to strings in mysql database"
task
add_limits_mysql: :environment
do
task
add_limits_mysql: :environment
do
puts
"Adding limits to schema.rb for mysql"
puts
"Adding limits to schema.rb for mysql"
LimitsToMysql
.
new
.
up
LimitsToMysql
.
new
.
up
...
...
lib/tasks/migrate/migrate_iids.rake
View file @
b8f12d19
desc
"G
ITLAB
| Build internal ids for issues and merge requests"
desc
"G
itLab
| Build internal ids for issues and merge requests"
task
migrate_iids: :environment
do
task
migrate_iids: :environment
do
puts
'Issues'
.
yellow
puts
'Issues'
.
yellow
Issue
.
where
(
iid:
nil
).
find_each
(
batch_size:
100
)
do
|
issue
|
Issue
.
where
(
iid:
nil
).
find_each
(
batch_size:
100
)
do
|
issue
|
...
...
lib/tasks/setup.rake
View file @
b8f12d19
desc
"G
ITLAB
| Setup gitlab db"
desc
"G
itLab
| Setup gitlab db"
task
:setup
do
task
:setup
do
Rake
::
Task
[
"gitlab:setup"
].
invoke
Rake
::
Task
[
"gitlab:setup"
].
invoke
end
end
lib/tasks/sidekiq.rake
View file @
b8f12d19
namespace
:sidekiq
do
namespace
:sidekiq
do
desc
"G
ITLAB
| Stop sidekiq"
desc
"G
itLab
| Stop sidekiq"
task
:stop
do
task
:stop
do
system
*
%W(bin/background_jobs stop)
system
*
%W(bin/background_jobs stop)
end
end
desc
"G
ITLAB
| Start sidekiq"
desc
"G
itLab
| Start sidekiq"
task
:start
do
task
:start
do
system
*
%W(bin/background_jobs start)
system
*
%W(bin/background_jobs start)
end
end
...
@@ -14,7 +14,7 @@ namespace :sidekiq do
...
@@ -14,7 +14,7 @@ namespace :sidekiq do
system
*
%W(bin/background_jobs restart)
system
*
%W(bin/background_jobs restart)
end
end
desc
"G
ITLAB
| Start sidekiq with launchd on Mac OS X"
desc
"G
itLab
| Start sidekiq with launchd on Mac OS X"
task
:launchd
do
task
:launchd
do
system
*
%W(bin/background_jobs start_no_deamonize)
system
*
%W(bin/background_jobs start_no_deamonize)
end
end
...
...
lib/tasks/test.rake
View file @
b8f12d19
Rake
::
Task
[
"test"
].
clear
Rake
::
Task
[
"test"
].
clear
desc
"G
ITLAB
| Run all tests"
desc
"G
itLab
| Run all tests"
task
:test
do
task
:test
do
Rake
::
Task
[
"gitlab:test"
].
invoke
Rake
::
Task
[
"gitlab:test"
].
invoke
end
end
...
@@ -8,6 +8,6 @@ end
...
@@ -8,6 +8,6 @@ end
unless
Rails
.
env
.
production?
unless
Rails
.
env
.
production?
require
'coveralls/rake/task'
require
'coveralls/rake/task'
Coveralls
::
RakeTask
.
new
Coveralls
::
RakeTask
.
new
desc
"G
ITLAB
| Run all tests on CI with simplecov"
desc
"G
itLab
| Run all tests on CI with simplecov"
task
:test_ci
=>
[
:rubocop
,
:brakeman
,
'jasmine:ci'
,
:spinach
,
:spec
,
'coveralls:push'
]
task
:test_ci
=>
[
:rubocop
,
:brakeman
,
'jasmine:ci'
,
:spinach
,
:spec
,
'coveralls:push'
]
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