We are having two Build projects which has some build plans and we are always running a clean checkout for all plans.
We are using Build Number stamper plugin to generate "build-number.txt". This plugin runs as a pre-build action.
In Project 1 pre-build action runs after "Checkout Default Repository" task and hence our generated build-number.txt is retained

In Project 2 pre-build action runs at the start i.e. before "Checkout Default Repository" and since we always do a clean build. The task 'Checkout Default Repository" removes build-number.txt.

I have looked in every tab and in miscellaneous tab in the corresponding Job and I cannot find were this behavious is defined.
Appreciate if someone please shed some light on this