Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,499
Community Members
 
Community Events
165
Community Groups

I want to track the times it takes to deploy a project to see a trend or alert on outliers

I want to track the times it takes to deploy a project. (self-hosted Bamboo)

Through the web I can look at the logs and see who started(or stopped) a deploy, when it started, how long it ran, and if it succeeded or failed. All great stuff!

I want to find this data either in a report built in, or point me to where I can get physical access to these logs so that I can parse them and get the data/trending myself.

What I want to do is see how the changes we make affect the deployment runtime. Did the change I just made significantly change the deploy time? Are the times getting progressively longer? Etc. Bonus would be to also see if it succeeded or Failes and if it was manually stopped.

 

1 answer

1 accepted

1 vote
Answer accepted

Hello @Aaron Johnson,

Welcome to Atlassian Community!

You can try the following SQL. It works on PostgreSQL.

SELECT DR.VERSION_ID       Version_id,
DP.DESCRIPTION Proj_description,
DP.NAME Proj_name,
DE.NAME Env_Name,
DE.DESCRIPTION Descr,
DR.VERSION_NAME Release_Name,
DP.PLAN_KEY Source_Build_Plan,
DR.STARTED_DATE Started_date,
DR.QUEUED_DATE Queued_date,
DR.EXECUTED_DATE Exec_date,
DR.FINISHED_DATE Finished_date,
DR.DEPLOYMENT_STATE Result_State
FROM DEPLOYMENT_ENVIRONMENT DE
JOIN DEPLOYMENT_RESULT DR
ON DR.ENVIRONMENT_ID = DE.ENVIRONMENT_ID
JOIN DEPLOYMENT_VERSION DV
ON DV.DEPLOYMENT_VERSION_ID = DR.VERSION_ID
JOIN DEPLOYMENT_PROJECT DP
ON DP.DEPLOYMENT_PROJECT_ID = DV.PROJECT_ID
WHERE DR.EXECUTED_DATE = (SELECT Max(EXECUTED_DATE)
FROM DEPLOYMENT_RESULT
WHERE VERSION_ID = DR.VERSION_ID
AND ENVIRONMENT_ID = DE.ENVIRONMENT_ID)
AND ( ( DR.EXECUTED_DATE <= '2023-01-01 00:00:00' )
OR DR.EXECUTED_DATE IS NULL )
ORDER BY DR.EXECUTED_DATE DESC,
DR.DEPLOYMENT_STATE DESC

It has a date filter (current set to 2023 it will capture anything) but you can set it to a specific period to ease the filtering.

Then, you will need to understand the values from the *_date tables and do your reporting.

 

Regards,

Eduardo Alvarenga
Atlassian Support APAC

Wonderful! This looks like it will answer my need. I will give it a whirl and see how it goes.

Thank you @Aaron Johnson. Don't forget to mark the answer as accepted.

Sorry for the delay in "accepting" It took me a while to gain access to the Pastgresql db to confirm.

Thank you very much!

Like Eduardo Alvarenga likes this

Suggest an answer

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

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

912 views 3 8
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