You can't.  At least, you can't reuse the same job number for a later build 
because the job number uniquely identifies the results of that job and is 
used to store the results of that job in the file system.

If you want a monotonically increasing number which only increases when you 
successfully build, I think you'll need to implement that in your build 
scripts, since the build number / job number is not something you can use 
to count successful builds.

We did something like that by increasing the version number in a file 
controlled by the SCM system, then we only committed/pushed that change 
when the job was successful.

Mark Waite

On Thursday, September 5, 2013 7:36:29 AM UTC-6, Peter Soncek wrote:
>
> Hello,
>
> I am new to Jenkins and trying to setup my build environment.  I have 
> noticed that when a build fails, the build number is still incremented.  
> How can I prevent Jenkins from doing this?  I'm not here to start a debate 
> on whether that is the correct behavior or not.  I just want to know how I 
> can do this for my environment here.
>
> Thank you,
> Peter
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to