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
This MR simplifies CI permission model:
- read_build: allows to read a list of builds, artifacts and trace
- update_build: allows to cancel and retry builds
- create_build: allows to create builds from gitlab-ci.yml (not yet implemented)
- admin_build: allows to manage triggers, runners and variables
- read_commit_status: allows to read a list of commit statuses (including the overall of builds)
- create_commit_status: allows to create a new commit status using API
Remove all extra methods to manage permission.
Made all controllers to use explicitly the new permissions.
* master: (24 commits)
Fix runners admin view
Fix migrations
Run builds from projects with enabled CI
Use Gitlab::Git instead of Ci::Git
Fix last specs
Fix specs
Fix after column rename
Fix errors
Update badge
Finishing touches
Fix triggers tests
Rename columns and rename migrations
Reimplement Trigger API
Remove ci_ prefix from all ci related things
Add runners token
Migrate CI::Project to Project
Fix indentation and BuildsEmailService
Change default values
Enhance migrate CI emails
Fix issue tracker service
...
Conflicts:
spec/features/commits_spec.rb