You need a release pipeline that runs when a tag like `v1.4.0` is pushed. Tag jobs appear in multibranch but never build. Make it work.
IntermediateScenarioShared libraries & multibranch
Answer
Situation read → Tags are discovered but not built automatically by default.
What I'd do →
- Add the "Discover tags" trait.
- Install Basic Branch Build Strategies and add "Tags" with "Ignore tags older than 1 day" plus "Regular branches" and "Change requests" (adding any strategy replaces the default, so list all you need).
- In the Jenkinsfile, gate release stages with
when { buildingTag() }orwhen { tag pattern: 'v\\d+\\.\\d+\\.\\d+', comparator: 'REGEXP' }. - Use
TAG_NAMEas the version.
Why → The age limit prevents a flood of builds for historical tags on first indexing.
Interview tip → Mention that adding build strategies overrides the defaults, a common trap.
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