Issue Type: Bug Bug
Assignee: Nicolas De Loof
Components: git
Created: 27/Jun/14 8:58 PM
Description:

We have a single Git repository with several projects in a directory structure. I have created build jobs with polling enabled for each project and have included the appropriate directory structure in the "Included Regions" option in the git plugin setup. I have also turned on "Force Polling using Workspace" as indicated in https://issues.jenkins-ci.org/browse/JENKINS-20569.

We are using a git-flow type development process, and the jobs are all configured to watch the '*/dev' branch. All commits made to this branch are merges. It appears that whenever a merge commit is made, it will trigger all of the jobs, regardless of if the merge only contained changes to one of the projects' directories.

I looked into the polling log and it looks like the way that the plugin is getting the commit log and checking the paths may be causing the issue. Here is the command that the job runs in the polling log:

> /usr/bin/git log --full-history --no-abbrev --format=raw -M -m --raw ff0ec94a066cee23c13faa16b38b247911cd5ee7..f47993565f701a4f28174c4ea81f35d0e1103590

If I run this command manually, I can see that the returned paths for each commit also includes paths from other commits. I'm not sure why this is, but from the 'git' documentation, it looks like the 'm' parameter will do a full diff on both parents of a merge commit. If I leave off the '-m' parameter, or if I include '-first-parent', the list of paths in the commits only shows the actual affected files made by the commit which triggered the job. Perhaps this option needs to be included in the job config?

Environment: Git Plugin 2.2.2, client plugin 1.9.1, Jenkins 1.568
Project: Jenkins
Priority: Minor Minor
Reporter: Trey Duskin
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to