Separate reference gathering from rendering
This is a required step to allow batch processing when gathering references. This in turn would allow grabbing (for example) all mentioned users of an issue/merge request using a single query.
cc @rspeicher @DouweM
See merge request !3969
Ci::Commit becomes a Pipeline object
1. Ci::Commit receives context: ref, :tag.
1. One Ci::Commit describes a one Pipeline
1. Pipeline is created from `.gitlab-ci.yml`
1. Pipeline is a ordered group of builds
1. We test MR against Pipeline
1. Pipelines have a separate view (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703)
1. Pipeline can be triggered from UI (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703)
1. Later we change `Trigger -> TriggerRequest -> Build` to `Trigger -> Pipeline` (future)
1. We add a Pipeline Hook that will be triggered on Pipeline status change (future)
1. We extend notifications to use `Pipeline Hook` to send summary on pipeline changes (future)
After merging that I'll prepare a separate MR that will unify naming, database columns, table names:
```
Ci::Commit -> Pipeline
Ci::Build -> Build
CommitStatus -> Job
GenericCommitStatus -> ExternalJob
ci_commits -> pipelines
ci_builds -> jobs
```
This MR implements first 5 points.
This is made to solve this issue https://gitlab.com/gitlab-org/gitlab-ce/issues/14149.
See merge request !3653
* ci-commit-as-pipeline: (131 commits)
Optimise Merge Request builds rendering
Fix migrations on MySQL
Update db/schema.rb
Cleanup changes
Cleanup required migrations
Add indexes concurrently on PostgreSQL
Fix CiStatus implementation and tests
Fix group_member_spec to not leak information
Fix doc for moving an issue
Update tests for moving issues via API
Tie example config to JIRA screenshot
API: Ability to move an issue
Added ability to add custom tags to transactions
API: Avoid group leak while updating the group
API: Return 404 if user does not have access to group
Move 'New branch from issue' feature doc to web_editor.md
Fix repository cache invalidation issue when project is recreated with an empty repo
improve formatting
Add `Gitlab.com?` method
(doc) fix typo to ssh keys doc url
...
Conflicts:
app/controllers/projects/pipelines_controller.rb
app/helpers/ci_status_helper.rb
app/helpers/gitlab_routing_helper.rb
app/views/projects/ci/commits/_commit.html.haml
app/views/projects/commit/_ci_commit.html.haml
- Remove all view related methods from Ci::Build and CommitStatus
- Remove unused Ci::Commit and Ci::Build methods
- Use polymorphism to render different types of CommitStatus