I have the same case as described:
Mark Waite: I was able to reproduce this (or a similar issue), by using different branches on the same repository.
In my case the tests master branch contains the code needed not just to install a given version of the product, but also upgrade from any other version (i.e. fresh install 1.0.0, then upgrade to 1.1.1, then apply patch 1.1.1-p1, etc). However every released version has a tests branch that contains the tests that apply to it.
So my job needs to run the tests applicable for 1.1.1-p10 upgrading from 1.0.0 first:
- First i need to checkout the product repo and build 1.1.1-p10
- then i checkout the master branch of the tests and use it to setup the product to the desired version (1.1.1-p10) using GA versions + the patch that i just built
- Then i checkout the maint-1.1.1 branch of the same tests repo to run the tests applicable for the 1.1.1 version
So i have one repo and 2 branches. It is not so uncommon case and currently there is no workaround as far as i know....
Now, i can use a webhook but i already use it to trigger builds in the repo that contains the actual product code (I use Multibranch pipeline). The Multibranch pipeline is setup to monitor the product repo (where the Jenkinsfile is) so the web hook will trigger multibranch scanning of the product repo only. If i add the tests repo to the git sources of the multibranch pipeline nothing happens as the acceptance projects do not have a Jenkinsfile (i really do not know what will happen if i add one but i assume nothing good).