Summary
The Blue Ocean editor ignores the Script Path setting for the multibranch pipeline plugin and instead saves the Jenkinsfile in the repository root. Is this a bug?
Background
We have a single repository with several projects in it, so we're trying to setup many multibranch pipeline jobs, with each of them pointing to the same repository.
The first problem we encountered was that the Jenkinsfile which stores the pipeline code was stored in the root of the repository, the problem being that this was the same location for each Job. We subsequently discovered that as of June 2017 you can now specify a Jenkinsfile location per job in the multibranch pipeline plugin. Great.
Adding Blue Ocean into the mix: when editing the pipeline in the Blue Ocean editor it seems to be disregarding the Script Path
setting, and instead saving the resulting pipeline code in a fixed location (the root of the repository). When the job runs however, it picks up the correct location, so it seems to be a bug with the editor.
We've searched the Blue Ocean backlog but can't find an existing issue, could we have discovered a new bug? We're very new to Jenkins, so I'm not sure if a) we're not setting this up correctly or b) Blue Ocean isn't expected to work this way.
Configuration
Multibranch Pipeline Job 1
Name: Foo
Repository Name: test
Build Configuration -> Script path: Build/Jenkins/Foo/jenkinsfile
Multibranch Pipeline Job 2
Name: Bar
Repository Name: test
Build Configuration -> Script path: Build/Jenkins/Bar/jenkinsfile
The sample repository has 2 branches, master and dev.