diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-21 00:14:07 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-21 00:14:07 +0200 |
commit | 098c1982713f3a4075efd6f27ab6326c75fc20ea (patch) | |
tree | ba50f8da29fbcebc5c09d393af9a7e8eeca529ea /lib/tasks/ci | |
parent | 500e277a8326b345854a5fc3114c1163826c1b4a (diff) | |
download | gitlab-ce-098c1982713f3a4075efd6f27ab6326c75fc20ea.tar.gz |
Disable CI for time of migration
Diffstat (limited to 'lib/tasks/ci')
-rw-r--r-- | lib/tasks/ci/migrate.rake | 13 |
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 |