Jenkins: How to set the periodic scan interval of jobs under GitHub organizations?
Asked Answered
Q

2

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?

Quittance answered 7/2, 2018 at 1:23 Comment(2)
Did you check the "scan organization logs" ? What frequency it is showing?Martens
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 wiki.jenkins.io/display/JENKINS/Bitbucket+Branch+Source+PluginCitric
L
2

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

Lungwort answered 7/3, 2018 at 19:14 Comment(0)
B
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

Brocket answered 13/1, 2020 at 12:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.