Move the build phase later
What does this MR do?
The problem is this: when each phase starts, it checks if all jobs in earlier phases are complete. The jobs in the build phase (at least, package-and-qa) are slow. As build is the first phase, if you trigger package-and-qa before the prepare phase is finished, the entire test phase will be blocked until package-and-qa completes, which isn't what we want.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50718.
Edited by Sean McGivern