Git Sparse Checkout and notifyCommit

164 views
Skip to first unread message

Andrew Smith

unread,
Mar 18, 2015, 9:26:46 AM3/18/15
to jenkins...@googlegroups.com
Hi

I'm using Git Sparse Checkout (through the jenkins git plugin) to allow me to checkout only 1 directory from a git repo.

I am also using /git/notifyCommit to notify Jenkins of git changes and allow automatic rebuilds when they occur.

My problem is that I have repo1:

repo1
.
..
dir_a/
dir_b/

And jenkins project a building only dir_a, project b building only dir_b (thought sparse checkout).

But If I make changes to dir_b, and send a notifyCommit to jenkins my Git Polling Log for project a says "Changes found" and project a is rebuilt (even though none of the files have changed).

Is there a way to force the git "has it changed" mechanism to consider the git sparse checkout option?

Thanks
--
Andy Smith

Andrew Smith

unread,
Mar 18, 2015, 10:41:49 AM3/18/15
to jenkins...@googlegroups.com
To answer my own question:

The poll does not care about your sparse checkout settings. But you can add an additional git option to achieve this:

Polling ignores commits in certain paths
Reply all
Reply to author
Forward
0 new messages