Background
In my project pull request on bitbucket are verified by Jenkins builds. Building and testing takes about 50 minutes. This works quite nicely.
Problem
There are some changes which do not have impact on working code (front-end related). So if pull request touches only one of two sub-directories there is no point to do build and running tests. The aim is to save time (less time to release minor not harmful changes) and resources (do not occupy build machine for useless jobs).
I do not want to split project (one of possible solutions), since quite often changes in front-end require changes in actual back-end code, so in such case testing is required.
Possible solution
I found the way to stop Jenkins build with a success on first step which fetches new code.
Problem is how to ask git if branch (change) touches only two sub-directories. This probably will require something like this:
git diff master...featureBranch <some other options>
Possible alternatives
Or maybe there are other ways to tackle this issue? Using some features of bitbucket
or Jenkins
?