Hello All,

This one is a follow-up for builds getting triggered for the changes not 
specified in "Include regions". We also added "force polling using 
workspace" option, but no luck. I posted the details in the below URL as 
well. Not sure if it's tracked. Apologize in advance for spamming:

https://groups.google.com/forum/#!searchin/jenkinsci-users/include$20region/jenkinsci-users/lQgrn70GYWc/iIOvNvtGRqgJ

We ran into Jenkins Git plugin merge issue, and wanted to know if this can 
be addressed, and here is our scenario:

1. Branches A and B are created from master.

2. Jenkins Job_A is created with included regions to look for 
sub-directories pertaining to changes committed through Branch A.

3.  Jenkins Job_B is created with included regions to look for 
sub-directories pertaining to changes committed through Branch B.

4. Jenkins Job_A, and Job_B are mutually exclusive, as the included regions 
for triggering builds are only pertaining to their respective 
sub-directories.

5. Branch A is merged with the master triggering a Jenkins build defined in 
"Job_A".

6. Branch B is merged with the master triggering a Jenkins build defined in 
"Job_B". 

7. However, when the Branch B code is merged, Jenkins build for "Job_A" is 
also triggered which is not a part of included region. 

*8. Seems that this issue can be mitigated if we add "first-parent" option 
in method showRevision() in "CliGitAPIImpl.java". "first-parent" logic was 
implemented subsequently with 
commit#: 777c306e433e7de58702a3fd1e45512a47c0d33a*

Please find below the comment referred to extra builds getting triggered.

https://github.com/jenkinsci/git-client-plugin/commit/340da905666600a18866ebba27376c7f1874d673

"The output of "git show" included commits that were not introduced since

the last build, so could falsely trigger build in the presence of
"includedRegions".

A benefit of not including extraneous commits is the size of the output
is reduced, and therefore less heap required.

This can still trigger extra builds as "-m" means the changes between all
legs of a merge commit are displayed.  However, without this, conflict 

resolution changed as part of the merge commit would be skipped."

Please let us know your thoughts/suggestions.

Thanks,
Kalyan

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0c704f20-f52e-49d1-8ea8-dd6d96468a22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to