-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.138.3
Git-Plugin 3.9.1
Linux ${HOSTNAME} 3.10.0-862.14.4.el7.x86_64 #1 SMP Fri Sep 21 09:07:21 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
User has configured a job with branch specifier "**". When the user ran the build, Jenkins ran a build for every branch in the repository. We've seen this before. The twist here is that we upgraded the Jenkins hardware, and Jenkins version. We did an rsync of the old jenkins data directory to the new server. On the old server, the job only ran when a new commit was pushed to the repository, and only the branch that changed.
This ticket is more of a question than a problem since we expect this for a fresh install, but we were surprised that the builds were running for every branch since we copied the original workspace.
The question than is how does jenkins keep track of which branches/commits have been built? What additional files, and/or precautions do we need to take to make sure this does not happen again. We are unable to locate any documentation that explains exactly how the git plugin manages to keep track of which commits have been build.
I suspect that the build.xml files from each build in the repository record the SHA1 hash(es) of the build. I haven't investigated deeply to confirm that, but that is my suspicion.