The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to get the Build duration via env variables

Vaishak Bharadwaj
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 7, 2025

i want to collect the Build metrics, and as a part of metrics i want to collect build duration.

is it possible to collect the build duration from BB pipeline.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
John Emmanuel
Contributor
April 8, 2025

Not sure if that's in an env variable. But you can get that metric using Rest API's.

You can refer to this:

https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-pipeline-uuid-get

You can use curl to get that value along with jq to get the build minutes used as a variable.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events