It does seem like you are confused about several aspects of Jenkins.. I think your question basically boils down to the following.
What is a difference between a workspace and a build?
So, here are some thoughts on this topic:
- Builds are historical data. They (usually) don’t change like a workspace does during building/checkout.
- Builds contain information about a run (e.g. its status, build number, change log, etc) and any artifacts that you tell it to archive (logs, test results, etc). They (usually) don’t contain source code like a workspace.
- Builds are stored in the
Jenkins\jobs\[projectName]\builds\[build_id]\directory. This is a directory managed by Jenkins and you (usually) do not need to modify anything in this directory. However, workspaces are directories meant for the build and you can do pretty much anything with them and place them anywhere (it does not need to be in the default
- Workspaces should be able to be wiped at any given time. To restore it, just rebuild the job with the same parameters/revision. If you need to keep something after a build, tell Jenkins to archive it before the build is done.
- In regard to saving the entire state, I don’t think you need to do that. As mentioned in #4, you should be able to reproduce the same build by kicking off the same revision/parameters as the build in question. If you cannot get back to the original state from the same revision/parameters, then that might be something to strive for as debugging is going to be a nightmare. 🙂
- A workspace is an aspect of the project and not a build and that is why there is no link to the workspace from that page. Again, a build is just saved data from a previous run. A project uses the workspace to build stuff and that is why you can get to the workspace from that page.
- In regard to how to save artifacts, you must specify the names of the files you want to save. Unless you are trying to save a file called “artifacts”, then you should probably use something else. How about
**/*.logfor all log files? or
**/*.xmlfor all xml files?
Hope this helps.