Read BITBUCKET_BUILD_NUMBER via Bitbucket API

RyeGordo March 23, 2022

I'm trying to fetch the latest BITBUCKET_BUILD_NUMBER via Bitbucket API.

This is a default Repository Variable and is not included among the API's request to list variables for a repository.

It's possible to update the next builder number, but there is no available endpoint for reading.

 

Is it not possible to fetch this value?

If not, can this functionality be added in the future?

1 answer

1 accepted

0 votes
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 24, 2022

Hi @RyeGordo 

G'Day!

We do not expose the internal variable in the API endpoint hence you are not getting any output for the internal variables.

Could you give me a use case on why you wish to have this exposed so I can create a Feature request for you?

Cheers,
Syahrul

RyeGordo March 28, 2022

Hi @Syahrul 

This is for an Android App.

I use the Build Number as an internal version number.  It's is used for the app's version code and also displayed as part of the version name on certain builds.  My intent is to fetch the latest Build Number from the repository instead of manually updating.

The exercise is mostly a POC and not critical should exposing these variables require a lot of effort; however, given that we're able to update the Build Number, I feel that access to read it would make this more complete.

Thanks,
Ryan

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 10, 2022

Hi @RyeGordo 

Noted, thanks for sharing your use case, I have proceeded to raise a feature request and I highly suggest you to Watch the feature request so that you'll receive an update whenever we have any at:

I hope this helps.

Cheers,
Syahrul

Like RyeGordo likes this
RyeGordo April 11, 2022

Thanks @Syahrul 

I'll keep watch.

Ryan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events