Refactor code and remove `ci_build.stage` column

The following discussions from gitlab-ce!14724 should be addressed:

  • @grzesiek started a discussion: (+1 comment)

    This would be another place where we depend on ci_builds.stage column, that we actually want to remove completely in the future. This means that we would actually need to have a separate mechanism for creating jobs outside of CreatePipelineService 🤔 But maybe this is enough for now?

  • @ayufan started a discussion: (+2 comments)

    We should add validates :stage_id, presence: true, unless: :importing?

  • @grzesiek started a discussion:

    This MR is going to close gitlab-ce#37979 but when we decide to address remaining discussions and refactor it we will need to resolve it once again.

Edited Nov 28, 2018 by Grzegorz Bizon
Assignee Loading
Time tracking Loading