We are currently reading this article and already using Bitbucket Build Number feature. However after reading it again makes us a bit confuse.
1. If branch develop BUILD NUMBER value is 30 and we merged it to master and triggers a build in pipeline, then will it become 31?
2. If we rerun a pipeline build in master that is now having 31 as its BUILD NUMBER value, will it become 32?
3. Many said that BUILD NUMBER is equal to the current number of build in pipeline unless you did not do something.
Does rerunning a build pipeline will cause it to not get in synch with what is showing in pipeline tab? If yes, then how to see the current BUILD NUMBER value using cURL or RESTful API?
Hello @Bitwise DEVS and thank you for reaching out to Community!
Let me go through your questions and address them individually :
If branch develop BUILD NUMBER value is 30 and we merged it to master and triggers a build in pipeline, then will it become 31?
You're correct, the build number is not tracked based on branches. It's a repository-wide counter that increases every build (doesn't matter to which branch), so each pipeline run will have a unique build number. The variable BITBUCKET_BUILD_NUMBER will be populated with the number of the current build.
If we rerun a pipeline build in master that is now having 31 as its BUILD NUMBER value, will it become 32?
Correct. Each pipeline run will receive a new build number which is +1 to the last pipeline executed in the repository.
Many said that BUILD NUMBER is equal to the current number of build in pipeline unless you did not do something.
Does rerunning a build pipeline will cause it to not get in synch with what is showing in pipeline tab? If yes, then how to see the current BUILD NUMBER value using cURL or RESTful API?
The environment variable BITBUCKET_BUILD_NUMBER will always be in sync with what is showing on the pipeline page.
Hope that helps! If you have any follow-up questions feel free to ask.
Thank you, @Bitwise DEVS !
Patrik S
Thank you so much for spending a time answering my questions, really appreciate it!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.