Workflow Jobs and SCM Polling

30 views
Skip to first unread message

Gregory Symons

unread,
Aug 11, 2015, 6:14:43 PM8/11/15
to Jenkins Users
I'm seeing something a little weird in one of my workflow jobs, and I'm not sure if I'm doing something wrong or if it's a bug. Basically I have a top level job that's coordinating several component jobs. The top level job monitors several repos (right now it's just polling every 5 minutes) for changes, and when it sees changes, it kicks off the component jobs. However, what I'm seeing is the top-level job is running multiple times for a single change. The only thing I can think of for what's happening is that the change isn't getting recorded as having been built before the next polling cycle runs, because the top-level build hasn't finished. Is that a reasonable assumption, or should I Iook somewhere else for the problem? An outline of the top level build is below, if that helps.

checkout([/* details for repo1 */, subdir: 'repo1'])
checkout([/* details for repo2 */, subdir: 'repo2'])
checkout([/* details for repo3 */, subdir: 'repo2'])

archive 'repo1/'
archive 'repo2/'
archive 'repo3/'

c1 = build([job: 'component-1'])
c2 = build([job: 'component-2'], params: [[$class: 'RunParameterValue', name: C1_ARTIFACTS, runId: c1.id]])
c3 = build([job: 'component-3], params: [[$class: 'RunParameterValue', name: C1_ARTIFACTS,  runId: c1.id],
                                                                [$class: 'RunParameterValue', name: C2_ARTIFACTS, runId: c2.id]])

Jesse Glick

unread,
Aug 12, 2015, 5:18:37 PM8/12/15
to Jenkins Users
On Tuesday, August 11, 2015 at 6:14:43 PM UTC-4, Gregory Symons wrote:
The only thing I can think of for what's happening is that the change isn't getting recorded as having been built before the next polling cycle runs, because the top-level build hasn't finished.

 Possible. I do not think that use case is tested. Probably checkouts from a build in progress should be considered for purposes of the polling baseline. File it please, especially if you can demonstrate with a minimal test case.
Reply all
Reply to author
Forward
0 new messages