I have created a Jenkins (Jenkins ver. 2.60.1) multi branch pipeline job with Git SCM. In the root of the repository on master branch I have a valid Jenkinsfile but when I scan the job I get:
Checking branch master
‘Jenkinsfile’ not found
Does not meet criteria
Job config:
Any ideas?
You might look at this Jenkins issue and see if it helps. Jenkinsfile not found in PR on GitHub
We were having a similar problem and the workaround listed in that issue at least got us past the problem. In our case the problem stems from using Github's "Allow rebase merging" option when merging pull requests, and then continuing to add commits into that same branch. Then on the next PR we would see this problem.
The workaround is to delete the contents of: $jenkins_home/org.jenkinsci.plugins.github_branch_source.GitHubSCMProbe.cache
and then have Jenkins rescan the repository.
Another option is to create a clean branch, cherry-pick the commits from the branch that Jenkins claims has no Jenkinfile, and then create another PR from your new branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With