How do you use a non-default Jenkinsfile path in a multibranch job?
BeginnerConceptMultibranch, organization folders & webhooks
Answer
Set Build Configuration > Mode: by Jenkinsfile > Script Path to, for example, ci/Jenkinsfile. For monorepos with several pipelines, create one multibranch job per service pointing to services/api/Jenkinsfile, and filter builds with when { changeset 'services/api/**' }, or use a plugin like "Multibranch Pipeline Inline Definition" to define the pipeline centrally.
More on Multibranch, organization folders & webhooks
How does a multibranch pipeline work?BeginnerWhat is branch indexing and what triggers it?BeginnerWhat are the discovery traits in the GitHub branch source?IntermediateWhat does the fork PR trust setting protect against?AdvancedWhat environment variables are set for PR builds?BeginnerWhat is an organization folder?Intermediate