summaryrefslogtreecommitdiff
path: root/lib/tasks/ci
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-09-21 00:14:07 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-09-21 00:14:07 +0200
commit098c1982713f3a4075efd6f27ab6326c75fc20ea (patch)
treeba50f8da29fbcebc5c09d393af9a7e8eeca529ea /lib/tasks/ci
parent500e277a8326b345854a5fc3114c1163826c1b4a (diff)
downloadgitlab-ce-098c1982713f3a4075efd6f27ab6326c75fc20ea.tar.gz
Disable CI for time of migration
Diffstat (limited to 'lib/tasks/ci')
-rw-r--r--lib/tasks/ci/migrate.rake13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/tasks/ci/migrate.rake b/lib/tasks/ci/migrate.rake
index 3507871fcb0..1de664c85e1 100644
--- a/lib/tasks/ci/migrate.rake
+++ b/lib/tasks/ci/migrate.rake
@@ -10,6 +10,10 @@ namespace :ci do
puts ''
end
+ # disable CI for time of migration
+ enable_ci(false)
+
+ # unpack archives
migrate = Ci::Migrate::Manager.new
migrate.unpack
@@ -18,6 +22,9 @@ namespace :ci do
Rake::Task['ci:migrate:tags'].invoke
Rake::Task['ci:migrate:services'].invoke
+ # enable CI for time of migration
+ enable_ci(true)
+
migrate.cleanup
end
@@ -71,4 +78,10 @@ namespace :ci do
$progress.puts 'done'.green
end
end
+
+ def enable_ci(enabled)
+ settings = ApplicationSetting.current || ApplicationSetting.create_from_defaults
+ settings.ci_enabled = enabled
+ settings.save!
+ end
end