HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Is it possible to build Jenkins jobs without using build numbers?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
withoutjenkinsnumberspossiblejobsusingbuild

Problem

I have a job which is running very frequently, so I'd like to avoid high number of builds. Is there any way to drop job build numbers, so the job is constantly ran, but without high numbers of builds?

Solution

It's not possible to avoid setting the BUILD_NUMBER environment variable, but you can avoid using it. Try using the Jenkins plugin Build Name Setter Plugin. It adds an option in your build configuration to set the build name to whatever you want, and you can ignore the BUILD_NUMBER environment variable this way.

Consider 1.250.5 versus 1.250.${BUILD_NUMBER}. The former will be constant no matter how many times you build and the latter will increment by one every time you build. It's also possible to use other macro values in between ${} to make more interesting dynamic build numbers.

Context

StackExchange DevOps Q#65, answer score: 7

Revisions (0)

No revisions yet.