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

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events