2016-08-24 12:49:21 +05:30
|
|
|
desc 'Checks if migrations in a branch require downtime'
|
|
|
|
task downtime_check: :environment do
|
2017-08-17 22:00:37 +05:30
|
|
|
repo = if defined?(Gitlab::License)
|
2019-12-04 20:38:33 +05:30
|
|
|
'gitlab'
|
2017-08-17 22:00:37 +05:30
|
|
|
else
|
2019-12-04 20:38:33 +05:30
|
|
|
'gitlab-foss'
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
2016-08-24 12:49:21 +05:30
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
`git fetch https://gitlab.com/gitlab-org/#{repo}.git --depth 1`
|
|
|
|
|
|
|
|
Rake::Task['gitlab:db:downtime_check'].invoke('FETCH_HEAD')
|
2016-08-24 12:49:21 +05:30
|
|
|
end
|