I'm setting up a new automated build. Of course, I'm not getting it right on the first try. I'm already at my 9th attempt and so the build number is already up to 9 build using "%(prop:buildnumber)". buildbot is incrementing the build number with each build as expected.
We are using the build number as part of the version number of our product. after I get it all working, I'd like to start with build 1.
I also found myself wanting to do this recently. As far as I know, there are three options:
The database:
Each Buildbot master stores all its information about past and present builds in the sqlite database file
state.sqlite.You can view that information stored within the tables of that database:
Output:
As shown on the Web UI:
Option 1: If you want to blow away everything and start from scratch, simply move the database and re-initialize it:
After that you'll notice that most of the tables are empty, and that none of the builders have any history on the web UI.
Option 2: If you add a new builder, you can start counting from buildnumber:1 again, without losing any historical records of completed builds.
Create a new builder in your config, pointing to the same build factory and same worker:
And then add a scheduler that triggers that new builder. Here I kept a ForceScheduler pointing to
runtests1andruntests2builders, because every builder needs a scheduler to drive it, or otherwise the master won't restart:Then you'll have a new builder that does exactly the same thing, but starts counting from buildnumber:1 again:
Option 3: If you like to live dangerously, you can probably strip out the buildset ids that you wish never happened, or don't want to show on the web UI. I would back up your
state.sqlitedatabase file before doing this: