I'm writing a custom plugin to prioritise the build queue according to our requirements. It's loosely based on the the Bamboo Queue Priority plugin by AtlassianLab (many thanks to them for publishing the source code!).
Everything is running fine when it comes to reordering build plans through an event listener for the BuildQueuedEvent. However, I've found that the DeploymentTriggeredEvent is given before the deployment is actually added to the build queue (and starting a deployment does not trigger a BuildQueuedEvent). Naturally, reordering the queue for an item that is not in it fails. I've implemented a workaround where I add triggered deployments to a delayed order change queue and have a background thread periodically checking if these deployments are now in the build queue. However, I'd like to just have an event I could listen to and execute the reorder code immediately.
Is there some sort of "DeploymentQueuedEvent" that I'm overlooking or does such a thing not exist?
Hi Anne, welcome to the Atlassian Community!
For app development related questions like this, I recommend to use the Atlassian Developer Community, you have a greater chance to get feedback from other app vendors there (though given past experience, the Bamboo team might also answer here).
That said, I do not really know the definite answer and hope the Bamboo team chimes in as well, but from a related past exploration I remember having played with DeploymentTimingPoints.Queued, which is supposedly triggered when the Deployment was put to the queue.
I do not recall any details unfortunately, and in case it turns out to be applicable, there is also the related OutOfBandDeploymentTimingPoints.Queued to be considered, but given you are already deep into the weeds here, I figured these pointers might help eventually.
Thanks a lot for your answer. I've posted the same question on the Atlassian Developer Community. So far your suggestion to look into the DeploymentTimingPoints.Queued is the only suggestion though. I've looked at it but from the DeploymentTimingPoints.Queued I'm only able to get the deploymentResultId which is a long. I would need the full ResultKey in order to perform the reordering. Do you happen to know of a way to get that based on the deploymentResultId (or the DeploymentTimingPoints.Queued object)?
G’day Bamboo customers, The wait is over! Bamboo Data Center edition you have been asking for is finally here! This self-managed enterprise offering of Bamboo has the resilience, reliability, and s...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events