Jenkins multi-branch pipeline missing a branch

Jenkins

I have a Jenkins system. It runs build jobs for our company. We run multibranch pipelines. Yesterday one of the builds mysteriously dropped the devel branch from the build.

I looked through the Pull Requests for the branch and I can not find anything that affected by the Jenkins file in the time frame where this branch drop occurred.

I have looked through the Jenkins system log and I do not see any errors. Here is a copy of the relevant parts of the scan repository log:

Examining Bo**a/pro-***-ter

  Checking branches...

  Getting remote branches...

    Checking branch devel

  Getting remote pull requests...

    Checking branch master
      ‘Jenkinsfile’ found
    Met criteria

I have validated that the devel branch has a Jenkinsfile and that the Jenkinsfile is valid.

I can't figure out how to solve this. Any suggestions would be great.

Some plugin information:

  • github 1.28.0
  • branch 2.0.11
  • docker-common 1.13
  • docker-pipeline 1.17
  • git 3.6.0
  • git client 2.7.0
  • git server 1.7
  • SCM API 2.2.3

Jenkins version 2.73.2

Best Answer

I had this same problem with BitBucket Server and Jenkins when using Blue Ocean (BitBucket Server plugins). The branch would not create in Jenkins. I noticed that the branch commit and the pull request (PR) had a successful build. It seems that if Jenkins detects a PR is opened for a branch, it will not create the branch on the Jenkins side. Once I deleted the pull request from BitBucket Server, Jenkins registered the branch and it showed up. Would be better if the branch showed up, had no builds and referenced the Pull request Jenkins job!