Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Event for when a Deployment is Queued

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?

 

1 answer

1 vote

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

464 views 5 7
Read article

Community Events

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

Events near you