Hi,
I am slightly confused by the difference between artifacts and builds.
Correct me if I am wrong and please add whatever I might have missed.
* Builds are the files created during a job. So if a job triggers the
creation of 2 files and 3 directories, that's the build and it exists in
the workspace. Artifacts are files/directories that are stored by
jenkins outside the workspace and can be copied between jobs.
Now, if this is correct, how does it work when we say: 'keep a maximum
amount of 5 builds'? Does jenkins take a snapshot of workspace before a
job is run and knows what was created during the job execution and makes
that the build?
* If I have a job and create a tarball in a script to use as artifact,
the tarball is created in workspace and then the artifact [tarball] is
copied automatically by jenkins somewhere else. However the tarball
stays in workspace occupying precious space. How can I instruct jenkins
that all that is made into an artifact should be removed from workspace?
* When I run a downstream job and copy artifacts from upstream into
workspace/artifacts, is there a way to remove all the artifacts from
previous build or this needs to be done manually through a script?
I am sorry for all these seemingly trivial questions but a hard thing
to understand about jenkins is what jenkins can automate and what you
need to have a script to do it yourself.
--
Paulo Matos