WIP: Protected runner executes jobs on protected branch [Solution 2]
What does this MR do?
This MR is continued from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13192. To accomplish this feature, we need to implement a mechanism for "Protected runner executes jobs on protected branch. Unprotected runner executes jobs on unprotected branch". However, there is a technical challenge that ci_builds doesn't have data whether the ref is protected or not.
This MR addresses the challenge with Solution 2.
Solution 2. Executes
protected_for?greedily to each build frombuilds_for_shared_runnerorbuilds_for_specific_runner.
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13192#note_36332863
-
Pro
-
Simple
-
Don't alter column on ci_pipelines
-
Con
-
Slow
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Documentation created/updated
- API support added
- Tests
- Added for this feature/bug
- All builds are passing
- Review
- Has been reviewed by UX
- Has been reviewed by Frontend
- Has been reviewed by Backend
- Has been reviewed by Database
- Conform by the merge request performance guides
- Conform by the style guides
- Branch has no merge conflicts with
master(if it does - rebase it please) - Squashed related commits together
What are the relevant issue numbers?
Edited by Shinya Maeda