8

When configuring GitHub Organization Folders (GitHub Branch Source Plugin) in Jenkins, you can set the interval of periodic scan of the entire organization. See screenshot here for example.

However, I discovered that this does not affect the interval for scanning the branches of the repositories under the GitHub folder. Even after setting the scan of the organization to 1 hour, the interval for individual repository scans remain to be 1 day. See screenshot here for example.

I'd like all my repositories to be scanned once per hour. How to set the periodic scan interval of repositories under GitHub organizations?

StephenKing
  • 36,187
  • 11
  • 83
  • 112
  • Did you check the "scan organization logs" ? What frequency it is showing? – Here_2_learn Mar 15 '18 at 06:16
  • 1
    Just as info and maybe some websearch are leading to this item as well: same issue with Bitbucket project. (Bitbucket Team/Project) - offered by Bitbucket Branch Source plugin https://wiki.jenkins.io/display/JENKINS/Bitbucket+Branch+Source+Plugin – timguy Mar 14 '19 at 13:31

2 Answers2

2

Doesn't look like it's possible. There's an open issue here: https://issues.jenkins-ci.org/browse/JENKINS-48960 .

smaslennikov
  • 326
  • 2
  • 8
0

There is a workaround to make it work with a Script Console in a Manage Jenkins. I confirm it works.

for (f in Jenkins.instance.getAllItems(jenkins.branch.MultiBranchProject.class)) {
  if (f.parent instanceof jenkins.branch.OrganizationFolder) {
      f.addTrigger(new com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger("5m"));
  }
}

https://issues.jenkins-ci.org/browse/JENKINS-48960?focusedCommentId=332057&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-332057

Anton Plebanovich
  • 1,296
  • 17
  • 17