Skip to content
Snippets Groups Projects

ci: add new "targeted" runtype, to only build a specific step and its dependencies

Created by: jhchabran

I had this at the back of mind for a while, I quickly hacked it in between things.


It's rather inconvenient when debugging a specific step to generate irrelevant steps which are consuming jobs for nothing.

This PR adds a new run type, targeted which generates a full pipeline then peels off any step that isn't a dependency (direct or indirect) of the targeted step.

The targeting works by seeking a substring match in the step labels, with dashes replacing spaces. Any ambiguity will be refused by the pipeline generator and will lead to an error.

I have also added an optional argument description to the matcher, to make it clearer for the users how to use the targeted builds.

:question: The prefix targeted may not be the most useful one, don't hesitate to suggest a better one.

Test plan

  1. Local runs
  2. Unit tests
  3. Triggered builds:

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading