You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.
Cheers,
Steffen
Hi Steffen,
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)?
Thanks, Anne
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.