We have an on-prem Azure DevOps Server 2019 inaccessible from outside.
As far as I can see right now my options are:
Trigger a build after some other build using the built-in capability:
There are problems with this approach:
- All the builds, including this one must be in the same TFS project
- We are forced to provide the build branch - impossible if we want to trigger after a PR validation build, which always triggers for a new branch. I guess it could be worked around by creating a garbage branch and providing an exclude filter instead. But it is lame.
Use the build complete service hook
There is no Azure DevOps in this list! So, I guess it is Web Hook. Now, I do not want to maintain my own web service for that, so what is going to host the hook? We cannot use Azure Functions, because our Azure DevOps Server is inaccessible from outside. I could do something convoluted where the service hook is connected to Azure Service Bus and then a periodically scheduled Azure DevOps build polls from it. When its finds the relevant item in the queue, it will do the real "buildy" logic. But it is lame, now?
Use scheduled build to poll other builds
Here I would have a build that would run periodically (every 5 mins?) and examine the build that it is supposed to run after by using the Azure DevOps REST api. Such a build would need a persistent storage to keep track of what it has seen last. (Does Azure DevOps provide persistent storage for its builds?). And it is kind of lame too.
I must be missing something obvious here. It cannot be that complicated.
EDIT 1
The Exclude branch filter requires a branch:
But what branch to provide there? I do not see how to work around it without a special garbage branch that nobody deletes.
EDIT 2
It turns out it is possible to type * into the branch filter:
So I am using it for monitoring non PR validation builds. For the PR validation builds I am excluding master. But it sucks, because it means if I queue the PR build manually for the master branch, it would not trigger my build.
EDIT 3
Just let it run for several hours. It is triggered after all the builds, except the PR builds, even though I have the exclude branch filter there:
EDIT 4
The build trigger does not work when the monitored build fails. While this may make sense, it should not be hard coded into the feature. I, for example, need my build to be triggered in any case, even if the monitored build fails. The name of the feature is Build Completion Trigger, not Build Success Trigger. This limitation of this feature is disappointing.







