I have a relatively deep build structure and want to find out why a top level build was run. I'm writting a little script that will create a log of changes.
Each of the builds as a number of dependencies and a 'successful build' trigger on those dependencies.
So when my top level build runs (or any build somewhere in the middle), it could be because of a VCS or dependency change.
As far as I've been able to figure out, I can look at the <changes> element and see if there were changes that caused the build to run.
But if this is zero, then it could have been because of an dependent build was re-run, or a schedule trigger fired. I don't know which.
The <changes> element tells me what changed in the attached VCS.
But <artifact-dependencies> doesn't tell me if any of the dependencies changed - just that these specific dependencies were used to generate the current build.
If <changes> was zero, then it must have been an <artifact-dependencies> that changed. But, which one(s)?
How can I tell what caused a build to trigger?