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.
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.
It looks like you're new here. Sign in or register to get started.