During our current build process, we have C code that gets compiled and archived together with some Python code in a tarball. That tarball represents a commit (that can be or not be a release commit).
In some of our Jenkins flows, the code is being tested and in some it isn't. But the information regarding to each specific tarball, whether it passed Unit Test or Component Test remains solely in the Jenkins job, and is gone after the job ends.
Looking at an existing tarball, I can't tell if it passed any of the tests at all, and there's no way I know of, of querying Jenkins about this specific build-flow and the results of its' jobs.
The best options I could think of to mark and save test results are:
- Add a file to the projects' main directory (the file will be saved inside the tarball) that signifies the tests it passed (e.g.
.passedunittest
,.passedcomponenttest
). - Add a text file in the directory where the tarballs are saved, that will act as a database for tarballs, regarding to tests passed or failed.
- Add a component to the tarball filename that signifies the tests it passed.
I feel fine with all 3 options, but I personally prefer the 1st, but it happens to me that I feel fine with ridiculous solutions. Is there a best practice in this case? And if there is, what is it?