We pushed a change to our code base yesterday in which we now access a credentials file present in /spare/ which can be used by multiple users on the same machine. The user Jenkins was given read permission to this folder so that it can build our code base and run tests. Now, Jenkins is behaving in a weird way after that.
It mails that the build has failed with a build number that is older than the current build number. The reason Jenkins says that the build has failed is that Jenkins cannot open the credentials file in /spare/. Strangely, on the website, the latest build has passed. If we schedule a build manually, that too passes. The current number of build is also correct in these builds.
Why is Jenkins behaving like this?