| I believe your concern is that when using the UI to define the top level pipeline project (in a pipeline project that gets its Jenkinsfile from a git repository, or in a multi-branch pipeline), there are options displayed which will prevent the pipeline code from finding Jenkinsfile in the ...@script directory. I think you're right that we should disable presenting those options to the user when they are defining the top level pipeline project. I think your statement:
As far as I can see, Additional Behaviors > Check out to a sub-directory is never appropriate with Pipeline.
is too broad, at least for my use case. I use checkout to a subdirectory to allow me to bring multiple repositories into a single workspace with simple calls to checkout. I could certainly replace those calls to checkout by nesting them inside a dir(), but I don't see why we should disallow my use of checkout to a subdirectory from inside a Jenkinsfile. I don't see how that would help users who (like me) can use "Pipeline Syntax" to show the options in that context, and use them. Refer to the 35475 verification check Jenkinsfile for an example of how I use checkout to a subdirectory inside a Jenkinsfile. However, I'm certainly open to further knowledge from @jglick. I would rather not break compatibility with existing uses of the checkout command, unless there is a compelling reason to do so. |