-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
So when I want to change my build number to some other number which is a higher value than current Jenkins is accepting in the set next build number, but if I want to set that to a lower value than the current, then Jenkins is not allowing that number. To configure it to lower values I have to delete all the builds and then reset to the lower build number I wish. Which, almost like creating a new job and starting a fresh build. It seems Jenkins only accepts build numbers in ascending order not in descending order. The issue that organizations have to face when they want to change the build number like (1000 is build number and wish to change it to 500(not used for that job) )this they have to lose the build data of previous ones which are not a good thing for any organization.
So what exactly is the bug here?
The fact that Jenkins doesn't allow you to reuse build numbers? Can you show me where such a use case would be valid or helpful? How is deleting builds like creating a new job?
Imagine for a second that you have a job with 10 builds (#1 through #10). Let's say that you were allowed to change nextBuildNumber from 11 to 5. What will happen when you run the job? Will you have two builds #5? Perhaps Jenkins is supposed to invent a #5.1 (5.2, 5.3 and so on) concept just for this? Or do you expect the old build to be blindly overwritten by the new one? Under what circumstances is build history overwriting helpful? Are you comfortable with having a build #5 that is newer than build #10?
I'm mostly asking all these questions out of curiosity. The Next Build Number plugin (that's how you tagged this ticket), has nothing to do with what you're asking - that functionality is part of Jenkins core. The plugin merely asks Jenkins to change the next build number, and Jenkins core decides what values are acceptable.