Add pipeline:as-if-foss-run-predictive label to force predictive as-if-foss pipeline

What does this MR do and why?

Introduces a new CI label pipeline:as-if-foss-run-predictive that causes the as-if-foss child pipeline to run with only predictive tests (rspec-predictive, jest-predictive, rubocop, eslint, static-analysis) instead of mirroring the full parent pipeline.

Also refactors generate-as-if-foss-env.rb method names to clearly communicate the parent pipeline mirroring behavior.

Label priority

Labels present Behavior
pipeline:run-as-if-foss Full as-if-foss run (highest priority)
pipeline:as-if-foss-run-predictive Predictive-only as-if-foss run
pipeline:as-if-foss-run-once Block as-if-foss pipeline

How to set up and validate locally

bundle exec rspec spec/scripts/setup/generate-as-if-foss-env_spec.rb

Forced predictive foss pipeline example: https://gitlab.com/gitlab-org/gitlab-foss/-/pipelines/2436358488

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by andrey

Merge request reports

Loading