问题
Using Jenkins for multi-platform mutibranch builds.
I have multiple Multibranch Pipeline projects (one for each platform, since each platform requires notably different build steps). I have one code repository with multiple branches (which is why Multibranch Pipeline projects makes sense).
I would like to have each Multibranch Pipeline project reference a different Jenkinsfile, rather than all trying to use the one with the filename "Jenkinsfile" that is located in the root of the repository.
This resolved bug suggests that I should be able to do this, but I can't find any documentation outlining how to do this. Anyone know how I can go about doing this?
Thanks for your time! Allen
回答1:
Upgrade the Pipeline Multibranch plugin to at least version 2.15. From the changelog at https://wiki.jenkins.io/display/JENKINS/Pipeline+Multibranch+Plugin:
2.15 (Jun 01, 2017)
- JENKINS-34561 Option to select a script name/path other than Jenkinsfile.
After that, you can go to your project's configuration page and access the setting shown below:
来源:https://stackoverflow.com/questions/45154376/jenkins-how-to-specify-jenkinsfile-in-multibranch-project