-
Bug
-
Resolution: Fixed
-
Minor
-
None
when using with pipeline job, scm polling is not working, the following is what we got in polling log,
Started on Jul 15, 2016 4:00:00 PM
no polling baseline in /home/build/workspace/test on build-agent
Done. Took 0 ms
No changes
[JENKINS-36703] Polling is not working in pipeline job
Comment |
[ WorkflowJob.java: {code:java} @Override public PollingResult poll(TaskListener listener) { // TODO call SCMPollListener WorkflowRun lastBuild = getLastBuild(); if (lastBuild == null) { listener.getLogger().println("no previous build to compare to"); // Note that we have no equivalent of AbstractProject.NoSCM because without an initial build we do not know if this project has any SCM at all. return Queue.getInstance().contains(this) ? PollingResult.NO_CHANGES : PollingResult.BUILD_NOW; } WorkflowRun perhapsCompleteBuild = getLastSuccessfulBuild(); if (perhapsCompleteBuild == null) { perhapsCompleteBuild = lastBuild; } if (pollingBaselines == null) { pollingBaselines = new ConcurrentHashMap<String,SCMRevisionState>(); } PollingResult result = PollingResult.NO_CHANGES; for (WorkflowRun.SCMCheckout co : perhapsCompleteBuild.checkouts(listener)) { if (!co.scm.supportsPolling()) { listener.getLogger().println("polling not supported from " + co.workspace + " on " + co.node); continue; } String key = co.scm.getKey(); SCMRevisionState pollingBaseline = pollingBaselines.get(key); if (pollingBaseline == null) { pollingBaseline = co.pollingBaseline; // after a restart, transient cache will be empty } if (pollingBaseline == null) { {color:#d04437}listener.getLogger().println("no polling baseline in " + co.workspace + " on " + co.node);{color} continue; } {code} ] |
Workflow | Original: JNJira [ 173432 ] | New: JNJira + In-Review [ 185123 ] |
Assignee | New: Thomas Keller [ kellert ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
WorkflowJob.java: