Is there any way to query Bamboo Deployment Projects for reporting purposes?

Was wondering if there's any way to retrieve reports from the Bamboo Deployment Projects.

It would be really awesome if we could query things like...

> All Deployments by Date

> All Deployments by Environment

1 answer

1 accepted

0 vote

Hi Joe,

I initially thought that using some kind of REST API call could help, but this is not currently available:

https://jira.atlassian.com/browse/BAM-13501

So I've managed to build some SQL queries that I think can be helpful.

This one is to retrieve all deployments by date (I am trying to retrieve projects deployed on 2013-11-05):

SELECT dp.name AS deploy_name, de.name AS env_name, dr.started_date, dr.queued_date, dr.executed_date, dr.finished_date
FROM deployment_project dp, deployment_environment de, deployment_result dr
WHERE dp.deployment_project_id = de.package_definition_id
AND de.environment_id = dr.environment_id
AND dr.queued_date >= '2013-11-05 00:00:00' 
AND dr.queued_date <= '2013-11-05 23:59:59'

This one is to retrieve all deployments by environment:

SELECT dp.name AS deploy_name, de.name AS env_name, dr.started_date, dr.queued_date, dr.executed_date, dr.finished_date
FROM deployment_project dp, deployment_environment de, deployment_result dr
WHERE dp.deployment_project_id = de.package_definition_id
AND de.environment_id = dr.environment_id
AND de.name = '<Your_Environment_Name_Here>'

These queries were built using HSQLDB and Atlassian Bamboo version 5.1.1 build 3902. You might need to customize them a little bit in order to make them work in other database types or Bamboo versions.

I hope this helps!

Thanks Felipe. I guess I'll just have to query the bamboo database directly for now. Do you know if/when they plan on providing deployment reports within the Deployment Project view?

Hi Felipe, 

I want to know if there is any other solution to create reports on Builds and deployments other than querying the DB. Do we have any reporting plugins available? Thanks, please advise.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,561 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you