Jenkins: how to specify jenkinsfile in multibranch project

老子叫甜甜 提交于 2019-12-08 19:23:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!