I'm using a build schedule to run builds automatically every few minutes in case there are new commits. This would work fine, but I have one build that needs to make a commit during build (we are using lerna which creates a new commit with package version bumps on each package release build). You can see the problem: the next scheduled build sees that there is a new commit and builds again...
I somehow need to break the circle. Is there a way how I can for example retrieve the commit hash of the commit done during the build, and set the associated repository commit of this build that newer commit?
I have one more complication: I'm using Docker for building, so the git commit is made inside a docker build, which means the QuickBuild build does not yet know about the new commit. I think I would need to pull the newer commit first in the QuickBuild build (but probably not the branch tip to avoid it referencing a wrong commit in case there have been made newer commits in the meantime while the build was running).
Any ideas how to approach this?