Pipeline - jobs hang or existing pipelines are deleted due to connection issues between Jenkins Org folder and GitHub

Article ID:230922488
1 minute readKnowledge base

Issue

  • If connection between Jenkins Org folder and GitHub is not stable and Jenkins is unable to properly scan GitHub, multibranch projects' children can potentially be removed because Jenkins would think repos/Jenkinsfiles are deleted. As designed, the recomputation should have terminated with an error without touching existing children.
    The “Days to keep old items” setting doesn’t seem to help preventing existing pipelines to be deleted.

  • When this connection issue occurs while a pipeline is running, it may leave orphaned process on an agent.

Environment

  • Jenkins

  • CloudBees Jenkins Enterprise

  • Pipeline plugin

Resolution

Version 5.7+ includes fix for JENKINS-33815 to prevent pipelines from being deleted when Jenkins GitHub org fails to scan GitHub org repos, for whatever reason. (i.e. GitHub went down, GitHub return API limit error), etc.

This version also includes the fix for JENKINS-25240, to prevent deletions on a project with builds running.