summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-08-09 12:16:43 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2017-08-15 12:55:54 +0200
commit639140677410f11955947980aa47356e1136c32e (patch)
tree7d0a6827634ab87586f51ccd886b8888c1085a2e /lib/tasks
parent4a2a6d521a260981482ee8e4931ebf06cb4f5b6a (diff)
downloadgitlab-ce-639140677410f11955947980aa47356e1136c32e.tar.gz
Add two more project templateszj-add-two-more-project-templates
Related to !13108. Mostly this is just running the rake task and changing the task a bit to catch cases like the project already existing or so. The rake task moves archives to the vendor/project_template directory, which are checked in too.
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/update_templates.rake9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/update_templates.rake b/lib/tasks/gitlab/update_templates.rake
index a7e30423c7a..f44abc2b81b 100644
--- a/lib/tasks/gitlab/update_templates.rake
+++ b/lib/tasks/gitlab/update_templates.rake
@@ -21,13 +21,18 @@ namespace :gitlab do
params = {
import_url: template.clone_url,
namespace_id: admin.namespace.id,
- path: template.title,
+ path: template.name,
skip_wiki: true
}
- puts "Creating project for #{template.name}"
+ puts "Creating project for #{template.title}"
project = Projects::CreateService.new(admin, params).execute
+ unless project.persisted?
+ puts project.errors.messages
+ exit(1)
+ end
+
loop do
if project.finished?
puts "Import finished for #{template.name}"