BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
433f2dbc
Commit
433f2dbc
authored
Feb 09, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
task to build missing projects with gitlab-shell
parent
2f0a75ab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
shell.rake
lib/tasks/gitlab/shell.rake
+18
-2
No files found.
lib/tasks/gitlab/shell.rake
View file @
433f2dbc
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:shell
do
namespace
:shell
do
desc
"GITLAB | Setup gitlab-shell"
desc
"GITLAB | Setup gitlab-shell"
task
:setup
=>
:environment
do
task
setup:
:environment
do
setup
setup
end
end
desc
"GITLAB | Build missing projects"
task
build_missing_projects: :environment
do
Project
.
find_each
(
batch_size:
1000
)
do
|
project
|
path_to_repo
=
File
.
join
(
Gitlab
.
config
.
gitolite
.
repos_path
,
"
#{
project
.
path_with_namespace
}
.git"
)
if
File
.
exists?
(
path_to_repo
)
print
'-'
else
if
Gitlab
::
Shell
.
new
.
add_repository
(
project
.
path_with_namespace
)
print
'.'
else
print
'F'
end
end
end
end
end
end
def
setup
def
setup
...
@@ -16,7 +32,7 @@ namespace :gitlab do
...
@@ -16,7 +32,7 @@ namespace :gitlab do
system
(
"echo '# Managed by gitlab-shell' > /home/git/.ssh/authorized_keys"
)
system
(
"echo '# Managed by gitlab-shell' > /home/git/.ssh/authorized_keys"
)
Key
.
find_each
(
:batch_size
=>
1000
)
do
|
key
|
Key
.
find_each
(
batch_size:
1000
)
do
|
key
|
if
Gitlab
::
Shell
.
new
.
add_key
(
key
.
shell_id
,
key
.
key
)
if
Gitlab
::
Shell
.
new
.
add_key
(
key
.
shell_id
,
key
.
key
)
print
'.'
print
'.'
else
else
...
...
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