Skip to content

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 from builds_for_shared_runner or builds_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?

What are the relevant issue numbers?

Edited by Shinya Maeda

Merge request reports