Just draw :legacy_builds
From @DouweM:
Should be as easy as moving the content of
def draw
to config/routes/legacy_builds.rb and replacingGitlab::Routing::LegacyBuilds.new(self).draw
withdraw :legacy_builds
From https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/routes/legacy_builds.rb