0

I am using an organization folder in Jenkins to discover all repositories that contain a Jenkinsfile.

It had been working fine until recently. At some point, the develop branch of one of the repositories was removed. That branch does exist and contains a valid Jenkinsfile.

When I rescan the project the log shows how it examines the branch but says nothing about finding or not finding the Jenkinsfile:

Looking up myorg/myrepo for branches
Checking branch develop from myorg/myrepo
Checking branch master from myorg/myrepo
      ‘Jenkinsfile’ found
    Met criteria
...

What could be the problem here? Any advice about how to troubleshoot this?

I've tried the usual solutions: delete the branch, create new ones that are detected without any problem, recreate the develop branch...

codependent
  • 23,193
  • 31
  • 166
  • 308

2 Answers2

0

Obvious check, but still, worth a check :

  • Typo in Jenkinsfile name in dev branch
    • Try a pull request from master (that seems to works) to dev branch
  • Scan filter in Folder setup updated ?
  • JenkinsFile syntax could be wrong ? (not sure if it can impact, but you might have a look if something changed in dev lately)
  • dev branch visibility constrain ?

Hope this helps Regards

Grunnpi
  • 92
  • 6
0

For anyone who is sure that Jenkinsfile has no errors, and still looking for a solution to this, following would be good place to start with.

Ensure the below options are enabled: In SCM configuration > Branch Sources > Discover branches In SCM configuration > Branch Sources > Filter by name (with wildcards) > Include > <branch_name>

Divs
  • 1
  • 1