You must migrate 80 Freestyle jobs to multibranch pipelines. Plan it.
IntermediateScenarioShared libraries & multibranch
Answer
Situation read → Large migration; reduce risk and repetition.
What I'd do →
- Inventory jobs with the API (
/api/json?tree=jobs[name,_class]) and group by pattern (Maven app, Node app, cron script). - Build library steps or templates for each pattern.
- Add Jenkinsfiles via automated PRs, generating the parameters from each job's
config.xml. - Create multibranch jobs via Job DSL in JCasC; run both old and new in parallel for a week, comparing results.
- Disable Freestyle jobs, then delete after a retention period.
Why → Pattern-based templates make the 80 jobs mostly mechanical, and parallel running catches gaps.
Interview tip → Mention the cron/admin jobs might stay as simple pipelines, not every job needs multibranch.
More on Shared libraries & multibranch
A shared library change merged to `main` broke 200 pipelines within minutes. How do you prevent a repeat?IntermediateYou want to test a library branch against a real app pipeline without affecting anyone. How?BeginnerEvery app repo has its own pod YAML for builds, and they all drift. How do you standardize?IntermediateSecurity wants every pipeline to run a secret scan, even if teams forget to add it. How?AdvancedA multibranch project has 600 stale branch jobs and the folder page takes 30 seconds to load. What do you do?BeginnerA new org with 150 repositories wants Jenkins builds for every repo with a Jenkinsfile, without tickets to the platform team. What do you set up?Intermediate