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

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.