Skip to content
Permalink
Browse files
Implement supportsPolling and requiresWorkspaceForPolling
Gets multiple git polling working with no workspace checked out

[FIXED JENKINS-25253]
  • Loading branch information
jwillemsen authored and rodrigc committed Apr 3, 2016
1 parent 9f53e8f commit 0cd660a0f9c2a26d6817cd7ba17646205f2b11a8
Showing with 22 additions and 0 deletions.
  1. +22 −0 src/main/java/org/jenkinsci/plugins/multiplescms/MultiSCM.java
@@ -162,6 +162,28 @@ public void checkout(Run<?, ?> build, Launcher launcher,
return paths.toArray(new FilePath[paths.size()]);
}

// Only return supportsPolling when all scms do report back that
// they supports polling
@Override
public boolean supportsPolling()
{
for(SCM scm : scms) {
if (!scm.supportsPolling()) return false;
}
return true;
}

// When one scm does require a workspace we return true, else
// we don't need a workspace for polling
@Override
public boolean requiresWorkspaceForPolling()
{
for(SCM scm : scms) {
if (scm.requiresWorkspaceForPolling()) return true;
}
return false;
}

@Override
public ChangeLogParser createChangeLogParser() {
return new MultiSCMChangeLogParser(scms.toList());

0 comments on commit 0cd660a

Please sign in to comment.