summaryrefslogtreecommitdiff
path: root/lib/tasks/downtime_check.rake
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/downtime_check.rake')
-rw-r--r--lib/tasks/downtime_check.rake12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/tasks/downtime_check.rake b/lib/tasks/downtime_check.rake
new file mode 100644
index 00000000000..afe5d42910c
--- /dev/null
+++ b/lib/tasks/downtime_check.rake
@@ -0,0 +1,12 @@
+desc 'Checks if migrations in a branch require downtime'
+task downtime_check: :environment do
+ if defined?(Gitlab::License)
+ repo = 'gitlab-ee'
+ else
+ repo = 'gitlab-ce'
+ end
+
+ `git fetch https://gitlab.com/gitlab-org/#{repo}.git --depth 1`
+
+ Rake::Task['gitlab:db:downtime_check'].invoke('FETCH_HEAD')
+end