Limit Unit test job to only MR pipelines for forks

What does this MR do?

clone test repo and prepare done jobs are set to only run in MR pipelines for non-canonical (forks/community): https://gitlab.com/gitlab-org/gitlab-runner/-/blob/1da69ed13189b4edc5fc05205118bdc17283e990/.gitlab/ci/build.gitlab-ci.yml#L129

But unit test, with the new rules added in !5576 (merged), is accidentally running in all pipelines in forks/community, including default branches. Those default branches pipelines (in forks/community) do not have clone test repo and prepare done, so the pipelines are failing: https://gitlab.com/gitlab-community/gitlab-org/gitlab-runner/-/pipelines/1844443078

Pipelines in MRs are working fine, as expected: https://gitlab.com/gitlab-com/localization/tech-docs-forked-projects/prod/gitlab-runner/-/pipelines/1845593991

This MR updates the new rule to set unit test to run for MR pipelines in community/fork pipelines (not all pipelines).

Why was this MR needed?

What's the best way to test this MR?

What are the relevant issue numbers?

Edited by Marcel Amirault

Merge request reports

Loading