2016-06-24 16:29:23 +00:00
|
|
|
desc 'Checks if migrations in a branch require downtime'
|
|
|
|
task downtime_check: :environment do
|
2017-02-22 18:18:40 +00:00
|
|
|
repo = if defined?(Gitlab::License)
|
2019-09-18 14:02:45 +00:00
|
|
|
'gitlab'
|
2017-02-22 18:18:40 +00:00
|
|
|
else
|
2019-09-18 14:02:45 +00:00
|
|
|
'gitlab-foss'
|
2017-02-22 18:18:40 +00:00
|
|
|
end
|
2016-06-24 16:29:23 +00:00
|
|
|
|
2016-08-02 09:56:47 +00:00
|
|
|
`git fetch https://gitlab.com/gitlab-org/#{repo}.git --depth 1`
|
|
|
|
|
|
|
|
Rake::Task['gitlab:db:downtime_check'].invoke('FETCH_HEAD')
|
2016-06-24 16:29:23 +00:00
|
|
|
end
|