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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Aaron Johnson. Don't forget to mark the answer as accepted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the delay in "accepting" It took me a while to gain access to the Pastgresql db to confirm.
Thank you very much!
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.