Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins: how to specify jenkinsfile in multibranch project

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

like image 630
Allen Pestaluky Avatar asked Jul 17 '17 22:07

Allen Pestaluky


1 Answers

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:

Jenkinsfile path configuration

like image 192
Kdawg Avatar answered Sep 28 '22 07:09

Kdawg