gitlab-org--gitlab-foss/lib/tasks/downtime_check.rake
Yorick Peterse ab0aedef5b
Always compare with FETCH_HEAD in downtime_check
This ensures this CI step works properly even when doing a shallow
clone.
2016-08-02 11:57:14 +02:00

12 lines
318 B
Ruby

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