Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins multi-branch pipeline missing a branch

Tags:

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

like image 219
Mark Russell Avatar asked Jul 10 '18 17:07

Mark Russell


2 Answers

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!

like image 169
Jared Avatar answered Sep 19 '22 15:09

Jared


Sorry for taking so long to answer this: I did a plugin upgrade to the latest version of all of the plugins in my Jenkins. That solved my issue.

like image 39
Mark Russell Avatar answered Sep 18 '22 15:09

Mark Russell