Using the GitHub Branch Source Plugin, sometimes the Jenkinsfile is not found

Article ID:360030957611
1 minute readKnowledge base

Issue

  • In a Pipeline (or Multibranch Pipeline) the Jenkinsfile is sometimes not found during repository scanning.

  • The issue is occurring sporadically.

  • You are using GitHub as SCM and the GitHub Branch Source Plugin.

Resolution

This issue could be linked to a caching issue. It is still under investigation but a workaround exists.

Workaround

You should have a least have the version 2.4.4 of the GitHub Branch Source Plugin. With this version of the plugin, you can activate the -DJENKINS_54126_WORKAROUND=true workaround flag that will:

  1. bypass the cache in case it is suspicious.

  2. log more information to help debug

In case this workaround is not enough, please open a case with CloudBees Support. Follow instructions on How to add Java arguments to Jenkins for help on adding an argument to Jenkins.

References