Coordinating Job Chains

35 views
Skip to first unread message

Randall R Schulz

unread,
Jul 21, 2011, 12:34:00 PM7/21/11
to jenkins...@googlegroups.com
Hi,

I'm experimenting with switching from using the Git plug-in to trigger jobs to using explicit triggering from an external process (a Git post-commit hook).

Part of this is changing each of a few jobs that run on each commit from being individually and independently triggered to there being a sequence of jobs that run in a specific order determined by the "Build other projects" post-build action. The first job in this chain (the one explicitly triggered from the external Git hook) requires a Git commit hash which it uses to reset the repository clone in the Jenkins jobs' workspace (they all share a single one) to the revision to be tested.

Because the jobs share a workspace which includes the application's Git repository, they cannot execute concurrently. In the past we handled this with the Locks and Latches plug-in.

The only problem I have so far with this set-up is that when the Git hook is triggered by a commit while an earlier run of Jenkins jobs is still active, the lead job is only reliably excluded until the the currently executing job completes. Then it contends with the next job in the chain and sometimes goes ahead. This is a disaster, because that job resets the Git repository to a different revision in the middle of the previously triggered sequence of test jobs.


So, the question is, can I get a lock to apply to the entire chained sequence of jobs rather than to individual jobs within that chain? That or its equivalent?


Randall Schulz
Reply all
Reply to author
Forward
0 new messages