Reputation: 303
How do I properly configure a Multibranch Pipeline in Jenkins when Git is selected as branch source? I get a "Does not meet criteria" for every branch that is checked in the branch indexing log.
Upvotes: 9
Views: 11875
Reputation: 47875
I run into this when I added Jenkinsfile after I had created the Multibranch Pipeline project. The solution was to delete the project and create again :)
Still, for some Jenkins-only-know reason, it doesn't run the build on my master branch now.
Upvotes: 0
Reputation: 2197
At least on Windows the casing of the Jenkinsfile is important. It has to be with an uppercase "J" and the rest lowercase.
Jenkinsfile
Upvotes: 2
Reputation: 122
I think that your jenkins plugin (Git plugin and Git Client plugin) is old. Try to update the plugins.
Upvotes: 0
Reputation: 3996
Also make sure your Jenkinsfile
does not have a .groovy
extension
Upvotes: 2
Reputation: 256
It appears to check the script type. The first line of "Jenkinsfile" had to be: "#!groovy"
Upvotes: 1
Reputation: 1
As Bruno Lavit points out the criteria is pretty simple.
I believe you may have an issue with your current branch.
In a clean environment, try to checkout the branch and verify that the Jenkinsfile is indeed included and that is it a valid text file. I had a similar issue in the past where my push did not finished correctly.
Upvotes: 0
Reputation: 10382
This Multibranch Pipeline job will create a pipeline job if your Git branch contains a Jenkinsfile.
This Jenkinsfile describe how to build the current branch (Jenkins Groovy DSL).
If your branch doesn't contain a Jenkinsfile, then you will get this "does not meet criteria" message.
More information about the Multibranch pipeline here.
Upvotes: 6